Class ResourceTypeService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.resources.rs1.resourcetype.ResourceTypeService
@RestController
@RequestMapping("workforce/resources/r1/resource-types")
@Resource(logging=true)
public class ResourceTypeService
extends PrivateService
Service to manage resource type
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOResourceType> get(Long id, String language, Collection<String> fields) Retrieves the requiredDTOResourceTypeby calling theResourceTypeLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOResourceType>> getCollection(@Valid Page page, String language, Collection<String> fields, String order, @Valid DTOResourceTypeFilter filter) Returns the collection of all the stored resource types by calling theResourceTypeSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long id, @Valid DTOResourceTypeUpdate dto) Updates a resource type by calling theResourceTypeUpdateEventorg.springframework.http.ResponseEntity<DTOIdentifier<Long>> Creates a new resource type by calling theResourceTypeInsertEvent
-
Constructor Details
-
ResourceTypeService
public ResourceTypeService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOResourceType>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields, @RequestParam(required=false,value="_order") String order, @Valid @Valid DTOResourceTypeFilter filter) throws DAValidateException, DAException Returns the collection of all the stored resource types by calling theResourceTypeSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOResourceTypeFilter- Returns:
- the collection of
DTOResourceType - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{resourceTypeId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOResourceType> get(@PathVariable("resourceTypeId") Long id, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOResourceTypeby calling theResourceTypeLoadEvent.- Parameters:
id- the resource type idlanguage- the user languagefields- the collection of fields the response will contain- Returns:
- the response containing the loaded resource type
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid @RequestBody @Valid DTOResourceTypeInsert dto) throws DAValidateException, DAException Creates a new resource type by calling theResourceTypeInsertEvent- Parameters:
dto- theDTOResourceTypeInsert- Returns:
- the standard response containing the new resource type id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{resourceTypeId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("resourceTypeId") Long id, @Valid @RequestBody @Valid DTOResourceTypeUpdate dto) throws DAValidateException, DAException Updates a resource type by calling theResourceTypeUpdateEvent- Parameters:
id- the resource type iddto- theDTOResourceTypeUpdate- Returns:
- the standard response
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-