Class ProjectServiceImpl
java.lang.Object
org.activiti.cloud.services.modeling.service.ProjectServiceImpl
- All Implemented Interfaces:
ProjectService
@PreAuthorize("hasRole(\'ACTIVITI_MODELER\')")
public class ProjectServiceImpl
extends Object
implements ProjectService
Business logic related to
Project entities-
Constructor Summary
ConstructorsConstructorDescriptionProjectServiceImpl(ProjectRepository projectRepository, ModelService modelService, ModelTypeService modelTypeService, JsonConverter<ProjectDescriptor> descriptorJsonConverter, JsonConverter<Project> jsonConverter, JsonConverter<Map> jsonMetadataConverter, Set<ProjectValidator> projectValidators, ProjectFilterService projectFilterService, ProjectDecoratorService projectDecoratorService) -
Method Summary
Modifier and TypeMethodDescriptioncopyProject(Project projectToCopy, String newProjectName) createProject(Project project) Create an project.org.springframework.data.domain.Page<Project> decorateAll(org.springframework.data.domain.Page<Project> projects, List<String> include) voiddeleteProject(Project project) Delete an project.org.activiti.cloud.services.common.file.FileContentexportProject(Project project) Export an project to a zip file.findProjectById(String projectId, List<String> include) Find an project by id.getFilteredProjectIds(List<String> filters) getProjectAccessControl(Project project) org.springframework.data.domain.Page<Project> getProjects(org.springframework.data.domain.Pageable pageable, String name, List<String> filters, List<String> include) Get a page of projects.importProject(InputStream file, String name) Import a project from a zip inputstream.importProject(org.springframework.web.multipart.MultipartFile file, String name) Import an project form a zip multipart file.replaceProjectContentWithProvidedModelsInFile(Project project, InputStream inputStream) updateProject(Project projectToUpdate, Project newProject) Update an project.voidvalidateProject(Project project) voidvalidateProjectIgnoreWarnings(Project project) validateProjectName(Project project) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.activiti.cloud.services.modeling.service.api.ProjectService
findProjectById
-
Constructor Details
-
ProjectServiceImpl
public ProjectServiceImpl(ProjectRepository projectRepository, ModelService modelService, ModelTypeService modelTypeService, JsonConverter<ProjectDescriptor> descriptorJsonConverter, JsonConverter<Project> jsonConverter, JsonConverter<Map> jsonMetadataConverter, Set<ProjectValidator> projectValidators, ProjectFilterService projectFilterService, ProjectDecoratorService projectDecoratorService)
-
-
Method Details
-
getProjects
public org.springframework.data.domain.Page<Project> getProjects(org.springframework.data.domain.Pageable pageable, String name, List<String> filters, List<String> include) Get a page of projects.- Specified by:
getProjectsin interfaceProjectService- Parameters:
pageable- the pagination information- Returns:
- the page
-
createProject
Create an project.- Specified by:
createProjectin interfaceProjectService- Parameters:
project- the project to create- Returns:
- the created project
-
updateProject
Update an project.- Specified by:
updateProjectin interfaceProjectService- Parameters:
projectToUpdate- the project to updatenewProject- the project containing the new values to be used for update- Returns:
- the the updated project
-
deleteProject
Delete an project.- Specified by:
deleteProjectin interfaceProjectService- Parameters:
project- the project to be deleted
-
findProjectById
Find an project by id.- Specified by:
findProjectByIdin interfaceProjectService- Parameters:
projectId- the id to search for- Returns:
- the found project, or Optional#empty()
-
exportProject
public org.activiti.cloud.services.common.file.FileContent exportProject(Project project) throws IOException Export an project to a zip file.- Specified by:
exportProjectin interfaceProjectService- Parameters:
project- the project to export- Returns:
- the
FileContentwith zip content - Throws:
IOException- in case of I/O error
-
copyProject
- Specified by:
copyProjectin interfaceProjectService
-
getProjectAccessControl
- Specified by:
getProjectAccessControlin interfaceProjectService
-
importProject
public Project importProject(org.springframework.web.multipart.MultipartFile file, @Nullable String name) throws IOException Import an project form a zip multipart file.- Specified by:
importProjectin interfaceProjectService- Parameters:
file- the multipart zip file to import fromname- the name of the new project that will be set if provided- Returns:
- the imported project
- Throws:
IOException- in case of multipart file input stream access error
-
importProject
Import a project from a zip inputstream.- Specified by:
importProjectin interfaceProjectService- Parameters:
file- the InputStream zip file to import fromname- the name of the new project that will be set if provided- Returns:
- the imported project
- Throws:
IOException- in case of InputStream access error
-
validateProjectName
-
validateProject
- Specified by:
validateProjectin interfaceProjectService
-
validateProjectIgnoreWarnings
- Specified by:
validateProjectIgnoreWarningsin interfaceProjectService
-
replaceProjectContentWithProvidedModelsInFile
public Project replaceProjectContentWithProvidedModelsInFile(Project project, InputStream inputStream) throws IOException - Specified by:
replaceProjectContentWithProvidedModelsInFilein interfaceProjectService- Throws:
IOException
-
getFilteredProjectIds
-
decorate
-
decorateAll
-