Class SlotInfoResource
java.lang.Object
info.mikethomas.fahservices.service.SlotInfoResource
REST Web Service.
- Version:
- $Id: $Id
- Author:
- Michael Thomas (mikepthomas@outlook.com)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<List<info.mikethomas.jfold.slot.Slot>> Retrieves representation of an instance of info.mikethomas.fahservices.service.SlotInfoResource.org.springframework.http.ResponseEntity
<info.mikethomas.jfold.slot.Slot> getSlotInfo
(int slot) Retrieves representation of an instance of info.mikethomas.fahservices.service.SlotInfoResource.org.springframework.http.ResponseEntity
<Exception> handleException.
-
Constructor Details
-
SlotInfoResource
public SlotInfoResource()
-
-
Method Details
-
getSlotInfo
@RequestMapping(value="/slot-info", method=GET, produces={"application/json","application/xml","text/xml"}) @ResponseBody public org.springframework.http.ResponseEntity<List<info.mikethomas.jfold.slot.Slot>> getSlotInfo() throws info.mikethomas.jfold.exceptions.SlotInfoExceptionRetrieves representation of an instance of info.mikethomas.fahservices.service.SlotInfoResource.- Returns:
- an instance of java.lang.String
- Throws:
info.mikethomas.jfold.exceptions.SlotInfoException
- if any.
-
getSlotInfo
@RequestMapping(value="/slot-info/{slot}", method=GET, produces={"application/json","application/xml","text/xml"}) @ResponseBody public org.springframework.http.ResponseEntity<info.mikethomas.jfold.slot.Slot> getSlotInfo(@PathVariable("slot") int slot) throws info.mikethomas.jfold.exceptions.SlotInfoException Retrieves representation of an instance of info.mikethomas.fahservices.service.SlotInfoResource.- Parameters:
slot
- Slot number- Returns:
- an instance of java.lang.String
- Throws:
info.mikethomas.jfold.exceptions.SlotInfoException
- if any.
-
handleException
@ExceptionHandler(info.mikethomas.jfold.exceptions.SlotInfoException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public org.springframework.http.ResponseEntity<Exception> handleException(Exception ex) handleException.
- Parameters:
ex
- aException
object- Returns:
- a
ResponseEntity
object
-