public class TypeEntry
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
categories |
protected java.lang.String |
className |
protected boolean |
containsHiddenFields |
protected boolean |
containsHiddenFieldsComputed |
protected java.util.Map<java.lang.String,java.lang.String> |
descriptionMap |
protected java.lang.String[] |
groups |
protected boolean |
isAbstract |
protected boolean |
isAdvancedTab |
protected boolean |
isAudienced |
protected boolean |
isCategoryTab |
protected boolean |
isDatabase |
protected boolean |
isDebatable |
protected boolean |
isExtension |
protected boolean |
isHbm |
protected boolean |
isReadRightTab |
protected boolean |
isRevision |
protected boolean |
isTemplateTab |
protected boolean |
isTitleML |
protected boolean |
isTitleSearchable |
protected boolean |
isUnitFieldEdition |
protected boolean |
isUpdateRightTab |
protected boolean |
isWorkflowTab |
protected java.util.Map<java.lang.String,java.lang.String> |
labelMap |
static java.lang.String |
REVISION |
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
tabMap |
protected java.util.Map<java.lang.String,TypeTemplateEntry> |
templateMap |
protected java.util.Map<java.lang.String,java.lang.String> |
titleDescriptionMap |
protected java.util.Map<java.lang.String,java.lang.String> |
titleLabelMap |
protected java.lang.String |
typeDir |
protected java.util.Map<java.lang.String,java.util.Set<TypeTemplateEntry>> |
usageMap |
protected org.jdom.Element |
xmlElt |
Constructor and Description |
---|
TypeEntry(org.jdom.Element typeElt,
java.lang.String typeDir)
Constructor XML Element, to be used for every JCMS types having an XML file.
|
TypeEntry(java.lang.String className,
java.util.Map<java.lang.String,java.lang.String> labelMap,
java.util.Map<java.lang.String,java.lang.String> descriptionMap,
java.util.Map<java.lang.String,java.lang.String> titleLabelMap,
java.util.Map<java.lang.String,java.lang.String> titleDescriptionMap,
boolean isTitleML,
boolean isTitleSearchable,
boolean isCategoryTab,
boolean isTemplateTab,
boolean isReadRightTab,
boolean isUpdateRightTab,
boolean isWorkflowTab,
boolean isAdvancedTab,
boolean isDebatable,
boolean isAbstract,
java.lang.String[] categories,
java.lang.String[] groups)
Constructor WITHOUT XML Element, to be used for JCMS core types.
|
Modifier and Type | Method and Description |
---|---|
void |
addTemplate(org.jdom.Element itElm,
java.lang.String typeDir)
Add template to the TypeEntry from a List of XML Elements.
|
void |
addTemplateEntry(TypeTemplateEntry tte)
Add template to the TypeEntry from a TypeTemplateEntry.
|
void |
addTemplateList(java.util.List<org.jdom.Element> templateList,
java.lang.String typeDir)
Add templates to the TypeEntry from a List of XML Elements.
|
boolean |
containsHiddenFields()
Returns true if this type contains at least one hidden field.
|
java.lang.String[] |
getCategories()
Return default categories for this type
|
java.lang.String |
getClassName()
Returns the name of the type
|
TypeTemplateEntry |
getDefaultTemplateEntry(java.lang.String usage)
Returns a default TypeTemplateEntry matching the given usage for the current workspace
|
java.util.Set<TypeTemplateEntry> |
getDefaultTemplateEntrySet()
Returns all default template entries
|
java.util.Set<java.lang.String> |
getDefaultTemplateNameSet()
Returns all default template names
|
static java.util.Map<java.lang.String,TypeTemplateEntry> |
getDefaultTypeTemplateEntryMap(java.lang.String className,
java.lang.String folderPath) |
static java.util.Map<java.lang.String,java.util.Set<TypeTemplateEntry>> |
getDefaultTypeTemplateEntryUsageMap(java.lang.String className,
java.lang.String folderPath) |
java.lang.String |
getDescription(java.lang.String lang)
Returns the description of this type in the given language.
|
java.util.Map<java.lang.String,java.lang.String> |
getDescriptionMap()
Returns the description map of this type ({lang, value}).
|
java.util.Set<java.lang.String> |
getDirectoriesPathSet()
Returns roots folder for the given type
Current implementation returns following files:
WEB-INF/data/types/Type/
types/Type/
It do not return sub folders
|
java.util.Set<java.lang.String> |
getFilesPathSet()
Returns all files normally used by the current type.
|
TypeTemplateEntry |
getFirstTemplateEntry(java.lang.String usage,
java.lang.String[] names)
Returns the first TypeTemplateEntry from given names matching given usage
If names is empty then return default entry
|
java.lang.String[] |
getGroups()
Return default groups rights for this type
|
java.lang.String |
getLabel(java.lang.String lang)
Returns the label of this type in the given language.
|
java.util.Map<java.lang.String,java.lang.String> |
getLabelMap()
Returns the label map of this type ({lang, value}).
|
java.lang.String |
getTabLabel(java.lang.String tabId,
java.lang.String lang)
Returns the localized label for the given tab identifier.
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
getTabMap()
Returns the tab map {tabId, map{lang, label}}
|
TypeTemplateEntry |
getTemplateEntry(java.lang.String fullname)
Returns a TypeTemplateEntry matching the given template name
|
java.util.Set<TypeTemplateEntry> |
getTemplateEntrySet()
Returns all template entries
|
java.util.Set<TypeTemplateEntry> |
getTemplateEntrySet(java.lang.String usage)
Returns a new Set of TypeTemplateEntry matching the given usage
|
java.util.Map<java.lang.String,java.util.Set<TypeTemplateEntry>> |
getTemplateUsageMap()
Returns internal cached Map of usage/Set of TypeTemplateEntry.
|
java.util.Set<java.lang.String> |
getTemplateUsageSet()
Returns a Set of all usage used by this type entry
|
java.lang.String |
getTitleDescription(java.lang.String lang)
Returns the title description of this type in the given language.
|
java.util.Map<java.lang.String,java.lang.String> |
getTitleDescriptionMap()
Returns the title description map of this type ({lang, value}).
|
java.lang.String |
getTitleLabel(java.lang.String lang)
Returns the title label of this type in the given language.
|
java.util.Map<java.lang.String,java.lang.String> |
getTitleLabelMap()
Returns the title label map of this type ({lang, value}).
|
org.jdom.Element |
getXmlElement()
XML Parsing: jdom Element for this type.
|
boolean |
isAbstract()
Return true if this type is an abstract java Class.
|
boolean |
isAdvancedTab()
Do we display Advanced tab in the edit form of instance of this type?.
|
boolean |
isAudienced()
Returns true if this type is audienced using Audience Rights (if audience rights are enabled).
|
boolean |
isCategoryTab()
Do we display category tab in the edit form of instance of this type?.
|
boolean |
isDebatable()
Return true if a forum can be created on intances of this type.
|
boolean |
isExtension()
Return true if this type is a DataExtension for an internal JCMS type.
|
boolean |
isReadRightTab()
Do we display Read Right tab in the edit form of instance of this type?.
|
boolean |
isTemplateTab()
Do we display template tab in the edit form of instance of this type?.
|
boolean |
isTitleML()
Return true if the title of this type is multilingual.
|
boolean |
isTitleSearchable()
Return true if the title of this type is searchable.
|
boolean |
isUnitFieldEdition()
Returns true if this type can be edited field by field on the front office.
|
boolean |
isUpdateRightTab()
Do we display Update Right tab in the edit form of instance of this type?.
|
boolean |
isWorkflowTab()
Do we display Workflow tab in the edit form of instance of this type?.
|
void |
reloadI18N()
Reload all I18N informations for this type.
|
void |
setAdvancedTab(boolean isAdvancedTab)
Do we display Advanced tab in the edit form of instance of this type?.
|
void |
setCategories(java.lang.String[] categories)
Set default categories
|
void |
setCategoryTab(boolean isCategoryTab)
Do we display category tab in the edit form of instance of this type?.
|
void |
setDebatable(boolean isDebatable)
Param true if a forum can be created on instances of this type.
|
void |
setDescription(java.util.Map<java.lang.String,java.lang.String> descriptionMap) |
void |
setGroups(java.lang.String[] groups)
Set default groups right
|
void |
setLabelMap(java.util.Map<java.lang.String,java.lang.String> labelMap) |
void |
setReadRightTab(boolean isReadRightTab)
Do we display Read Right tab in the edit form of instance of this type?.
|
void |
setTabMap(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> tabMap) |
void |
setTemplateTab(boolean isTemplateTab)
Do we display template tab in the edit form of instance of this type?.
|
void |
setTitleDescriptionMap(java.util.Map<java.lang.String,java.lang.String> titleDescriptionMap) |
void |
setTitleLabelMap(java.util.Map<java.lang.String,java.lang.String> titleLabelMap) |
void |
setUpdateRightTab(boolean isUpdateRightTab)
Do we display Update Right tab in the edit form of instance of this type?.
|
void |
setWorkflowTab(boolean isWorkflowTab)
Do we display Workflow tab in the edit form of instance of this type?.
|
java.lang.String |
toString() |
public static final java.lang.String REVISION
protected final org.jdom.Element xmlElt
protected final java.lang.String className
protected final boolean isAbstract
protected final boolean isExtension
protected java.util.Map<java.lang.String,java.lang.String> labelMap
protected java.util.Map<java.lang.String,java.lang.String> descriptionMap
protected java.util.Map<java.lang.String,java.lang.String> titleLabelMap
protected java.util.Map<java.lang.String,java.lang.String> titleDescriptionMap
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> tabMap
protected java.util.Map<java.lang.String,TypeTemplateEntry> templateMap
protected java.util.Map<java.lang.String,java.util.Set<TypeTemplateEntry>> usageMap
protected boolean isTitleML
protected boolean isTitleSearchable
protected boolean isCategoryTab
protected boolean isTemplateTab
protected boolean isReadRightTab
protected boolean isUpdateRightTab
protected boolean isWorkflowTab
protected boolean isAdvancedTab
protected boolean isDebatable
protected boolean isUnitFieldEdition
protected boolean isAudienced
protected java.lang.String[] categories
protected java.lang.String[] groups
protected boolean containsHiddenFieldsComputed
protected boolean containsHiddenFields
protected java.lang.String typeDir
protected boolean isDatabase
protected boolean isHbm
protected boolean isRevision
public TypeEntry(java.lang.String className, java.util.Map<java.lang.String,java.lang.String> labelMap, java.util.Map<java.lang.String,java.lang.String> descriptionMap, java.util.Map<java.lang.String,java.lang.String> titleLabelMap, java.util.Map<java.lang.String,java.lang.String> titleDescriptionMap, boolean isTitleML, boolean isTitleSearchable, boolean isCategoryTab, boolean isTemplateTab, boolean isReadRightTab, boolean isUpdateRightTab, boolean isWorkflowTab, boolean isAdvancedTab, boolean isDebatable, boolean isAbstract, java.lang.String[] categories, java.lang.String[] groups)
className
- labelMap
- descriptionMap
- titleLabelMap
- titleDescriptionMap
- isTitleML
- isTitleSearchable
- isCategoryTab
- isTemplateTab
- isReadRightTab
- isUpdateRightTab
- isWorkflowTab
- isAdvancedTab
- isDebatable
- isAbstract
- categories
- groups
- public TypeEntry(org.jdom.Element typeElt, java.lang.String typeDir)
typeElt
- the JDOM XML Element corresponding to the "type" elementtypeDir
- the path of directory in which the type JSP will be located, relative to webapp root, eg "types/Article/",public void reloadI18N()
public void addTemplate(org.jdom.Element itElm, java.lang.String typeDir)
itElm
- a JDom ElementstypeDir
- path to the templatepublic void addTemplateList(java.util.List<org.jdom.Element> templateList, java.lang.String typeDir)
templateList
- list of JDom ElementstypeDir
- path to the templatepublic void addTemplateEntry(TypeTemplateEntry tte)
tte
- a JDom Elementspublic TypeTemplateEntry getTemplateEntry(java.lang.String fullname)
fullname
- the template namepublic java.util.Set<TypeTemplateEntry> getTemplateEntrySet(java.lang.String usage)
usage
- the template usagepublic java.util.Set<TypeTemplateEntry> getTemplateEntrySet()
public TypeTemplateEntry getDefaultTemplateEntry(java.lang.String usage)
usage
- the template usagepublic java.util.Set<TypeTemplateEntry> getDefaultTemplateEntrySet()
public java.util.Set<java.lang.String> getDefaultTemplateNameSet()
public TypeTemplateEntry getFirstTemplateEntry(java.lang.String usage, java.lang.String[] names)
usage
- the template usagenames
- an array of templates namepublic java.util.Map<java.lang.String,java.util.Set<TypeTemplateEntry>> getTemplateUsageMap()
public java.util.Set<java.lang.String> getTemplateUsageSet()
public boolean containsHiddenFields()
public java.lang.String toString()
toString
in class java.lang.Object
public org.jdom.Element getXmlElement()
Element
of this type.public boolean isAbstract()
public boolean isExtension()
public java.lang.String getLabel(java.lang.String lang)
lang
- the languagepublic java.util.Map<java.lang.String,java.lang.String> getLabelMap()
public java.lang.String getDescription(java.lang.String lang)
lang
- the languagepublic java.util.Map<java.lang.String,java.lang.String> getDescriptionMap()
public java.lang.String getTitleLabel(java.lang.String lang)
lang
- the languagepublic java.util.Map<java.lang.String,java.lang.String> getTitleLabelMap()
public java.lang.String getTitleDescription(java.lang.String lang)
lang
- the languagepublic java.util.Map<java.lang.String,java.lang.String> getTitleDescriptionMap()
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> getTabMap()
public java.lang.String getTabLabel(java.lang.String tabId, java.lang.String lang)
tabId
- the tab identifierlang
- the languagepublic boolean isTitleML()
public boolean isTitleSearchable()
public boolean isDebatable()
public boolean isUnitFieldEdition()
public boolean isAudienced()
public boolean isCategoryTab()
public boolean isTemplateTab()
public boolean isReadRightTab()
public boolean isUpdateRightTab()
public boolean isWorkflowTab()
public boolean isAdvancedTab()
public java.lang.String[] getCategories()
public java.lang.String[] getGroups()
public java.lang.String getClassName()
public java.util.Set<java.lang.String> getFilesPathSet()
public java.util.Set<java.lang.String> getDirectoriesPathSet()
public static java.util.Map<java.lang.String,java.util.Set<TypeTemplateEntry>> getDefaultTypeTemplateEntryUsageMap(java.lang.String className, java.lang.String folderPath)
public static java.util.Map<java.lang.String,TypeTemplateEntry> getDefaultTypeTemplateEntryMap(java.lang.String className, java.lang.String folderPath)
public void setLabelMap(java.util.Map<java.lang.String,java.lang.String> labelMap)
public void setDescription(java.util.Map<java.lang.String,java.lang.String> descriptionMap)
public void setTitleLabelMap(java.util.Map<java.lang.String,java.lang.String> titleLabelMap)
public void setTitleDescriptionMap(java.util.Map<java.lang.String,java.lang.String> titleDescriptionMap)
public void setTabMap(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> tabMap)
public void setDebatable(boolean isDebatable)
isDebatable
- true if instances of this type are debatable.public void setCategoryTab(boolean isCategoryTab)
isCategoryTab
- true if category tab is displayed, false otherwise.public void setTemplateTab(boolean isTemplateTab)
isTemplateTab
- true if template tab is displayed, false otherwise.public void setReadRightTab(boolean isReadRightTab)
isReadRightTab
- true if Read Right tab is displayed, false otherwise.public void setUpdateRightTab(boolean isUpdateRightTab)
isUpdateRightTab
- true if Update Right tab is displayed, false otherwise.public void setWorkflowTab(boolean isWorkflowTab)
isWorkflowTab
- true if Workflow tab is displayed, false otherwise.public void setAdvancedTab(boolean isAdvancedTab)
isAdvancedTab
- true if Advanced tab is displayed, false otherwise.public void setCategories(java.lang.String[] categories)
categories
- String[] of default category idspublic void setGroups(java.lang.String[] groups)
groups
- String[] of default group idsCopyright © 2001-2010 Jalios SA. All Rights Reserved.