Package org.opencms.ui.apps
Class CmsAppCategory
- java.lang.Object
-
- org.opencms.ui.apps.CmsAppCategory
-
- All Implemented Interfaces:
I_CmsAppCategory
,I_CmsHasOrder
public class CmsAppCategory extends java.lang.Object implements I_CmsAppCategory
Bean representing a category for workplace apps.App categories should have a unique id. Nesting of categories is defined by the parent category id of each category. A category whose parent category id is null will be displayed at the root level, and similarly, a workplace app whose category id is null will be displayed at the root level.
-
-
Constructor Summary
Constructors Constructor Description CmsAppCategory(java.lang.String id, java.lang.String parentId, int order, int priority)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getId()
Returns the id.java.lang.String
getName(java.util.Locale locale)
Gets the user readable name for the category for a given locale.int
getOrder()
Gets an integer used to sort items.java.lang.String
getParentId()
Returns the parentId.int
getPriority()
Returns the priority.
-
-
-
Constructor Detail
-
CmsAppCategory
public CmsAppCategory(java.lang.String id, java.lang.String parentId, int order, int priority)
Creates a new instance.- Parameters:
id
- the category idparentId
- the parent category idorder
- the orderpriority
- the priority
-
-
Method Detail
-
getId
public java.lang.String getId()
Description copied from interface:I_CmsAppCategory
Returns the id.- Specified by:
getId
in interfaceI_CmsAppCategory
- Returns:
- the id
- See Also:
I_CmsAppCategory.getId()
-
getName
public java.lang.String getName(java.util.Locale locale)
Description copied from interface:I_CmsAppCategory
Gets the user readable name for the category for a given locale.- Specified by:
getName
in interfaceI_CmsAppCategory
- Parameters:
locale
- the locale for which to get the name- Returns:
- the localized name
- See Also:
I_CmsAppCategory.getName(java.util.Locale)
-
getOrder
public int getOrder()
Description copied from interface:I_CmsHasOrder
Gets an integer used to sort items.- Specified by:
getOrder
in interfaceI_CmsHasOrder
- Returns:
- the integer used as a sort key
- See Also:
I_CmsHasOrder.getOrder()
-
getParentId
public java.lang.String getParentId()
Description copied from interface:I_CmsAppCategory
Returns the parentId.App categories can be nested. The method must return the id of the parent category if the category is nested. If it is on top level,
null
should be returned.- Specified by:
getParentId
in interfaceI_CmsAppCategory
- Returns:
- the parentId
- See Also:
I_CmsAppCategory.getParentId()
-
getPriority
public int getPriority()
Description copied from interface:I_CmsAppCategory
Returns the priority.If more than one category with the same id is present, the one with higher priority is shown. The other categories with this id are discarded.
- Specified by:
getPriority
in interfaceI_CmsAppCategory
- Returns:
- the priority
- See Also:
I_CmsAppCategory.getPriority()
-
-