@ProviderType
public interface ProjectManager
ProjectManager
provides the ability to retrieve projects,
delete projects, and create projects.
ProjectManager
instances are adapted from ResourceResolver
.
Note that Projects can also be adapted from a Resource
if that resource represents a Project.
Note that all changes are transient and need to be committed by the caller. For example:
ResourceResolver resourceResolver = ... ProjectManager pm = resourceResolver.adaptTo(ProjectManager.class); Project project = pm.createProject("Test 1"); project.setDescription("This is a test project"); resourceResolver.commit();
ResourceResolver
,
Resource
Modifier and Type | Method and Description |
---|---|
Project |
createProject(java.lang.String title,
java.lang.String templatePath)
Creates a new project with the specified title.
|
Project |
createProject(java.lang.String nodeName,
java.lang.String title,
java.lang.String templatePath)
Creates a new project with the specified title.
|
Project |
createProject(java.lang.String parentPath,
java.lang.String nodeName,
java.lang.String title,
java.lang.String templatePath)
Creates a new project with the specified root folder, title and template.
|
Project |
createProjectFromMasterProject(java.lang.String parentPath,
java.lang.String nodeName,
java.lang.String title,
java.lang.String templatePath,
java.lang.String description,
Project masterProject,
boolean useDefaultCoverImage)
Creates a new project from Master Project with the specified root folder, title and template.
|
void |
deleteProject(Project project)
Deletes the specified project.
|
java.util.Iterator<Resource> |
getChildren(java.lang.String folderPath,
ProjectFilter filter,
int startIndex,
int limit)
Retrieves an iterator over project and folder resources in the specified folder.
|
java.util.Iterator<Project> |
getProjects(ProjectFilter filter,
int startIndex,
int limit)
Retrieves an iterator over projects that are accessible by the current user.
|
java.util.List<WorkflowModel> |
getWorkflows(Project project)
Return the list of workflows that are available for the project.
|
java.util.Iterator<Project> getProjects(ProjectFilter filter, int startIndex, int limit)
filter
- used to filter the list of returned projectsstartIndex
- the index of the first project to retrievelimit
- the maximum number of projects to retrieveProjectException
- if the loading of the projects fails.java.util.Iterator<Resource> getChildren(java.lang.String folderPath, ProjectFilter filter, int startIndex, int limit)
folderPath
- root path where to start iterating fromfilter
- used to filter the list of returned projectsstartIndex
- the index of the first project to retrieve. A negative value behaves the same as a value
of 0.limit
- the maximum number of projects to retrieve. A negative value means no limit.ProjectException
- if the loading of the projects fails.void deleteProject(Project project)
project
- the project to delete.ProjectException
- if the project can not be deleted, for example due to access restrictions.Project createProject(java.lang.String title, java.lang.String templatePath)
title
- the title of the new projecttemplatePath
- the path of the template to create
the project with.ProjectException
- in case an error occurred.Project createProject(java.lang.String nodeName, java.lang.String title, java.lang.String templatePath)
nodeName
- the name of the node that will be created. If a node
exists with the current name a unique name will be generated
with the nodeName as the prefix.title
- the title of the new projecttemplatePath
- the path of the template to create
the project with.ProjectException
- in case an error occurred.Project createProject(java.lang.String parentPath, java.lang.String nodeName, java.lang.String title, java.lang.String templatePath)
parentPath
- the parent path of where this project will be created.nodeName
- the name of the node that will be created. If a node
exists with the current name a unique name will be generated
with the nodeName as the prefix.title
- the title of the new projecttemplatePath
- the path of the template to create
the project with.ProjectException
- in case an error occurred.Project createProjectFromMasterProject(java.lang.String parentPath, java.lang.String nodeName, java.lang.String title, java.lang.String templatePath, java.lang.String description, Project masterProject, boolean useDefaultCoverImage)
parentPath
- the parent path of where this project will be created.nodeName
- the name of the node that will be created. If a node exists with the current
name a unique name will be generated with the nodeName as the prefix.title
- the title of the new projecttemplatePath
- the path of the template to create the project with.description
- the description of the new projectmasterProject
- the Master Project which would be used to create the new projectuseDefaultCoverImage
- whether to use default cover image or notjava.util.List<WorkflowModel> getWorkflows(Project project)
project
- the project which to retrieve the available
WorkflowModel
s for.WorkflowModel
s.Copyright © 2010 - 2020 Adobe. All Rights Reserved