Package org.opencms.ade.configuration
Class CmsContentFolderDescriptor
- java.lang.Object
-
- org.opencms.ade.configuration.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 Summary
Constructors Constructor Description CmsContentFolderDescriptor(java.lang.String basePath, java.lang.String name)
Creates an instance based on a relative folder name.CmsContentFolderDescriptor(CmsResource folder)
Creates an instance based on an existing folder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CmsContentFolderDescriptor
createPageRelativeFolderDescriptor()
Creates folder descriptor which represents the 'page relative' setting.java.lang.String
getBasePath()
Gets the base path.CmsResource
getFolder()
Gets the folder.java.lang.String
getFolderName()
Gets the relative folder name if available, else null.java.lang.String
getFolderPath(CmsObject cms, java.lang.String pageFolderPath)
Computes the folder root path.boolean
isFolder()
Returns true if the current instance was created with a folder structure id parameter.boolean
isName()
Returns true if this instance was created with a folder name parameter.boolean
isPageRelative()
Returns true if this page descriptor represents the 'page relative' setting.
-
-
-
Field Detail
-
ELEMENTS_FOLDER_NAME
public static final java.lang.String ELEMENTS_FOLDER_NAME
Name of the folder for elements stored with container pages.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsContentFolderDescriptor
public CmsContentFolderDescriptor(CmsResource folder)
Creates an instance based on an existing folder.- Parameters:
folder
- the folder
-
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 toname
- the relative folder name
-
-
Method Detail
-
createPageRelativeFolderDescriptor
public static CmsContentFolderDescriptor createPageRelativeFolderDescriptor()
Creates folder descriptor which represents the 'page relative' setting.- Returns:
- the folder descriptor for the 'page relative' setting
-
getBasePath
public java.lang.String getBasePath()
Gets the base path.- Returns:
- the base path
-
getFolder
public CmsResource getFolder()
Gets the folder.- Returns:
- the folder
-
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 usepageFolderPath
- 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
-
-