Class CmsCategory

java.lang.Object
org.opencms.relations.CmsCategory
All Implemented Interfaces:
Serializable, Comparable<CmsCategory>

public class CmsCategory extends Object implements Comparable<CmsCategory>, Serializable
Represents a category, that is just a folder.

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/.

Since:
6.9.2
See Also:
  • Constructor Details

    • CmsCategory

      public CmsCategory(CmsCategory other, String title, String description)
      Creates a new category based on another one, keeping everything except title and description, which are passed in separately.

      Parameters:
      other - the other category to copy fields from
      title - the new title
      description - the new description
    • CmsCategory

      public CmsCategory(CmsUUID structureId, String rootPath, String title, String description, String baseFolder) throws CmsException
      Default constructor.

      Parameters:
      structureId - the structure id of the resource that this category represents
      rootPath - the root path of the category folder
      title - the title of the category
      description - the description of the category
      baseFolder - the base categories folder
      Throws:
      CmsException - if the root path does not match the given base folder
    • CmsCategory

      protected CmsCategory()
      Empty default constructor which is only used for serialization.

  • Method Details