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 forModelresources
-
-
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_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_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
Constructors Constructor Description ModelController(ModelService modelService, ModelTypeService modelTypeService, ModelRepresentationModelAssembler representationModelAssembler, AlfrescoPagedModelAssembler<Model> pagedCollectionModelAssembler, ModelTypeRepresentationModelAssembler modelTypeAssembler, PagedModelTypeAssembler pagedModelTypeAssembler, ProjectController projectController)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.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(javax.servlet.http.HttpServletResponse response, String modelId, boolean attachment)ModelfindModelById(String modelId)ModelTypefindModelType(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>getModel(String modelId)voidgetModelContent(javax.servlet.http.HttpServletResponse response, String modelId)voidgetModelDiagram(javax.servlet.http.HttpServletResponse response, String modelId)org.springframework.hateoas.PagedModel<org.springframework.hateoas.EntityModel<Model>>getModels(String projectId, String type, 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 Detail
-
ModelController
public ModelController(ModelService modelService, ModelTypeService modelTypeService, ModelRepresentationModelAssembler representationModelAssembler, AlfrescoPagedModelAssembler<Model> pagedCollectionModelAssembler, ModelTypeRepresentationModelAssembler modelTypeAssembler, PagedModelTypeAssembler pagedModelTypeAssembler, ProjectController projectController)
-
-
Method Detail
-
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
-
getModel
public org.springframework.hateoas.EntityModel<Model> getModel(@PathVariable String modelId)
- 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
public void deleteModel(@PathVariable String modelId)- Specified by:
deleteModelin interfaceModelRestApi
-
getModelContent
public void getModelContent(javax.servlet.http.HttpServletResponse response, @PathVariable String modelId) throws IOException- Specified by:
getModelContentin interfaceModelRestApi- Throws:
IOException
-
getModelDiagram
public void getModelDiagram(javax.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(javax.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
public org.springframework.hateoas.EntityModel<Model> createModelWithoutProject(Model model)
- Specified by:
createModelWithoutProjectin interfaceModelRestApi
-
-