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, see ProjectManager for details.
  • Method Details

    • 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:
    • 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 stream
      stream - 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 ids
      roleIds - 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 the Project.
    • 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