Class CalendarUnitService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.projects.rs1.calendarunit.CalendarUnitService
@RestController
@RequestMapping("work-orders/projects/r1/calendar-units")
@Resource(logging=true)
public class CalendarUnitService
extends PrivateService
Services to manage calendar unit
- Since:
- 16.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOCalendarUnit> get(Long id, String language, Collection<String> fields) Retrieves the required calendar unit by calling theCalendarUnitLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOCalendarUnit>> getCollection(@Valid Page page, String language, Collection<String> fields, String order, @Valid DTOCalendarUnitFilter filter) Returns the collection of all the calendar unit by calling theCalendarUnitSearchEvent.
-
Constructor Details
-
CalendarUnitService
public CalendarUnitService()
-
-
Method Details
-
get
@GetMapping(value="{calendarUnitId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOCalendarUnit> get(@PathVariable("calendarUnitId") Long id, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the required calendar unit by calling theCalendarUnitLoadEvent.- Parameters:
id- calendar unit idlanguage- the user languagefields- the collection of fields the response will contain- Returns:
- the
ResponseEntitycontaining the loadedDTOCalendarUnit - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOCalendarUnit>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @Valid DTOCalendarUnitFilter filter) throws DAValidateException, DAException Returns the collection of all the calendar unit by calling theCalendarUnitSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultlanguage- the user languagefields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOCalendarUnitFilter- Returns:
- the
ResponseEntitycontaining the collection ofDTOCalendarUnit - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-