Class PublicController

java.lang.Object
com.cloudimpl.outstack.spring.controller.AbstractController
com.cloudimpl.outstack.spring.controller.PublicController

@RestController
@CrossOrigin(origins="*",
             allowedHeaders="*",
             methods={DELETE,GET,POST})
@RequestMapping("/public")
public class PublicController
extends AbstractController
Provides public accessible endpoints
Author:
roshanmadhushanka
  • Field Summary

    Fields inherited from class com.cloudimpl.outstack.spring.controller.AbstractController

    cluster
  • Constructor Summary

    Constructors
    Constructor Description
    PublicController​(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> 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)  
    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)  
    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)  
    protected void validateAction​(SpringServiceDescriptor.ActionDescriptor action, SpringServiceDescriptor.ActionDescriptor.ActionType type)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PublicController

      public PublicController​(Cluster cluster)
  • 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:
      createRootEntity in class AbstractController
    • 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:
      updateRootEntity in class AbstractController
    • 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:
      uploadRootEntityFiles in class AbstractController
    • 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:
      createChildEntity in class AbstractController
    • 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:
      updateChildEntity in class AbstractController
    • 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:
      uploadChildEntityFiles in class AbstractController
    • 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)
      Overrides:
      getRootEntity in class AbstractController
    • 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:
      getRootEntityEvents in class AbstractController
    • 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)
      Overrides:
      getChildEntity in class AbstractController
    • 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:
      getChildEntityEvents in class AbstractController
    • 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:
      listChildEntity in class AbstractController
    • listRootEntity

      @GetMapping(value="{context}/{version}/{rootEntity}", consumes="application/json") 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("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:
      listRootEntity in class AbstractController
    • 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:
      deleteChildEntity in class AbstractController
    • 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:
      deleteRootEntity in class AbstractController
    • 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)
    • validateAction

      Overrides:
      validateAction in class AbstractController