Class CmsContentFolderDescriptor


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

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELEMENTS_FOLDER_NAME
      Name of the folder for elements stored with container pages.
    • Constructor Detail

      • CmsContentFolderDescriptor

        public CmsContentFolderDescriptor​(java.lang.String basePath,
                                          java.lang.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 Detail

      • getBasePath

        public java.lang.String getBasePath()
        Gets the base path.

        Returns:
        the base path
      • getFolderName

        public java.lang.String getFolderName()
        Gets the relative folder name if available, else null.

        Returns:
        the relative folder name null
      • getFolderPath

        public java.lang.String getFolderPath​(CmsObject cms,
                                              java.lang.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