Interface ProjectLink

All Superinterfaces:
Adaptable

public interface ProjectLink extends Adaptable
Defines the interface for a CQ Project Link. Note that all changes are transient and need to be committed by the caller, see ProjectManager for details.
  • Method Details

    • getProject

      Project getProject()
      Returns the project that this link is associated with.
      Returns:
      the project that this link is associated with.
    • getTarget

      String getTarget()
      Returns the target path or url of this link.
      Returns:
      the target path or url of this link.
    • setTarget

      void setTarget(String target)
      Set the target path or url for this link.
      Parameters:
      target - the target path or url for this link
    • getTitle

      String getTitle()
      Returns the title of the link.
      Returns:
      the title of the link.
    • setTitle

      void setTitle(String title)
      Set a new title for the link.
      Parameters:
      title - the new name for the link
      Throws:
      ProjectException - if the operation fails
    • getResolvedTitle

      String getResolvedTitle()
      Returns the title of the target of this link if no title was set on this link. If a title was set on this link with setTitle(java.lang.String) then that title will be returned, otherwise the title of the target resource will be returned. E.g. If the link points to a cq:Page the page's title will be returned, similarly if the link points to an Asset the asset's title will be returned.
      Returns:
      the resolved title for this link.
    • getDescription

      String getDescription()
      Returns the description of the link.
      Returns:
      the description of the link.
    • setDescription

      void setDescription(String description)
      Set a new description for the link.
      Parameters:
      description - the new description for the link
      Throws:
      ProjectException - if the operation fails
    • setCoverImage

      void setCoverImage(String mimeType, InputStream stream)
      Associate a new image to this link'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.
    • getCoverImage

      Resource getCoverImage()
      Returns the resource representing the project's cover image.
      Returns:
      a image asset resource, or null if there is no cover image specified.