Class ModelController

  • All Implemented Interfaces:
    ModelRestApi

    @RestController
    @ControllerAdvice
    public class ModelController
    extends java.lang.Object
    implements ModelRestApi
    Controller for Model resources
    • Constructor Detail

      • ModelController

        public ModelController​(org.activiti.cloud.services.modeling.service.api.ModelService modelService,
                               org.activiti.cloud.services.modeling.service.ModelTypeService modelTypeService,
                               ModelResourceAssembler resourceAssembler,
                               org.activiti.cloud.alfresco.data.domain.AlfrescoPagedResourcesAssembler<org.activiti.cloud.modeling.api.Model> pagedResourcesAssembler,
                               ModelTypeResourceAssembler modelTypeAssembler,
                               PagedModelTypeAssembler pagedModelTypeAssembler,
                               ProjectController projectController)
    • Method Detail

      • getModels

        public org.springframework.hateoas.PagedResources<org.springframework.hateoas.Resource<org.activiti.cloud.modeling.api.Model>> getModels​(@PathVariable
                                                                                                                                                 java.lang.String projectId,
                                                                                                                                                 @RequestParam("type")
                                                                                                                                                 java.lang.String type,
                                                                                                                                                 org.springframework.data.domain.Pageable pageable)
        Specified by:
        getModels in interface ModelRestApi
      • getModel

        public org.springframework.hateoas.Resource<org.activiti.cloud.modeling.api.Model> getModel​(@PathVariable
                                                                                                    java.lang.String modelId)
        Specified by:
        getModel in interface ModelRestApi
      • createModel

        public org.springframework.hateoas.Resource<org.activiti.cloud.modeling.api.Model> createModel​(@PathVariable
                                                                                                       java.lang.String projectId,
                                                                                                       @Valid @RequestBody
                                                                                                       @Valid org.activiti.cloud.modeling.api.Model model)
        Specified by:
        createModel in interface ModelRestApi
      • updateModel

        public org.springframework.hateoas.Resource<org.activiti.cloud.modeling.api.Model> updateModel​(@PathVariable
                                                                                                       java.lang.String modelId,
                                                                                                       @Valid @RequestBody
                                                                                                       @Valid org.activiti.cloud.modeling.api.Model model)
        Specified by:
        updateModel in interface ModelRestApi
      • updateModelContent

        public void updateModelContent​(@PathVariable
                                       java.lang.String modelId,
                                       @RequestPart("file")
                                       org.springframework.web.multipart.MultipartFile file)
                                throws java.io.IOException
        Specified by:
        updateModelContent in interface ModelRestApi
        Throws:
        java.io.IOException
      • deleteModel

        public void deleteModel​(@PathVariable
                                java.lang.String modelId)
        Specified by:
        deleteModel in interface ModelRestApi
      • getModelContent

        public void getModelContent​(javax.servlet.http.HttpServletResponse response,
                                    @PathVariable
                                    java.lang.String modelId)
                             throws java.io.IOException
        Specified by:
        getModelContent in interface ModelRestApi
        Throws:
        java.io.IOException
      • getModelDiagram

        public void getModelDiagram​(javax.servlet.http.HttpServletResponse response,
                                    @PathVariable
                                    java.lang.String modelId)
                             throws java.io.IOException
        Specified by:
        getModelDiagram in interface ModelRestApi
        Throws:
        java.io.IOException
      • importModel

        public org.springframework.hateoas.Resource<org.activiti.cloud.modeling.api.Model> importModel​(@PathVariable
                                                                                                       java.lang.String projectId,
                                                                                                       @RequestParam("type")
                                                                                                       java.lang.String type,
                                                                                                       @RequestPart("file")
                                                                                                       org.springframework.web.multipart.MultipartFile file)
                                                                                                throws java.io.IOException
        Specified by:
        importModel in interface ModelRestApi
        Throws:
        java.io.IOException
      • exportModel

        public void exportModel​(javax.servlet.http.HttpServletResponse response,
                                @PathVariable
                                java.lang.String modelId,
                                @RequestParam(name="attachment",required=false,defaultValue="true")
                                boolean attachment)
                         throws java.io.IOException
        Specified by:
        exportModel in interface ModelRestApi
        Throws:
        java.io.IOException
      • getModelTypes

        public org.springframework.hateoas.PagedResources<org.springframework.hateoas.Resource<org.activiti.cloud.modeling.api.ModelType>> getModelTypes​(org.springframework.data.domain.Pageable pageable)
        Specified by:
        getModelTypes in interface ModelRestApi
      • validateModel

        public void validateModel​(@PathVariable
                                  java.lang.String modelId,
                                  @RequestParam("file")
                                  org.springframework.web.multipart.MultipartFile file)
                           throws java.io.IOException
        Specified by:
        validateModel in interface ModelRestApi
        Throws:
        java.io.IOException
      • validateModelExtensions

        public void validateModelExtensions​(@PathVariable
                                            java.lang.String modelId,
                                            @RequestParam("file")
                                            org.springframework.web.multipart.MultipartFile file)
                                     throws java.io.IOException
        Specified by:
        validateModelExtensions in interface ModelRestApi
        Throws:
        java.io.IOException
      • findModelById

        public org.activiti.cloud.modeling.api.Model findModelById​(java.lang.String modelId)
      • findModelType

        public org.activiti.cloud.modeling.api.ModelType findModelType​(java.lang.String type)