|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.TypeEntry
public class TypeEntry
This class contains info about a Type.
Constructor Summary | |
---|---|
TypeEntry(org.jdom.Element typeElt,
String typeDir)
Constructor XML Element, to be used for every JCMS types having an XML file. |
|
TypeEntry(String className,
Map<String,String> labelMap,
Map<String,String> descriptionMap,
Map<String,String> titleLabelMap,
Map<String,String> titleDescriptionMap,
boolean isTitleML,
boolean isTitleSearchable,
boolean isReviewable,
boolean isCategoryTab,
boolean isTemplateTab,
boolean isReadRightTab,
boolean isUpdateRightTab,
boolean isWorkflowTab,
boolean isAdvancedTab,
boolean isDebatable,
boolean isAbstract,
String[] categories,
String[] groups)
Constructor WITHOUT XML Element, to be used for JCMS core types. |
Method Summary | |
---|---|
void |
addTemplate(org.jdom.Element itElm,
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(List<org.jdom.Element> templateList,
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. |
String[] |
getCategories()
Return default categories for this type |
String |
getClassName()
Returns the name of the type |
TypeTemplateEntry |
getDefaultTemplateEntry(String usage)
Returns a default TypeTemplateEntry matching the given usage for the current workspace |
Set<TypeTemplateEntry> |
getDefaultTemplateEntrySet()
Returns all default template entries |
Set<String> |
getDefaultTemplateNameSet()
Returns all default template names |
static Map<String,TypeTemplateEntry> |
getDefaultTypeTemplateEntryMap(String className,
String folderPath)
|
static Map<String,Set<TypeTemplateEntry>> |
getDefaultTypeTemplateEntryUsageMap(String className,
String folderPath)
|
String |
getDescription(String lang)
Returns the description of this type in the given language. |
Map<String,String> |
getDescriptionMap()
Returns the description map of this type ({lang, value}). |
Set<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 |
Set<String> |
getFilesPathSet()
Returns all files normally used by the current type. |
TypeTemplateEntry |
getFirstTemplateEntry(String usage,
String[] names)
Returns the first TypeTemplateEntry from given names matching given usage If names is empty then return default entry |
String[] |
getGroups()
Return default groups rights for this type |
String |
getLabel(String lang)
Returns the label of this type in the given language. |
Map<String,String> |
getLabelMap()
Returns the label map of this type ({lang, value}). |
String |
getTabLabel(String tabId,
String lang)
Returns the localized label for the given tab identifier. |
Map<String,Map<String,String>> |
getTabMap()
Returns the tab map {tabId, map{lang, label}} |
TypeTemplateEntry |
getTemplateEntry(String fullname)
Returns a TypeTemplateEntry matching the given template name |
Set<TypeTemplateEntry> |
getTemplateEntrySet()
Returns all template entries |
Set<TypeTemplateEntry> |
getTemplateEntrySet(String usage)
Returns a new Set of TypeTemplateEntry matching the given usage |
Map<String,Set<TypeTemplateEntry>> |
getTemplateUsageMap()
Returns internal cached Map of usage/Set of TypeTemplateEntry. |
Set<String> |
getTemplateUsageSet()
Returns a Set of all usage used by this type entry |
String |
getTitleDescription(String lang)
Returns the title description of this type in the given language. |
Map<String,String> |
getTitleDescriptionMap()
Returns the title description map of this type ({lang, value}). |
String |
getTitleLabel(String lang)
Returns the title label of this type in the given language. |
Map<String,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 in 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 |
isReadRightTab()
Do we display Read Right tab in the edit form of instance of this type?. |
boolean |
isReviewable()
Return true if some reviews can be created on intances 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 |
setAdvancedTab(boolean isAdvancedTab)
Do we display Advanced tab in the edit form of instance of this type?. |
void |
setCategories(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(Map<String,String> descriptionMap)
|
void |
setGroups(String[] groups)
Set default groups right |
void |
setLabelMap(Map<String,String> labelMap)
|
void |
setReadRightTab(boolean isReadRightTab)
Do we display Read Right tab in the edit form of instance of this type?. |
void |
setReviewable(boolean isReviewable)
Param true if some reviews can be created on instances of this type. |
void |
setTabMap(Map<String,Map<String,String>> tabMap)
|
void |
setTemplateTab(boolean isTemplateTab)
Do we display template tab in the edit form of instance of this type?. |
void |
setTitleDescriptionMap(Map<String,String> titleDescriptionMap)
|
void |
setTitleLabelMap(Map<String,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?. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
protected final org.jdom.Element xmlElt
protected final String className
protected final boolean isAbstract
protected Map<String,String> labelMap
protected Map<String,String> descriptionMap
protected Map<String,String> titleLabelMap
protected Map<String,String> titleDescriptionMap
protected Map<String,Map<String,String>> tabMap
protected Map<String,TypeTemplateEntry> templateMap
protected Map<String,Set<TypeTemplateEntry>> usageMap
protected boolean isTitleML
protected boolean isTitleSearchable
protected boolean isReviewable
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 String[] categories
protected String[] groups
protected boolean containsHiddenFieldsComputed
protected boolean containsHiddenFields
protected String typeDir
Constructor Detail |
---|
public TypeEntry(String className, Map<String,String> labelMap, Map<String,String> descriptionMap, Map<String,String> titleLabelMap, Map<String,String> titleDescriptionMap, boolean isTitleML, boolean isTitleSearchable, boolean isReviewable, boolean isCategoryTab, boolean isTemplateTab, boolean isReadRightTab, boolean isUpdateRightTab, boolean isWorkflowTab, boolean isAdvancedTab, boolean isDebatable, boolean isAbstract, String[] categories, String[] groups)
public TypeEntry(org.jdom.Element typeElt, String typeDir)
Method Detail |
---|
public void addTemplate(org.jdom.Element itElm, String typeDir)
itElm
- a JDom ElementstypeDir
- path to the templatepublic void addTemplateList(List<org.jdom.Element> templateList, String typeDir)
templateList
- list of JDom ElementstypeDir
- path to the templatepublic void addTemplateEntry(TypeTemplateEntry tte)
tte
- a JDom Elementspublic TypeTemplateEntry getTemplateEntry(String fullname)
fullname
- the template name
public Set<TypeTemplateEntry> getTemplateEntrySet(String usage)
usage
- the template usage
public Set<TypeTemplateEntry> getTemplateEntrySet()
public TypeTemplateEntry getDefaultTemplateEntry(String usage)
usage
- the template usage
public Set<TypeTemplateEntry> getDefaultTemplateEntrySet()
public Set<String> getDefaultTemplateNameSet()
public TypeTemplateEntry getFirstTemplateEntry(String usage, String[] names)
usage
- the template usagenames
- an array of templates name
public Map<String,Set<TypeTemplateEntry>> getTemplateUsageMap()
public Set<String> getTemplateUsageSet()
public boolean containsHiddenFields()
public String toString()
toString
in class Object
public org.jdom.Element getXmlElement()
Element
of this type.public boolean isAbstract()
public String getLabel(String lang)
lang
- the language
public Map<String,String> getLabelMap()
public String getDescription(String lang)
lang
- the language
public Map<String,String> getDescriptionMap()
public String getTitleLabel(String lang)
lang
- the language
public Map<String,String> getTitleLabelMap()
public String getTitleDescription(String lang)
lang
- the language
public Map<String,String> getTitleDescriptionMap()
public Map<String,Map<String,String>> getTabMap()
public String getTabLabel(String tabId, String lang)
tabId
- the tab identifierlang
- the language
public boolean isTitleML()
public boolean isTitleSearchable()
public boolean isReviewable()
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 String[] getCategories()
public String[] getGroups()
public String getClassName()
public Set<String> getFilesPathSet()
public Set<String> getDirectoriesPathSet()
public static Map<String,Set<TypeTemplateEntry>> getDefaultTypeTemplateEntryUsageMap(String className, String folderPath)
public static Map<String,TypeTemplateEntry> getDefaultTypeTemplateEntryMap(String className, String folderPath)
public void setLabelMap(Map<String,String> labelMap)
public void setDescription(Map<String,String> descriptionMap)
public void setTitleLabelMap(Map<String,String> titleLabelMap)
public void setTitleDescriptionMap(Map<String,String> titleDescriptionMap)
public void setTabMap(Map<String,Map<String,String>> tabMap)
public void setReviewable(boolean isReviewable)
isReviewable
- true if instances of this type are reviewable.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(String[] categories)
categories
- String[] of default category idspublic void setGroups(String[] groups)
groups
- String[] of default group ids
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |