public class CmsExplorerTypeSettings extends java.lang.Object implements java.lang.Comparable<CmsExplorerTypeSettings>, java.io.Serializable
Objects of this type are sorted by their order value which specifies the order in the new resource dialog.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ICON_STYLE_DEFAULT_BIG
The default big file type icon style class.
|
static java.lang.String |
ICON_STYLE_DEFAULT_SMALL
The default small file type icon style class.
|
static java.lang.String |
ICON_STYLE_MODEL_GROUP_COPY_BIG
The model group reuse big file type icon style class.
|
static java.lang.String |
ICON_STYLE_MODEL_GROUP_COPY_SMALL
The model group reuse small file type icon style class.
|
static java.lang.String |
ICON_STYLE_NAV_LEVEL_BIG
The nav level big file type icon style class.
|
static java.lang.String |
ICON_STYLE_NAV_LEVEL_SMALL
The nav level small file type icon style class.
|
static int |
ORDER_VALUE_DEFAULT_START
The default order start value for context menu entries.
|
static java.lang.String |
ORDER_VALUE_SEPARATOR_DEFAULT
The default order value for context menu separator entries without order attribute.
|
| Constructor and Description |
|---|
CmsExplorerTypeSettings()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addIconRule(java.lang.String extension,
java.lang.String icon,
java.lang.String bigIcon,
java.lang.String smallIconStyle,
java.lang.String bigIconStyle)
Adds a new icon rule to this explorer type.
|
boolean |
addProperty(java.lang.String propertyName)
Adds a property definition name to the list of editable properties.
|
java.lang.Object |
clone() |
int |
compareTo(CmsExplorerTypeSettings other) |
boolean |
equals(java.lang.Object o) |
CmsExplorerTypeAccess |
getAccess()
Gets the access object of the type settings.
|
java.lang.String |
getBigIcon()
Returns the big icon.
|
java.lang.String |
getBigIconStyle()
Returns the big icon CSS style class.
|
static java.lang.Integer |
getDefaultViewOrder(java.lang.String typeName)
Gets the default view order for the given type name (or null, if there is no default view order).
|
java.lang.String |
getElementView()
Gets the element view name.
|
java.lang.String |
getIcon()
Returns the icon path and file name of the explorer type setting.
|
java.util.Map<java.lang.String,CmsIconRule> |
getIconRules()
Returns a map from file extensions to icon rules for this explorer type.
|
java.lang.String |
getInfo()
Returns the info.
|
java.lang.String |
getKey()
Returns the key name of the explorer type setting.
|
java.lang.String |
getName()
Returns the name of the explorer type setting.
|
java.lang.String |
getNamePattern()
Gets the name pattern.
|
java.lang.String |
getNewResourceOrder()
Returns the order for the new resource dialog of the explorer type setting.
|
java.lang.String |
getOriginalIcon()
Gets the original icon name from the configuration.
|
java.util.List<java.lang.String> |
getProperties()
Returns the list of properties of the explorer type setting.
|
java.lang.String |
getReference()
Returns the reference of the explorer type setting.
|
java.lang.String |
getSmallIconStyle()
Returns the small icon CSS style class.
|
java.lang.String |
getTitleKey()
Returns the titleKey.
|
java.lang.Integer |
getViewOrder(boolean useDefault)
Gets the view order, optionally using a default value if the view order is not configured.
|
boolean |
hasEditOptions()
Returns true if this explorer type entry has explicit edit options set.
|
int |
hashCode() |
boolean |
isAddititionalModuleExplorerType()
Indicates that this is an additional explorer type which is defined in a module.
|
boolean |
isAutoSetNavigation()
Returns true if navigation properties should automatically be added on resource creation.
|
boolean |
isAutoSetTitle()
Returns true if the title property should automatically be added on resource creation.
|
boolean |
isCreatable()
Returns if this type is creatable.
|
boolean |
isEditable(CmsObject cms,
CmsResource resource)
Checks if the current user has write permissions on the given resource.
|
boolean |
isPropertiesEnabled()
Returns if this explorer type setting uses a special properties dialog.
|
boolean |
isShowNavigation()
Returns if this explorer type setting displays the navigation properties in the special properties dialog.
|
boolean |
isView()
Returns true if this explorer type represents a view.
|
void |
setAccess(CmsExplorerTypeAccess access)
Sets the access object of the type settings.
|
void |
setAddititionalModuleExplorerType(boolean addititionalModuleExplorerType)
Sets the additional explorer type flag.
|
void |
setAutoSetNavigation(java.lang.String autoSetNavigation)
Sets if navigation properties should automatically be added on resource creation.
|
void |
setAutoSetTitle(java.lang.String autoSetTitle)
Sets if the title property should automatically be added on resource creation.
|
void |
setBigIcon(java.lang.String bigIcon)
Sets the file name of the big icon for this explorer type.
|
void |
setBigIconStyle(java.lang.String bigIconStyle)
Sets the big icon CSS style class.
|
void |
setCreatable(boolean creatable)
Sets the creatable flag.
|
void |
setCreatable(java.lang.String creatable)
Sets the creatable flag.
|
void |
setEditOptions()
Sets the flag if this explorer type entry has explicit edit options set.
|
void |
setElementView(java.lang.String elementView)
Sets the reference of the explorer type setting.
|
void |
setIcon(java.lang.String icon)
Sets the icon path and file name of the explorer type setting.
|
void |
setInfo(java.lang.String info)
Sets the info.
|
void |
setKey(java.lang.String key)
Sets the key name of the explorer type setting.
|
void |
setName(java.lang.String name)
Sets the name of the explorer type setting.
|
void |
setNewResourceOrder(java.lang.String newResourceOrder)
Sets the order for the new resource dialog of the explorer type setting.
|
void |
setProperties(java.util.List<java.lang.String> properties)
Sets the list of properties of the explorer type setting.
|
void |
setPropertiesEnabled(boolean enabled)
Sets if this explorer type setting uses a special properties dialog.
|
void |
setPropertyDefaults(java.lang.String enabled,
java.lang.String showNavigation)
Sets the default settings for the property display dialog.
|
void |
setReference(java.lang.String reference)
Sets the reference of the explorer type setting.
|
void |
setShowNavigation(boolean navigation)
Sets if this explorer type setting displays the navigation properties in the special properties dialog.
|
void |
setSmallIconStyle(java.lang.String smallIconStyle)
Sets the small icon CSS style class.
|
void |
setTitleKey(java.lang.String titleKey)
Sets the titleKey.
|
void |
setTypeAttributes(java.lang.String name,
java.lang.String key,
java.lang.String icon)
Sets the basic attributes of the type settings.
|
void |
setTypeAttributes(java.lang.String name,
java.lang.String key,
java.lang.String icon,
java.lang.String bigIcon,
java.lang.String smallIconStyle,
java.lang.String bigIconStyle,
java.lang.String reference,
java.lang.String elementView,
java.lang.String isView,
java.lang.String namePattern,
java.lang.String viewOrder)
Sets the basic attributes of the type settings.
|
public static final java.lang.String ICON_STYLE_DEFAULT_BIG
public static final java.lang.String ICON_STYLE_DEFAULT_SMALL
public static final java.lang.String ICON_STYLE_MODEL_GROUP_COPY_BIG
public static final java.lang.String ICON_STYLE_MODEL_GROUP_COPY_SMALL
public static final java.lang.String ICON_STYLE_NAV_LEVEL_BIG
public static final java.lang.String ICON_STYLE_NAV_LEVEL_SMALL
public static final int ORDER_VALUE_DEFAULT_START
public static final java.lang.String ORDER_VALUE_SEPARATOR_DEFAULT
public CmsExplorerTypeSettings()
public static java.lang.Integer getDefaultViewOrder(java.lang.String typeName)
typeName - the type namepublic void addIconRule(java.lang.String extension, java.lang.String icon, java.lang.String bigIcon, java.lang.String smallIconStyle, java.lang.String bigIconStyle)
extension - the extension for the icon ruleicon - the small iconbigIcon - the big iconsmallIconStyle - the small icon CSS style classbigIconStyle - the big icon CSS style classpublic boolean addProperty(java.lang.String propertyName)
propertyName - the name of the property definition to addpublic java.lang.Object clone()
clone in class java.lang.ObjectObject.clone()public int compareTo(CmsExplorerTypeSettings other)
compareTo in interface java.lang.Comparable<CmsExplorerTypeSettings>Comparable.compareTo(java.lang.Object)public boolean equals(java.lang.Object o)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public CmsExplorerTypeAccess getAccess()
public java.lang.String getBigIcon()
public java.lang.String getBigIconStyle()
public java.lang.String getElementView()
public java.lang.String getIcon()
public java.util.Map<java.lang.String,CmsIconRule> getIconRules()
public java.lang.String getInfo()
public java.lang.String getKey()
public java.lang.String getName()
public java.lang.String getNamePattern()
public java.lang.String getNewResourceOrder()
public java.lang.String getOriginalIcon()
public java.util.List<java.lang.String> getProperties()
public java.lang.String getReference()
public java.lang.String getSmallIconStyle()
public java.lang.String getTitleKey()
public java.lang.Integer getViewOrder(boolean useDefault)
useDefault - true if a default should be returned in the case where the view order is not configuredpublic boolean hasEditOptions()
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean isAddititionalModuleExplorerType()
public boolean isAutoSetNavigation()
public boolean isAutoSetTitle()
public boolean isCreatable()
true in case this type is creatablepublic boolean isEditable(CmsObject cms, CmsResource resource)
cms - the current cms contextresource - the resource to checktrue if the current user has write permissions on the given resourcepublic boolean isPropertiesEnabled()
public boolean isShowNavigation()
public boolean isView()
public void setAccess(CmsExplorerTypeAccess access)
access - access objectpublic void setAddititionalModuleExplorerType(boolean addititionalModuleExplorerType)
addititionalModuleExplorerType - true or falsepublic void setAutoSetNavigation(java.lang.String autoSetNavigation)
autoSetNavigation - true if properties should be added, otherwise falsepublic void setAutoSetTitle(java.lang.String autoSetTitle)
autoSetTitle - true if title should be added, otherwise falsepublic void setBigIcon(java.lang.String bigIcon)
bigIcon - the file name of the big iconpublic void setBigIconStyle(java.lang.String bigIconStyle)
bigIconStyle - the big icon style to setpublic void setCreatable(boolean creatable)
creatable - the non creatable flag to setpublic void setCreatable(java.lang.String creatable)
creatable - the creatable flag to setpublic void setEditOptions()
This is determined by the presence of the <editoptions> node in the Cms workplace configuration.
public void setElementView(java.lang.String elementView)
elementView - the element viewpublic void setIcon(java.lang.String icon)
icon - the icon path and file name of the explorer type settingpublic void setInfo(java.lang.String info)
info - the info to setpublic void setKey(java.lang.String key)
key - the key name of the explorer type settingpublic void setName(java.lang.String name)
name - the name of the explorer type settingpublic void setNewResourceOrder(java.lang.String newResourceOrder)
newResourceOrder - the order for the new resource dialog of the explorer type settingpublic void setProperties(java.util.List<java.lang.String> properties)
properties - the list of properties of the explorer type settingpublic void setPropertiesEnabled(boolean enabled)
enabled - true, if this explorer type setting uses a special properties dialogpublic void setPropertyDefaults(java.lang.String enabled, java.lang.String showNavigation)
enabled - true, if this explorer type setting uses a special properties dialogshowNavigation - true, if this explorer type setting displays the navigation properties in the special properties dialogpublic void setReference(java.lang.String reference)
reference - the reference of the explorer type settingpublic void setShowNavigation(boolean navigation)
navigation - true, if this explorer type setting displays the navigation properties in the special properties dialogpublic void setSmallIconStyle(java.lang.String smallIconStyle)
smallIconStyle - the small icon CSS style class to setpublic void setTitleKey(java.lang.String titleKey)
titleKey - the titleKey to setpublic void setTypeAttributes(java.lang.String name, java.lang.String key, java.lang.String icon)
name - the name of the type settingkey - the key name of the explorer type settingicon - the icon path and file name of the explorer type settingpublic void setTypeAttributes(java.lang.String name, java.lang.String key, java.lang.String icon, java.lang.String bigIcon, java.lang.String smallIconStyle, java.lang.String bigIconStyle, java.lang.String reference, java.lang.String elementView, java.lang.String isView, java.lang.String namePattern, java.lang.String viewOrder)
name - the name of the type settingkey - the key name of the explorer type settingicon - the icon path and file name of the explorer type settingbigIcon - the file name of the big iconsmallIconStyle - the small icon CSS style classbigIconStyle - the big icon CSS style classreference - the reference of the explorer type settingelementView - the element viewisView - 'true' if this type represents an element viewnamePattern - the name patternviewOrder - the view order