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, seeProjectManager
for details.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProjectLink
addLink(String name, String target)
Creates a new link or updates an existing link for the specified target.Resource
getAssetFolder()
The Asset folder associated with this project.String
getDescription()
Returns the description of the project.Iterable<ProjectLink>
getLinks()
Returns the links that are associated with the project.Set<ProjectMember>
getMembers()
Return the members associated with the Project.Resource
getProjectCover()
Returns the resource representing the project's cover image.String
getTitle()
Returns the title of the project.boolean
isActive()
indicates if the project is activevoid
setActive(boolean active)
specifies if a project is activevoid
setDescription(String description)
Set a new description for the project.void
setProjectCover(String mimeType, InputStream stream)
Associate a new image to this project's cover.void
setTitle(String name)
Set a new title for the project.Collection<ProjectMember>
updateMembers(List<String> userIds, List<String> roleIds)
Update the Project's members with the set of users and their associated roles.
-
-
-
Method Detail
-
getTitle
String getTitle()
Returns the title of the project.- Returns:
- the title of the project.
-
setTitle
void setTitle(String name)
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
void setDescription(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(String name, 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
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
Resource
for the Asset folder associated with this project.
-
setProjectCover
void setProjectCover(String mimeType, 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
Collection<ProjectMember> updateMembers(List<String> userIds, List<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
Set<ProjectMember> getMembers()
Return the members associated with the Project.- Returns:
- a set of of
ProjectMember
s. - 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
-
-