Class CmsContentFolderDescriptor

java.lang.Object
org.opencms.ade.configuration.CmsContentFolderDescriptor

public class CmsContentFolderDescriptor extends Object
A bean which represents the location configured for content elements of a specific type in a sitemap configuration.

  • Field Details

  • Constructor Details

    • CmsContentFolderDescriptor

      Creates an instance based on an existing folder.

      Parameters:
      folder - the folder
    • CmsContentFolderDescriptor

      public CmsContentFolderDescriptor(String basePath, String name)
      Creates an instance based on a relative folder name.

      Parameters:
      basePath - the base path which the folder name is relative to
      name - the relative folder name
  • Method Details

    • createPageRelativeFolderDescriptor

      Creates folder descriptor which represents the 'page relative' setting.

      Returns:
      the folder descriptor for the 'page relative' setting
    • getBasePath

      public String getBasePath()
      Gets the base path.

      Returns:
      the base path
    • getFolder

      Gets the folder.

      Returns:
      the folder
    • getFolderName

      Gets the relative folder name if available, else null.

      Returns:
      the relative folder name null
    • getFolderPath

      public String getFolderPath(CmsObject cms, String pageFolderPath)
      Computes the folder root path.

      Parameters:
      cms - the CMS context to use
      pageFolderPath - the root path of the folder containing the current container page
      Returns:
      the folder root path
    • isFolder

      public boolean isFolder()
      Returns true if the current instance was created with a folder structure id parameter.

      Returns:
      true if this instance was created with a folder structure id parameter
    • isName

      public boolean isName()
      Returns true if this instance was created with a folder name parameter.

      Returns:
      true if this instance was created with a folder name parameter
    • isPageRelative

      public boolean isPageRelative()
      Returns true if this page descriptor represents the 'page relative' setting.

      Returns:
      true if this is page relative