Package org.opencms.ade.galleries.shared
Class CmsGalleryTabConfiguration
java.lang.Object
org.opencms.ade.galleries.shared.CmsGalleryTabConfiguration
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable
public class CmsGalleryTabConfiguration
extends Object
implements com.google.gwt.user.client.rpc.IsSerializable
A bean containing a configuration for the gallery dialog's available tabs,
consisting of a list of tabs and a default tab to display first.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Map<String,
CmsGalleryTabConfiguration> The map containing the predefined tab configurations.The id of the default tab.static final String
Gallery configuration id.static final String
Gallery configuration id.static final String
Gallery configuration id.static final String
Gallery configuration id.static final String
Gallery confiugration id.static final String
Gallery configuration id. -
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructor for serialization.Creates a new gallery tab configuration based on a list of tabs. -
Method Summary
Modifier and TypeMethodDescriptionstatic CmsGalleryTabConfiguration
Gets the default tab configuration.Gets the default tab.getTabs()
Gets the list of tabs.static CmsGalleryTabConfiguration
Creates a gallery tab configuration from a configuration string.parseTabId
(String tabId) Parses a tab id from a gallery configuration string.static CmsGalleryTabConfiguration
Given a string which is either the name of a predefined tab configuration or a configuration string, returns the corresponding tab configuration.Creates a new tab configuration based on this one, but changes its default tab.
-
Field Details
-
DEFAULT_CONFIGURATIONS
The map containing the predefined tab configurations. -
TC_ADE_ADD
Gallery configuration id.- See Also:
-
TC_FOLDERS
Gallery configuration id.- See Also:
-
TC_GALLERIES
Gallery configuration id.- See Also:
-
TC_SELECT_ALL
Gallery configuration id.- See Also:
-
TC_SELECT_DOC
Gallery configuration id.- See Also:
-
TC_SELECT_ALL_NO_SITEMAP
Gallery confiugration id.- See Also:
-
m_defaultTab
The id of the default tab.
-
-
Constructor Details
-
CmsGalleryTabConfiguration
Creates a new gallery tab configuration based on a list of tabs.- Parameters:
tabsList
- the list of tabs
-
CmsGalleryTabConfiguration
protected CmsGalleryTabConfiguration()Default constructor for serialization.
-
-
Method Details
-
getDefault
Gets the default tab configuration.- Returns:
- the default tab configuration
-
parse
Creates a gallery tab configuration from a configuration string.The string should consist of a comma-separated list of tab ids, omitting the cms_tab_ prefix of the corresponding enum values. The tab which should be used as a default tab should be prefixed with an asterisk '*'.
- Parameters:
configStr
- the configuration string- Returns:
- the parsed tab configuration
-
parseTabId
Parses a tab id from a gallery configuration string.- Parameters:
tabId
- the tab id to parse- Returns:
- the gallery tab id enum value
-
resolve
Given a string which is either the name of a predefined tab configuration or a configuration string, returns the corresponding tab configuration.- Parameters:
configStr
- a configuration string or predefined configuration name- Returns:
- the gallery tab configuration
-
getDefaultTab
Gets the default tab.- Returns:
- the default tab
-
getTabs
Gets the list of tabs.- Returns:
- the list of tabs
-