Package org.opencms.ade.configuration
Class CmsElementView
java.lang.Object
org.opencms.ade.configuration.CmsElementView
Represents a element view for the container page editor.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The element view comparator. -
Field Summary
Modifier and TypeFieldDescriptionstatic final CmsElementView
The default element view.static final int
Default order if not configured.static final String
The default element view title key.static final String
The order node.static final String
The title node.static final String
The title key node.static final String
Special value indicating that no view is selected (used for parent view selection). -
Constructor Summary
ConstructorDescriptionCmsElementView
(CmsObject cms, CmsResource resource) Constructor.Creates a new view with the given id, but initializes no other fields.CmsElementView
(CmsExplorerTypeSettings explorerType) Creates a new element view based on the given explorer type. -
Method Summary
Modifier and TypeMethodDescriptionGets the explorer type settings.static CmsUUID
getExplorerTypeViewId
(String typeName) Helper method to compute the uuid for views based on explorer types.getId()
Returns the element view id.int
getOrder()
The order.Gets the parent view id (null if there is no parent view).Returns the element view resource.Returns the element view title.boolean
hasPermission
(CmsObject cms, CmsResource folder) Checks whether the current user has permissions to use the element view.boolean
isOther()
'Other types' view, for everything that isn't assigned to any other view.
-
Field Details
-
DEFAULT_ELEMENT_VIEW
The default element view. -
DEFAULT_ORDER
Default order if not configured.- See Also:
-
GUI_ELEMENT_VIEW_DEFAULT_TITLE_0
The default element view title key.- See Also:
-
N_ORDER
The order node.- See Also:
-
N_TITLE
The title node.- See Also:
-
N_TITLE_KEY
The title key node.- See Also:
-
PARENT_NONE
Special value indicating that no view is selected (used for parent view selection).- See Also:
-
-
Constructor Details
-
CmsElementView
Creates a new element view based on the given explorer type.- Parameters:
explorerType
- the explorer type
-
CmsElementView
Constructor.- Parameters:
cms
- the cms contextresource
- the group resource- Throws:
Exception
- if parsing the resource fails
-
CmsElementView
Creates a new view with the given id, but initializes no other fields.- Parameters:
id
- the id
-
-
Method Details
-
getExplorerTypeViewId
Helper method to compute the uuid for views based on explorer types.- Parameters:
typeName
- the explorer type name- Returns:
- the element view id computed from the type name
-
getExplorerType
Gets the explorer type settings.- Returns:
- the explorer type
-
getId
Returns the element view id.- Returns:
- the group id
-
getOrder
The order.- Returns:
- the order
-
getParentViewId
Gets the parent view id (null if there is no parent view).- Returns:
- the parent view id
-
getResource
Returns the element view resource.- Returns:
- the element view resource
-
getTitle
Returns the element view title.- Parameters:
cms
- the cms contextlocale
- the locale- Returns:
- the title
-
hasPermission
Checks whether the current user has permissions to use the element view.- Parameters:
cms
- the cms contextfolder
- used for permission checks for explorertype based views- Returns:
true
if the current user has permissions to use the element view
-
isOther
'Other types' view, for everything that isn't assigned to any other view.- Returns:
- true if this is the 'other types' view
-