Class Controller
java.lang.Object
com.cloudimpl.outstack.spring.controller.AbstractController
com.cloudimpl.outstack.spring.controller.Controller
@RestController
@CrossOrigin(origins="*",
allowedHeaders="*",
methods={DELETE,GET,POST})
@RequestMapping(path="/")
public class Controller
extends AbstractController
- Author:
- nuwan
-
Field Summary
Fields inherited from class com.cloudimpl.outstack.spring.controller.AbstractController
cluster -
Constructor Summary
Constructors Constructor Description Controller(Cluster cluster) -
Method Summary
Modifier and Type Method Description protected reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<java.lang.Object>>createChildEntity(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String childEntity, java.lang.String contentType, java.lang.String tenantId, java.lang.String body)protected reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<java.lang.Object>>createRootEntity(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String contentType, java.lang.String tenantId, java.lang.String body)protected reactor.core.publisher.Mono<java.lang.Object>createRootEntityWithFiles(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String contentType, java.lang.String tenantId, java.lang.String body, java.util.List<org.springframework.http.codec.multipart.FilePart> files)protected reactor.core.publisher.Mono<java.lang.Object>deleteChildEntity(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String childEntity, java.lang.String childId, java.lang.String contentType, java.lang.String tenantId)protected reactor.core.publisher.Mono<java.lang.Object>deleteRootEntity(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String contentType, java.lang.String tenantId)protected reactor.core.publisher.Mono<java.lang.Object>getChildEntity(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String childEntity, java.lang.String childId, java.lang.String contentType, java.lang.String tenantId, org.springframework.data.domain.Pageable pageable, java.util.Map<java.lang.String,java.lang.String> reqParam)protected reactor.core.publisher.Mono<java.lang.Object>getChildEntityEvents(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String childEntity, java.lang.String childId, java.lang.String contentType, java.lang.String tenantId, org.springframework.data.domain.Pageable pageable, java.util.Map<java.lang.String,java.lang.String> reqParam)protected reactor.core.publisher.Mono<java.lang.Object>getRootEntity(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String contentType, java.lang.String tenantId, org.springframework.data.domain.Pageable pageable, java.util.Map<java.lang.String,java.lang.String> reqParam)protected reactor.core.publisher.Mono<java.lang.Object>getRootEntityEvents(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String contentType, java.lang.String tenantId, org.springframework.data.domain.Pageable pageable, java.util.Map<java.lang.String,java.lang.String> reqParam)protected reactor.core.publisher.Flux<java.lang.String>getRootEntityStream(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String contentType, java.lang.String tenantId)protected reactor.core.publisher.Mono<java.lang.Object>listChildEntity(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String childEntity, java.lang.String contentType, java.lang.String tenantId, org.springframework.data.domain.Pageable pageable, java.util.Map<java.lang.String,java.lang.String> reqParam)protected reactor.core.publisher.Mono<java.lang.Object>listRootEntity(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String contentType, java.lang.String tenantId, org.springframework.data.domain.Pageable pageable, java.util.Map<java.lang.String,java.lang.String> reqParam)protected reactor.core.publisher.Mono<java.lang.Object>updateChildEntity(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String childEntity, java.lang.String childId, java.lang.String contentType, java.lang.String tenantId, java.lang.String body)protected reactor.core.publisher.Mono<java.lang.Object>updateRootEntity(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String contentType, java.lang.String tenantId, java.lang.String body)protected reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<java.lang.Object>>uploadChildEntityFiles(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String childEntity, java.lang.String childId, java.lang.String contentType, java.lang.String tenantId, java.util.List<org.springframework.http.codec.multipart.FilePart> files)protected reactor.core.publisher.Mono<java.lang.Object>uploadRootEntityFiles(org.springframework.http.server.reactive.ServerHttpRequest request, java.lang.String context, java.lang.String version, java.lang.String rootEntity, java.lang.String rootId, java.lang.String contentType, java.lang.String tenantId, java.util.List<org.springframework.http.codec.multipart.FilePart> files)Methods inherited from class com.cloudimpl.outstack.spring.controller.AbstractController
createRootEntityWithFiles, getServiceCmdDescriptor, getServiceQueryDescriptor, onChildEntityCreation, onError, onRootEntityCreation, removePagingParam, validateAction, validateOrderByQuery, validateSearchQueryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Controller
-
-
Method Details
-
createRootEntity
@PostMapping(value="{context}/{version}/{rootEntity}", consumes="application/json") @ResponseStatus(CREATED) protected reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<java.lang.Object>> createRootEntity(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, @RequestBody java.lang.String body)- Overrides:
createRootEntityin classAbstractController
-
updateRootEntity
@PostMapping(value="{context}/{version}/{rootEntity}/{rootId}", consumes="application/json") protected reactor.core.publisher.Mono<java.lang.Object> updateRootEntity(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, @RequestBody java.lang.String body)- Overrides:
updateRootEntityin classAbstractController
-
uploadRootEntityFiles
@PostMapping(value="{context}/{version}/{rootEntity}/{rootId}/files", consumes="multipart/form-data") @ResponseStatus(OK) protected reactor.core.publisher.Mono<java.lang.Object> uploadRootEntityFiles(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, @RequestPart("files") java.util.List<org.springframework.http.codec.multipart.FilePart> files)- Overrides:
uploadRootEntityFilesin classAbstractController
-
createRootEntityWithFiles
@PostMapping(value="{context}/{version}/{rootEntity}/files", consumes={"multipart/form-data","application/json"}) @ResponseStatus(CREATED) protected reactor.core.publisher.Mono<java.lang.Object> createRootEntityWithFiles(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, @RequestPart(name="body",required=false) java.lang.String body, @RequestPart("files") java.util.List<org.springframework.http.codec.multipart.FilePart> files) -
createChildEntity
@PostMapping(value="{context}/{version}/{rootEntity}/{rootId}/{childEntity}", consumes="application/json") @ResponseStatus(CREATED) protected reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<java.lang.Object>> createChildEntity(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @PathVariable java.lang.String childEntity, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, @RequestBody java.lang.String body)- Overrides:
createChildEntityin classAbstractController
-
updateChildEntity
@PostMapping(value="{context}/{version}/{rootEntity}/{rootId}/{childEntity}/{childId}", consumes="application/json") protected reactor.core.publisher.Mono<java.lang.Object> updateChildEntity(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @PathVariable java.lang.String childEntity, @PathVariable java.lang.String childId, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, @RequestBody java.lang.String body)- Overrides:
updateChildEntityin classAbstractController
-
uploadChildEntityFiles
@PostMapping(value="{context}/{version}/{rootEntity}/{rootId}/{childEntity}/{childId}/files", consumes="multipart/form-data") @ResponseStatus(OK) protected reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<java.lang.Object>> uploadChildEntityFiles(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @PathVariable java.lang.String childEntity, @PathVariable java.lang.String childId, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, @RequestPart("files") java.util.List<org.springframework.http.codec.multipart.FilePart> files)- Overrides:
uploadChildEntityFilesin classAbstractController
-
getRootEntity
@GetMapping(value="{context}/{version}/{rootEntity}/{rootId}", consumes="application/json") protected reactor.core.publisher.Mono<java.lang.Object> getRootEntity(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, org.springframework.data.domain.Pageable pageable, @RequestParam java.util.Map<java.lang.String,java.lang.String> reqParam)- Overrides:
getRootEntityin classAbstractController
-
getRootEntityEvents
@GetMapping(value="{context}/{version}/{rootEntity}/{rootId}/events", consumes="application/json") protected reactor.core.publisher.Mono<java.lang.Object> getRootEntityEvents(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, org.springframework.data.domain.Pageable pageable, @RequestParam java.util.Map<java.lang.String,java.lang.String> reqParam)- Overrides:
getRootEntityEventsin classAbstractController
-
getChildEntity
@GetMapping(value="{context}/{version}/{rootEntity}/{rootId}/{childEntity}/{childId}", consumes="application/json") protected reactor.core.publisher.Mono<java.lang.Object> getChildEntity(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @PathVariable java.lang.String childEntity, @PathVariable java.lang.String childId, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, org.springframework.data.domain.Pageable pageable, @RequestParam java.util.Map<java.lang.String,java.lang.String> reqParam)- Overrides:
getChildEntityin classAbstractController
-
getChildEntityEvents
@GetMapping(value="{context}/{version}/{rootEntity}/{rootId}/{childEntity}/{childId}/events", consumes="application/json") protected reactor.core.publisher.Mono<java.lang.Object> getChildEntityEvents(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @PathVariable java.lang.String childEntity, @PathVariable java.lang.String childId, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, org.springframework.data.domain.Pageable pageable, @RequestParam java.util.Map<java.lang.String,java.lang.String> reqParam)- Overrides:
getChildEntityEventsin classAbstractController
-
listChildEntity
@GetMapping(value="{context}/{version}/{rootEntity}/{rootId}/{childEntity}", consumes="application/json") protected reactor.core.publisher.Mono<java.lang.Object> listChildEntity(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @PathVariable java.lang.String childEntity, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, org.springframework.data.domain.Pageable pageable, @RequestParam java.util.Map<java.lang.String,java.lang.String> reqParam)- Overrides:
listChildEntityin classAbstractController
-
listRootEntity
@GetMapping("{context}/{version}/{rootEntity}") protected reactor.core.publisher.Mono<java.lang.Object> listRootEntity(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @RequestHeader(name="Content-Type",required=false) java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId, org.springframework.data.domain.Pageable pageable, @RequestParam java.util.Map<java.lang.String,java.lang.String> reqParam)- Overrides:
listRootEntityin classAbstractController
-
deleteChildEntity
@DeleteMapping(value="{context}/{version}/{rootEntity}/{rootId}/{childEntity}/{childId}", consumes="application/json") protected reactor.core.publisher.Mono<java.lang.Object> deleteChildEntity(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @PathVariable java.lang.String childEntity, @PathVariable java.lang.String childId, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId)- Overrides:
deleteChildEntityin classAbstractController
-
deleteRootEntity
@DeleteMapping(value="{context}/{version}/{rootEntity}/{rootId}", consumes="application/json") protected reactor.core.publisher.Mono<java.lang.Object> deleteRootEntity(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId)- Overrides:
deleteRootEntityin classAbstractController
-
getRootEntityStream
@GetMapping("/streams/{context}/{version}/{rootEntity}/{rootId}") protected reactor.core.publisher.Flux<java.lang.String> getRootEntityStream(org.springframework.http.server.reactive.ServerHttpRequest request, @PathVariable java.lang.String context, @PathVariable java.lang.String version, @PathVariable java.lang.String rootEntity, @PathVariable java.lang.String rootId, @RequestHeader("Content-Type") java.lang.String contentType, @RequestHeader(name="X-TenantId",required=false) java.lang.String tenantId)- Overrides:
getRootEntityStreamin classAbstractController
-