Package com.adobe.cq.projects.api
Interface Project
- All Superinterfaces:
Adaptable
Defines the interface for a CQ Project.
Note that all changes are transient and need to be committed by the caller, see
ProjectManager for details.-
Method Summary
Modifier and TypeMethodDescriptionCreates a new link or updates an existing link for the specified target.The Asset folder associated with this project.Returns the description of the project.getLinks()Returns the links that are associated with the project.Return the members associated with the Project.Returns the resource representing the project's cover image.getTitle()Returns the title of the project.booleanisActive()indicates if the project is activevoidsetActive(boolean active) specifies if a project is activevoidsetDescription(String description) Set a new description for the project.voidsetProjectCover(String mimeType, InputStream stream) Associate a new image to this project's cover.voidSet a new title for the project.updateMembers(List<String> userIds, List<String> roleIds) Update the Project's members with the set of users and their associated roles.
-
Method Details
-
getTitle
String getTitle()Returns the title of the project.- Returns:
- the title of the project.
-
setTitle
Set a new title for the project.- Parameters:
name- the new name for the project- Throws:
ProjectException- if the operation fails
-
getDescription
String getDescription()Returns the description of the project.- Returns:
- the description of the project.
-
setDescription
Set a new description for the project.- Parameters:
description- the new description for the project- Throws:
ProjectException- if the operation fails
-
addLink
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
Iterable<ProjectLink> getLinks()Returns the links that are associated with the project.- Returns:
- an iterator of the links associated with this project.
- See Also:
-
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
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
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
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
-