Class ModelController
java.lang.Object
org.activiti.cloud.services.modeling.rest.controller.ModelController
- All Implemented Interfaces:
ModelRestApi
@RestController
@ControllerAdvice
@Transactional
public class ModelController
extends Object
implements ModelRestApi
Controller for
Model resources-
Field Summary
Fields inherited from interface org.activiti.cloud.services.modeling.rest.api.ModelRestApi
CREATE_MODEL_PARAM_DESCR, CREATE_MODEL_PROJECT_ID_PARAM_DESCR, DELETE_MODEL_ID_PARAM_DESCR, DELETE_RELATIONSHIP_MODEL_PROJECT_MODEL_ID_PARAM_DESCR, DELETE_RELATIONSHIP_MODEL_PROJECT_PROJECT_ID_PARAM_DESCR, EXPORT_MODEL_ID_PARAM_DESCR, FORCE_PARAM_DESCR, FORCE_PARAM_NAME, GET_MODEL_CONTENT_ID_PARAM_DESCR, GET_MODEL_ID_PARAM_DESCR, GET_MODELS_NAME_PARAM_DESCR, GET_MODELS_PROJECT_ID_PARAM_DESCR, GET_MODELS_TYPE_PARAM_DESCR, IMPORT_MODEL_FILE_PARAM_DESCR, IMPORT_MODEL_TYPE_PARAM_DESCR, INCLUDE_ORPHANS_PARAM_DESCR, INCLUDE_ORPHANS_PARAM_NAME, MODEL_NAME_PARAM_NAME, MODEL_TYPE_PARAM_NAME, MODEL_USED_PARAM_DESCR, MODEL_USED_PARAM_NAME, MODELS, PROJECT_ID_PARAM_NAME, RELATE_MODEL_PROJECT_MODEL_ID_PARAM_DESCR, RELATE_MODEL_PROJECT_PROJECT_ID_PARAM_DESCR, SCOPE_PARAM_DESCR, SCOPE_PARAM_NAME, UPDATE_MODEL_FILE_PARAM_DESCR, UPDATE_MODEL_ID_PARAM_DESCR, UPDATE_MODEL_PARAM_DESCR, VALIDATE_EXTENSIONS_FILE_PARAM_DESCR, VALIDATE_MODEL_FILE_PARAM_DESCR, VALIDATE_MODEL_ID_PARAM_DESCR, VALIDATE_PROJECT_ID_PARAM_DESCR -
Constructor Summary
ConstructorsConstructorDescriptionModelController(ModelService modelService, ModelTypeService modelTypeService, ModelRepresentationModelAssembler representationModelAssembler, AlfrescoPagedModelAssembler<Model> pagedCollectionModelAssembler, ModelTypeRepresentationModelAssembler modelTypeAssembler, PagedModelTypeAssembler pagedModelTypeAssembler, ProjectController projectController) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.hateoas.EntityModel<Model> createModel(String projectId, @Valid Model model) org.springframework.hateoas.EntityModel<Model> createModelWithoutProject(Model model) voiddeleteModel(String modelId) org.springframework.hateoas.EntityModel<Model> deleteProjectModelRelationship(String projectId, String modelId) voidexportModel(jakarta.servlet.http.HttpServletResponse response, String modelId, boolean attachment) findModelById(String modelId) findModelType(String type) org.springframework.hateoas.PagedModel<org.springframework.hateoas.EntityModel<Model>> getGlobalModels(String type, boolean includeOrphans, org.springframework.data.domain.Pageable pageable) org.springframework.hateoas.EntityModel<Model> voidgetModelContent(jakarta.servlet.http.HttpServletResponse response, String modelId) voidgetModelDiagram(jakarta.servlet.http.HttpServletResponse response, String modelId) org.springframework.hateoas.PagedModel<org.springframework.hateoas.EntityModel<Model>> org.springframework.hateoas.PagedModel<org.springframework.hateoas.EntityModel<Model>> getModelsByName(String projectId, String name, org.springframework.data.domain.Pageable pageable) org.springframework.hateoas.PagedModel<org.springframework.hateoas.EntityModel<ModelType>> getModelTypes(org.springframework.data.domain.Pageable pageable) org.springframework.hateoas.EntityModel<Model> importModel(String projectId, String type, org.springframework.web.multipart.MultipartFile file) org.springframework.hateoas.EntityModel<Model> putProjectModelRelationship(String projectId, String modelId, String scope, boolean force) org.springframework.hateoas.EntityModel<Model> updateModel(String modelId, @Valid Model model) voidupdateModelContent(String modelId, org.springframework.web.multipart.MultipartFile file) voidvalidateModel(String modelId, org.springframework.web.multipart.MultipartFile file, String projectId, boolean validateUsage) voidvalidateModelExtensions(String modelId, org.springframework.web.multipart.MultipartFile file, String projectId)
-
Constructor Details
-
ModelController
public ModelController(ModelService modelService, ModelTypeService modelTypeService, ModelRepresentationModelAssembler representationModelAssembler, AlfrescoPagedModelAssembler<Model> pagedCollectionModelAssembler, ModelTypeRepresentationModelAssembler modelTypeAssembler, PagedModelTypeAssembler pagedModelTypeAssembler, ProjectController projectController)
-
-
Method Details
-
getModels
public org.springframework.hateoas.PagedModel<org.springframework.hateoas.EntityModel<Model>> getModels(@PathVariable String projectId, @RequestParam("type") String type, org.springframework.data.domain.Pageable pageable) - Specified by:
getModelsin interfaceModelRestApi
-
getModelsByName
public org.springframework.hateoas.PagedModel<org.springframework.hateoas.EntityModel<Model>> getModelsByName(@PathVariable String projectId, @RequestParam("name") String name, org.springframework.data.domain.Pageable pageable) - Specified by:
getModelsByNamein interfaceModelRestApi
-
getModel
- Specified by:
getModelin interfaceModelRestApi
-
createModel
public org.springframework.hateoas.EntityModel<Model> createModel(@PathVariable String projectId, @Valid @RequestBody @Valid Model model) - Specified by:
createModelin interfaceModelRestApi
-
updateModel
public org.springframework.hateoas.EntityModel<Model> updateModel(@PathVariable String modelId, @Valid @RequestBody @Valid Model model) - Specified by:
updateModelin interfaceModelRestApi
-
updateModelContent
public void updateModelContent(@PathVariable String modelId, @RequestPart("file") org.springframework.web.multipart.MultipartFile file) throws IOException - Specified by:
updateModelContentin interfaceModelRestApi- Throws:
IOException
-
deleteModel
- Specified by:
deleteModelin interfaceModelRestApi
-
getModelContent
public void getModelContent(jakarta.servlet.http.HttpServletResponse response, @PathVariable String modelId) throws IOException - Specified by:
getModelContentin interfaceModelRestApi- Throws:
IOException
-
getModelDiagram
public void getModelDiagram(jakarta.servlet.http.HttpServletResponse response, @PathVariable String modelId) throws IOException - Specified by:
getModelDiagramin interfaceModelRestApi- Throws:
IOException
-
importModel
public org.springframework.hateoas.EntityModel<Model> importModel(@PathVariable String projectId, @RequestParam("type") String type, @RequestPart("file") org.springframework.web.multipart.MultipartFile file) throws IOException - Specified by:
importModelin interfaceModelRestApi- Throws:
IOException
-
exportModel
public void exportModel(jakarta.servlet.http.HttpServletResponse response, @PathVariable String modelId, @RequestParam(name="attachment",required=false,defaultValue="true") boolean attachment) throws IOException - Specified by:
exportModelin interfaceModelRestApi- Throws:
IOException
-
getModelTypes
public org.springframework.hateoas.PagedModel<org.springframework.hateoas.EntityModel<ModelType>> getModelTypes(org.springframework.data.domain.Pageable pageable) - Specified by:
getModelTypesin interfaceModelRestApi
-
validateModel
public void validateModel(@PathVariable String modelId, @RequestParam("file") org.springframework.web.multipart.MultipartFile file, @RequestParam(value="projectId",required=false) String projectId, @RequestParam(value="validateUsage",required=false) boolean validateUsage) throws IOException - Specified by:
validateModelin interfaceModelRestApi- Throws:
IOException
-
validateModelExtensions
public void validateModelExtensions(@PathVariable String modelId, @RequestPart("file") org.springframework.web.multipart.MultipartFile file, @RequestParam(value="projectId",required=false) String projectId) throws IOException - Specified by:
validateModelExtensionsin interfaceModelRestApi- Throws:
IOException
-
getGlobalModels
public org.springframework.hateoas.PagedModel<org.springframework.hateoas.EntityModel<Model>> getGlobalModels(@RequestParam("type") String type, @RequestParam(value="includeOrphans",required=false,defaultValue="false") boolean includeOrphans, org.springframework.data.domain.Pageable pageable) - Specified by:
getGlobalModelsin interfaceModelRestApi
-
putProjectModelRelationship
public org.springframework.hateoas.EntityModel<Model> putProjectModelRelationship(@PathVariable String projectId, @PathVariable String modelId, @RequestParam(value="scope",required=false) String scope, @RequestParam(value="force",required=false,defaultValue="false") boolean force) - Specified by:
putProjectModelRelationshipin interfaceModelRestApi
-
deleteProjectModelRelationship
public org.springframework.hateoas.EntityModel<Model> deleteProjectModelRelationship(@PathVariable String projectId, @PathVariable String modelId) - Specified by:
deleteProjectModelRelationshipin interfaceModelRestApi
-
createModelWithoutProject
- Specified by:
createModelWithoutProjectin interfaceModelRestApi
-
findModelById
-
findModelType
-