Class EncodedNoteService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.execution.rs1.encodednote.EncodedNoteService
@RestController
@RequestMapping("work-orders/execution/r1/encoded-notes")
@Resource(logging=true)
public class EncodedNoteService
extends PrivateService
Service for manage encoded note.
- Since:
- 18.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOEncodedNote> get(Long encodedNoteId, String language, Collection<String> fields) Retrieves the requiredDTOEncodedNoteby calling from theEncodedNoteLoadEvent.org.springframework.http.ResponseEntity<PageResponse<DTOEncodedNote>> getCollection(@Valid Page page, Collection<String> fields, String order, String language, @Valid @NotNull DTOEncodedNoteFilter filter) Returns the collection of all the stored encoded notes by calling theEncodedNoteSearchEvent.org.springframework.http.ResponseEntity<Void> patch(Long encodedNoteId, @Valid DTOEncodedNoteUpdate dto) Updates the required encoded note by calling theEncodedNoteLoadEvent.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> Creates a new encoded note by calling theEncodedNoteInsertEvent.
-
Constructor Details
-
EncodedNoteService
public EncodedNoteService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOEncodedNote>> 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 DTOEncodedNoteFilter filter) throws DAValidateException, DAException Returns the collection of all the stored encoded notes by calling theEncodedNoteSearchEvent.- Parameters:
page- thePagethat will contain the paginated resultfields- the collection of fields that will be contained in the responseorder- the order fieldlanguage- the language of the userfilter- theDTOEncodedNoteFilter- Returns:
- the collection of
DTOEncodedNote - Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{encodedNoteId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOEncodedNote> get(@PathVariable("encodedNoteId") Long encodedNoteId, @RequestParam(required=false,name="_language",defaultValue="user") String language, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOEncodedNoteby calling from theEncodedNoteLoadEvent.- Parameters:
encodedNoteId- the encoded note idlanguage- the language of the userfields- the collection of fields that will be contained in the response- Returns:
- the response containing the loaded encoded note
- 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 DTOEncodedNoteInsert dto) throws DAValidateException, DAException Creates a new encoded note by calling theEncodedNoteInsertEvent.- Parameters:
dto- theDTOEncodedNoteInsert- Returns:
- the response containing the ID of the newly created encoded note
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
patch
@PatchMapping(value="{encodedNoteId:[0-9]+}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> patch(@PathVariable("encodedNoteId") Long encodedNoteId, @Valid @RequestBody @Valid DTOEncodedNoteUpdate dto) throws DAValidateException, DAException Updates the required encoded note by calling theEncodedNoteLoadEvent.- Parameters:
encodedNoteId- the ID of the encoded note to be updateddto- theDTOEncodedNoteUpdate- Returns:
- the standard empty response
- Throws:
DAValidateException- if there is a data validation exceptionDAException- if a genericExceptionis thrown
-