Class SubFolderJcrAttachmentsProvider

All Implemented Interfaces:
IPageFlowScopeAdapter, IAttachmentsProvider, IWebDavAwareAttachmentsProvider, Serializable

public class SubFolderJcrAttachmentsProvider extends JcrAttachmentsProvider
Content provider for exposing the children of a JCR node subfolder for use with the CAF AttachmentsPanel control. If a subfolder whose name matches the subFolderName does not exist, the folder is created (if permissions allow it).
Since:
8.0
See Also:
  • Field Details

    • subFolderName

      protected String subFolderName
      The subfolder name
  • Constructor Details

    • SubFolderJcrAttachmentsProvider

      public SubFolderJcrAttachmentsProvider()
  • Method Details

    • getSubFolderName

      public String getSubFolderName()
      Returns the subfolder name
      Returns:
      the subFolderName
    • setSubFolderName

      public void setSubFolderName(String subFolderName)
      Sets the subfolder name
      Parameters:
      subFolderName - the subFolderName to set
    • getOrCreateSubFolderNode

      protected javax.jcr.Node getOrCreateSubFolderNode(javax.jcr.Node parentNode) throws javax.jcr.RepositoryException, javax.jcr.PathNotFoundException, javax.jcr.ItemExistsException, javax.jcr.nodetype.NoSuchNodeTypeException, javax.jcr.lock.LockException, javax.jcr.version.VersionException, javax.jcr.nodetype.ConstraintViolationException
      Get the subfolder if it already exists, or creates it if it does not exist.
      Parameters:
      parentNode - the parentNode of the attachments subfolder
      Throws:
      javax.jcr.RepositoryException
      javax.jcr.PathNotFoundException
      javax.jcr.ItemExistsException
      javax.jcr.nodetype.NoSuchNodeTypeException
      javax.jcr.lock.LockException
      javax.jcr.version.VersionException
      javax.jcr.nodetype.ConstraintViolationException
    • getParentNode

      public javax.jcr.Node getParentNode()
      Description copied from class: JcrAttachmentsProvider
      Returns a reference to the JCR Node that is the parent of the attachments.
      Overrides:
      getParentNode in class JcrAttachmentsProvider
      Returns:
      the parentNode