public class CmsCategory extends java.lang.Object implements java.lang.Comparable<CmsCategory>, java.io.Serializable
The category can be centralized under /system/categories/,
or decentralized in every folder.
For instance, you can have a category folder under /sites/default/
so, any file under /sites/default/ could be assigned to any
category defined under /system/categories/ or
/sites/default/categories.
But a file under /sites/othersite/ will only be assignable to
categories defined in /system/categories/.
| 限定符 | 构造器和说明 |
|---|---|
protected |
CmsCategory()
Empty default constructor which is only used for serialization.
|
|
CmsCategory(CmsUUID structureId,
java.lang.String rootPath,
java.lang.String title,
java.lang.String description,
java.lang.String baseFolder)
Default constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
compareTo(CmsCategory cat) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getBasePath()
Returns the category's base path.
|
static java.lang.String |
getCategoryPath(java.lang.String rootPath,
java.lang.String baseFolder)
Returns the category path for the given root path.
|
java.lang.String |
getDescription()
Returns the description.
|
CmsUUID |
getId()
Returns the id.
|
java.lang.String |
getName()
Returns the mere category name without it's complete path and without the trailing folder - slash.
|
java.lang.String |
getPath()
Returns the path.
|
java.lang.String |
getRootPath()
Returns the category's root path.
|
java.lang.String |
getTitle()
Returns the title.
|
int |
hashCode() |
public CmsCategory(CmsUUID structureId, java.lang.String rootPath, java.lang.String title, java.lang.String description, java.lang.String baseFolder) throws CmsException
structureId - the structure id of the resource that this category representsrootPath - the root path of the category foldertitle - the title of the categorydescription - the description of the categorybaseFolder - the base categories folderCmsException - if the root path does not match the given base folderprotected CmsCategory()
public static java.lang.String getCategoryPath(java.lang.String rootPath,
java.lang.String baseFolder)
throws CmsException
rootPath - the root pathbaseFolder - the categories base folder nameCmsException - if the root path does not match the given base folderpublic int compareTo(CmsCategory cat)
compareTo 在接口中 java.lang.Comparable<CmsCategory>Comparable.compareTo(java.lang.Object)public boolean equals(java.lang.Object obj)
equals 在类中 java.lang.ObjectObject.equals(java.lang.Object)public java.lang.String getBasePath()
public java.lang.String getDescription()
public CmsUUID getId()
public java.lang.String getName()
public java.lang.String getPath()
public java.lang.String getRootPath()
public java.lang.String getTitle()
public int hashCode()
hashCode 在类中 java.lang.ObjectObject.hashCode()