Class OrchestratorAccountAttachmentByAccountService
java.lang.Object
overit.geocallapp.utilities.rs.common.PrivateService
overit.geocallapp.wfm.orchestrator.assets.rs1.account.attachment.OrchestratorAccountAttachmentByAccountService
@RestController
@RequestMapping("assets/accounts/r1/accounts/{accountId:[0-9]+}/attachments")
@Resource(logging=true)
public class OrchestratorAccountAttachmentByAccountService
extends PrivateService
Service to manage the attachments of a single account.
- Since:
- 20.0
- GCApi:
- rest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DTOAccountAttachment> get(Long accountId, Long attachmentId, Collection<String> fields) Retrieves the requiredDTOAccountAttachmentby calling theAttachmentLoadEvent, considering only attachments related to a asset.org.springframework.http.ResponseEntity<PageResponse<DTOAccountAttachment>> getCollection(Long accountId, @Valid Page page, Collection<String> fields, String order, @Valid @NotNull DTOAccountAttachmentFilter filter) Retrieves the requiredDTOAccountAttachmentby calling theAttachmentSearchEventwith the right clause.org.springframework.http.ResponseEntity<DTOIdentifier<Long>> post(Long accountId, @Valid DTOAccountAttachmentInsert dto) Attach an existing file to an account by calling theAccountAttachmentInsertEvent.
-
Constructor Details
-
OrchestratorAccountAttachmentByAccountService
public OrchestratorAccountAttachmentByAccountService()
-
-
Method Details
-
getCollection
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<PageResponse<DTOAccountAttachment>> getCollection(@PathVariable("accountId") Long accountId, @RequestParam("_page") @Valid @Valid Page page, @RequestParam(required=false,name="_fields") Collection<String> fields, @RequestParam(required=false,name="_order") String order, @Valid @NotNull @Valid @NotNull DTOAccountAttachmentFilter filter) throws DAValidateException, DAException Retrieves the requiredDTOAccountAttachmentby calling theAttachmentSearchEventwith the right clause.- Parameters:
page- the required result pagefields- the collection of fields the response will containorder- the ordering fieldfilter- theDTOAccountAttachmentFilter- Returns:
- the response containing the current result page
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-
get
@GetMapping(value="{attachmentId:[0-9]+}", produces="application/json") public org.springframework.http.ResponseEntity<DTOAccountAttachment> get(@PathVariable("accountId") Long accountId, @PathVariable("attachmentId") Long attachmentId, @RequestParam(required=false,value="_fields") Collection<String> fields) throws DAValidateException, DAException Retrieves the requiredDTOAccountAttachmentby calling theAttachmentLoadEvent, considering only attachments related to a asset.- Parameters:
attachmentId- the attachment idfields- the collection of fields the response will contain- Returns:
- the response containing the loaded attachment
- 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(@PathVariable("accountId") Long accountId, @Valid @RequestBody @Valid DTOAccountAttachmentInsert dto) throws DAValidateException, DAException Attach an existing file to an account by calling theAccountAttachmentInsertEvent.- Parameters:
dto- theDTOAccountAttachmentInsert- Returns:
- the standard response containing the new attachment id
- Throws:
DAValidateException- the DA validate exceptionDAException- the DA exception
-