Package com.adobe.cq.projects.api
Interface Project
- 
- All Superinterfaces:
 Adaptable
public interface Project extends Adaptable
Defines the interface for a CQ Project. Note that all changes are transient and need to be committed by the caller, seeProjectManagerfor details. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProjectLinkaddLink(java.lang.String name, java.lang.String target)Creates a new link or updates an existing link for the specified target.ResourcegetAssetFolder()The Asset folder associated with this project.java.lang.StringgetDescription()Returns the description of the project.java.lang.Iterable<ProjectLink>getLinks()Returns the links that are associated with the project.java.util.Set<ProjectMember>getMembers()Return the members associated with the Project.ResourcegetProjectCover()Returns the resource representing the project's cover image.java.lang.StringgetTitle()Returns the title of the project.booleanisActive()indicates if the project is activevoidsetActive(boolean active)specifies if a project is activevoidsetDescription(java.lang.String description)Set a new description for the project.voidsetProjectCover(java.lang.String mimeType, java.io.InputStream stream)Associate a new image to this project's cover.voidsetTitle(java.lang.String name)Set a new title for the project.java.util.Collection<ProjectMember>updateMembers(java.util.List<java.lang.String> userIds, java.util.List<java.lang.String> roleIds)Update the Project's members with the set of users and their associated roles. 
 - 
 
- 
- 
Method Detail
- 
getTitle
java.lang.String getTitle()
Returns the title of the project.- Returns:
 - the title of the project.
 
 
- 
setTitle
void setTitle(java.lang.String name)
Set a new title for the project.- Parameters:
 name- the new name for the project- Throws:
 ProjectException- if the operation fails
 
- 
getDescription
java.lang.String getDescription()
Returns the description of the project.- Returns:
 - the description of the project.
 
 
- 
setDescription
void setDescription(java.lang.String description)
Set a new description for the project.- Parameters:
 description- the new description for the project- Throws:
 ProjectException- if the operation fails
 
- 
addLink
ProjectLink addLink(java.lang.String name, java.lang.String target)
Creates a new link or updates an existing link for the specified target.- Parameters:
 name- the suggested name of the new link.target- the target path or url of this link.- Returns:
 - the resource representing the link
 - Throws:
 ProjectException- if the operation fails
 
- 
getLinks
java.lang.Iterable<ProjectLink> getLinks()
Returns the links that are associated with the project.- Returns:
 - an iterator of the links associated with this project.
 - See Also:
 ProjectLink
 
- 
getAssetFolder
Resource getAssetFolder()
The Asset folder associated with this project. This folder is used when new assets are uploaded through the project interface.- Returns:
 - a 
Resourcefor the Asset folder associated with this project. 
 
- 
setProjectCover
void setProjectCover(java.lang.String mimeType, java.io.InputStream stream)Associate a new image to this project's cover. This call will replace the exist cover image asset and add it to the asset resource collection.- Parameters:
 mimeType- the mime type of the provided input streamstream- a stream of image data.- Throws:
 ProjectException- if updating the cover image fails.
 
- 
getProjectCover
Resource getProjectCover()
Returns the resource representing the project's cover image.- Returns:
 - a image asset resource, or null if there is no cover image specified.
 
 
- 
updateMembers
java.util.Collection<ProjectMember> updateMembers(java.util.List<java.lang.String> userIds, java.util.List<java.lang.String> roleIds)
Update the Project's members with the set of users and their associated roles.- Parameters:
 userIds- a list of user idsroleIds- a list of role ids- Returns:
 - the updated set of members.
 - Throws:
 ProjectException- if there are issues updating the members of the team.
 
- 
getMembers
java.util.Set<ProjectMember> getMembers()
Return the members associated with the Project.- Returns:
 - a set of of 
ProjectMembers. - Throws:
 ProjectException- if there are issues obtaining the members of theProject.
 
- 
setActive
void setActive(boolean active)
specifies if a project is active- Parameters:
 active- true when project is active
 
- 
isActive
boolean isActive()
indicates if the project is active- Returns:
 - true when project is active
 
 
 - 
 
 -