Class WorkOrderNoteService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.workorders.rs1.note.WorkOrderNoteService
@RestController
@RequestMapping("work-orders/r1/notes")
@Resource(logging=true)
public class WorkOrderNoteService
extends PrivateService
Service to manage work order notes.
- Since:
- 22.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOWorkOrderNote> get(Long noteId, String language, Collection<String> fields) Retrieves a specific work order note by calling theWorkOrderNoteLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOWorkOrderNote>> getCollection(@Valid Page page, Collection<String> fields, String order, String language, @Valid @NotNull DTOWorkOrderNoteFilter filter) Returns the collection of all the stored work order notes by calling theWorkOrderNoteSearchEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> Creates a new work order note by calling theWorkOrderNoteInsertEvent.
-
Constructor Details
-
WorkOrderNoteService
public WorkOrderNoteService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOWorkOrderNote>> getCollection(@RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @RequestParam(required=false,name="_language",defaultValue="user") String language, @Valid @NotNull @Valid @NotNull DTOWorkOrderNoteFilter filter) throws DAValidateException, DAException Returns the collection of all the stored work order notes by calling theWorkOrderNoteSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields the response will containorder- the ordering fieldlanguage- the language for multilanguage fieldsfilter- theDTOWorkOrderNoteFilter- Returns:
- the collection of DTOWorkOrderNote
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
get
@GetMapping(value="{noteId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOWorkOrderNote> get(@PathVariable("noteId") Long noteId, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves a specific work order note by calling theWorkOrderNoteLoadEvent.- Parameters:
noteId- the ID of the work order note to retrievelanguage- the language for multilanguage fieldsfields- the collection of fields that will be contained in the response- Returns:
- the response containing the loaded work order note
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-
post
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(@Valid @RequestBody @Valid DTOWorkOrderNoteInsert dto) throws DAValidateException, DAException Creates a new work order note by calling theWorkOrderNoteInsertEvent.- Parameters:
dto- theDTOWorkOrderNoteInsert- Returns:
- the id of the created work order note
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-