Package com.microstrategy.web.app
Class TemplateInfo
- java.lang.Object
-
- com.microstrategy.utils.config.AbstractConfigurationElement
-
- com.microstrategy.web.app.TemplateInfo
-
- All Implemented Interfaces:
ConfigurationElement
,ConfigurationFile
,java.lang.Cloneable
public class TemplateInfo extends AbstractConfigurationElement
This class holds the information required by a Page Template to render. This is information is only required by the jsps and not at runtime.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
AbstractConfigurationElement.FilteredList
-
-
Field Summary
-
Fields inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
ATT_CONFIG_SRC, ATT_DELETED, ATT_POSITION, ATT_PROTOTYPE, ATT_USE_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description TemplateInfo()
Empty constructor of a TemplateInfo initialize private fields with default values.TemplateInfo(org.w3c.dom.Node root)
Creates a TemplateInfo with the information in the xml node.TemplateInfo(org.w3c.dom.Node root, TemplateInfo defaultTemplate)
Creates a TemplateInfo with the information in the xml node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSection(java.lang.String sectionName, java.lang.String fileName)
Adds a page section file name.void
addShortcutList(java.lang.String name, ShortcutList shortcutList)
Adds a ShortcutListvoid
deleteSection(java.lang.String sectionName)
Deletes a page section file namevoid
deleteShortcutList(java.lang.String name)
Deletes a ShortcutListboolean
getAllowCancel()
TemplateInfo
getDefaultTemplate()
Returns the default template of the applicationjava.lang.String
getErrorDesc()
java.lang.String
getErrorTitleId()
java.lang.String
getFileName()
boolean
getIframe()
java.lang.Object
getKey()
Default implementation forgetKey()
.protected java.lang.String
getKeyAttribute()
This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override thegetKey
andsetKey
methods.java.lang.String
getPageName()
java.lang.String
getSection(java.lang.String sectionName)
Returns the file name of the section associated with the given section name.SectionInfoList
getSectionInfoList()
Returns the available sections for this template.ShortcutList
getShortcutList(java.lang.String name)
Returns the ShorcutList associated with the given name.ShortcutListSet
getShortcutListSet()
Returns the set of ShortcutLists for this template.boolean
getShowWait()
int
getStatus()
Return the status of this Template.WebGuiComponentList
getWebGuiComponentList()
Returns the available Web Components for this template.java.lang.String
getXmlMergeId()
protected void
initDefaultAttributes()
This method can be overridden to set default values for attributes.protected void
initPrototype(java.lang.String protoName)
Extends initPrototype to provide support for a default template.protected boolean
isKeyAttribute(java.lang.String name)
Returnstrue
is the name is that of the key attribute.void
setAllowCancel(boolean newValue)
void
setErrorDesc(java.lang.String errorDesc)
Sets the descriptor Desc of the title of the error section if an error happens on this page.void
setErrorTitleId(java.lang.String errorTitleId)
Sets the descriptor Id of the title of the error section if an error happens on this page.void
setFileName(java.lang.String fileName)
Sets the fileName of this templatevoid
setIframe(boolean newValue)
Sets if the template uses the iframe functionalityprotected void
setKey(org.w3c.dom.Element element)
Default implementation forsetKey()
.protected void
setPrototype(AbstractConfigurationElement prototype)
Sets the prototype object for this instance.void
setShowWait(boolean newValue)
void
setStatus(int status)
Sets that status of this Template.void
setWebGuiComponentList(WebGuiComponentList webGuiComponentList)
void
setXmlMergeId(java.lang.String xmlMergeId)
Sets the xmlMergeId of this template-
Methods inherited from class com.microstrategy.utils.config.AbstractConfigurationElement
addFileSource, applyCustomization, applyCustomizations, cleanUpDeletedElements, clone, delete, deltas, deltas, equalAtts, equalElements, equalNodeValues, equals, equalsIncludingDeletedElements, exportAttributesToXML, exportElementsToXML, exportNodeValueToXML, getAttribute, getAttributes, getBoolAttribute, getChildKey, getConfigSrc, getDTDFileName, getElement, getElement, getElements, getFileLoader, getIntAttribute, getIntAttribute, getLineNumber, getList, getNextKey, getNodeName, getNodeValue, getNodeValue, getOrCreateElement, getParent, getPosition, getPrototype, getRegisteredClass, getSelfInitPath, getSource, getStrAttribute, getUseDefault, getXMLParserParameters, getXMLSerializerParameters, hashCode, hashCodeAtts, hashCodeElements, hashCodeNodeValues, hasRegisteredClass, initAttributesFromXML, initElementFromXML, initElementsFromXML, initFromFile, initFromResource, initFromXML, initFromXML, initNodeValueFromXML, isActive, isCustomized, isDeleted, isDirty, isInSource, load, mergeChanges, newChildInstance, newSource, original, populate, printAttributes, printElements, printNodeValue, refreshLists, registerClass, registerElement, registerElement, registerElementList, reload, reloadPrototype, removeAttribute, removeDefaults, replaceList, restore, save, save, saveChangesAs, saveConfig, saveFlatXML, saveNode, saveSource, setAttribute, setBoolAttribute, setChildOriginals, setConfigSrc, setCustomized, setElement, setFileLoader, setIntAttribute, setLineNumber, setNodeName, setNodeValue, setPosition, setSelfInitPath, setStrAttribute, setUseDefault, setUseValidation, throwConfigParseException, toString, toXML, toXML, toXML, toXML, useNodeValue, useValidation
-
-
-
-
Constructor Detail
-
TemplateInfo
public TemplateInfo(org.w3c.dom.Node root)
Creates a TemplateInfo with the information in the xml node.- Parameters:
root
- An XML Node with the information for this TemplateInfo.
-
TemplateInfo
public TemplateInfo(org.w3c.dom.Node root, TemplateInfo defaultTemplate)
Creates a TemplateInfo with the information in the xml node.- Parameters:
root
- An XML Node with the information for this TemplateInfo.defaultTemplate
- a TemplateInfo used as default.
-
TemplateInfo
public TemplateInfo()
Empty constructor of a TemplateInfo initialize private fields with default values.
-
-
Method Detail
-
initDefaultAttributes
protected void initDefaultAttributes()
Description copied from class:AbstractConfigurationElement
This method can be overridden to set default values for attributes. Simply extend this method and callAbstractConfigurationElement.setAttribute(java.lang.String, java.lang.Object)
- Overrides:
initDefaultAttributes
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.0
-
getFileName
public java.lang.String getFileName()
- Returns:
- the file name to use with this template.
-
getPageName
public java.lang.String getPageName()
- Returns:
- the page name from the to use in place of this template.
-
getXmlMergeId
public java.lang.String getXmlMergeId()
- Returns:
- the XmlMerge id to use with this template.
- Since:
- MicroStrategy Web 7.5.2
-
setFileName
public void setFileName(java.lang.String fileName)
Sets the fileName of this template- Parameters:
fileName
- the new file to use.
-
setXmlMergeId
public void setXmlMergeId(java.lang.String xmlMergeId)
Sets the xmlMergeId of this template- Parameters:
xmlMergeId
- the new file to use.- Since:
- MicroStrategy Web 7.5.2
-
getIframe
public boolean getIframe()
- Returns:
- true if the template uses the iframe functionality.
-
setIframe
public void setIframe(boolean newValue)
Sets if the template uses the iframe functionality- Parameters:
newValue
- iframe usage.
-
getShowWait
public boolean getShowWait()
- Returns:
- the value of the property indicating if the wait should be displayed or not
- Since:
- MicroStrategy Web 8.0.0
-
setShowWait
public void setShowWait(boolean newValue)
- Parameters:
newValue
- boolean value indicating if the wait should be displayed or not- Since:
- MicroStrategy Web 8.0.0
-
getAllowCancel
public boolean getAllowCancel()
- Returns:
- the value of the property indicating if the cancel button on the wait box should be displayed or not
- Since:
- MicroStrategy Web 8.0.0
-
setAllowCancel
public void setAllowCancel(boolean newValue)
- Parameters:
newValue
- boolean value indicating if the cancel button on the wait box should be displayed or not- Since:
- MicroStrategy Web 8.0.0
-
getStatus
public int getStatus()
Return the status of this Template. The status indicates to use this template only if the page is in the same status. An status of 0 indicates to use this template with any status.- Returns:
- the status associated.
-
setStatus
public void setStatus(int status)
Sets that status of this Template. If a Template has an associated status, it should only be used when the pageComponent is in this status.- Parameters:
status
- value indicating the current status
-
getErrorTitleId
public java.lang.String getErrorTitleId()
- Returns:
- the id of the description to use as title for the error page.
-
setErrorTitleId
public void setErrorTitleId(java.lang.String errorTitleId)
Sets the descriptor Id of the title of the error section if an error happens on this page.- Parameters:
errorTitleId
- the new descriptor Id.
-
getErrorDesc
public java.lang.String getErrorDesc()
- Returns:
- the desc of the description to use as title for the error page.
-
setErrorDesc
public void setErrorDesc(java.lang.String errorDesc)
Sets the descriptor Desc of the title of the error section if an error happens on this page.- Parameters:
errorDesc
- the new descriptor Desc.
-
getShortcutListSet
public ShortcutListSet getShortcutListSet()
Returns the set of ShortcutLists for this template.- Returns:
- the template's ShortcutListSet
-
getSectionInfoList
public SectionInfoList getSectionInfoList()
Returns the available sections for this template.- Returns:
- the template's SectionList
-
getWebGuiComponentList
public WebGuiComponentList getWebGuiComponentList()
Returns the available Web Components for this template.- Returns:
- the template's WebGuiComponentList
-
setWebGuiComponentList
public void setWebGuiComponentList(WebGuiComponentList webGuiComponentList)
- Since:
- MicroStrategy Web 9.0.0
-
getDefaultTemplate
public TemplateInfo getDefaultTemplate()
Returns the default template of the application- Returns:
- the default template of the application
-
getSection
public java.lang.String getSection(java.lang.String sectionName)
Returns the file name of the section associated with the given section name.- Parameters:
sectionName
- the section's name.- Returns:
- file name associated with the given section.
-
addSection
public void addSection(java.lang.String sectionName, java.lang.String fileName)
Adds a page section file name.- Parameters:
sectionName
- the section's name.fileName
- file name associated with the given section.
-
deleteSection
public void deleteSection(java.lang.String sectionName)
Deletes a page section file name- Parameters:
sectionName
- the section's name.
-
getShortcutList
public ShortcutList getShortcutList(java.lang.String name)
Returns the ShorcutList associated with the given name.- Parameters:
name
- the ShorcutList's name.- Returns:
- the ShorcutList associated with the given name.
-
addShortcutList
public void addShortcutList(java.lang.String name, ShortcutList shortcutList)
Adds a ShortcutList- Parameters:
name
- the ShorcutList's name.shortcutList
- the ShortcutList.
-
deleteShortcutList
public void deleteShortcutList(java.lang.String name)
Deletes a ShortcutList- Parameters:
name
- the ShorcutList's name.
-
getKeyAttribute
protected java.lang.String getKeyAttribute()
Description copied from class:AbstractConfigurationElement
This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override thegetKey
andsetKey
methods.- Specified by:
getKeyAttribute
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.0
-
getKey
public java.lang.Object getKey()
Description copied from class:AbstractConfigurationElement
Default implementation forgetKey()
. It assumes a single attribute can be used to uniquely identify this element among its siblings; the attribute to use is specified by thegetKeyAttribute()
method.- Specified by:
getKey
in interfaceConfigurationElement
- Overrides:
getKey
in classAbstractConfigurationElement
- Returns:
- If
getKeyAttribute()
is empty returnsnull
, otherwise it returns the value of the given attribute. - Since:
- MicroStrategy Web 9.0.0
-
setKey
protected void setKey(org.w3c.dom.Element element)
Description copied from class:AbstractConfigurationElement
Default implementation forsetKey()
. It assumes a single attribute can be used to uniquely identify this element among its siblings and adds this attribute to the given element; the attribute to use is specified by thegetKeyAttribute()
method.- Overrides:
setKey
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.0
-
isKeyAttribute
protected boolean isKeyAttribute(java.lang.String name)
Description copied from class:AbstractConfigurationElement
Returnstrue
is the name is that of the key attribute.- Overrides:
isKeyAttribute
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.0
-
initPrototype
protected void initPrototype(java.lang.String protoName)
Extends initPrototype to provide support for a default template. When a new TemplateInfo is created, if it doesn't have a prototype yet, it should will use the default template from the default list as prototype.
This functionality has been added to provide backwards compatibility, but this behavior is intended to be removed in the future. The correct behavior is that each template should have its definition complete, and not rely on the definition of the default template. Make sure the definition in the pageConfig reflects this.- Overrides:
initPrototype
in classAbstractConfigurationElement
- Parameters:
protoName
- Prototype name, typically the name of a sibling node in the xml.- Since:
- MicroStrategy Web 9.0.0
-
setPrototype
protected void setPrototype(AbstractConfigurationElement prototype)
Description copied from class:AbstractConfigurationElement
Sets the prototype object for this instance. The attributes and elements of the prototype are copied into this instance.- Overrides:
setPrototype
in classAbstractConfigurationElement
- Since:
- MicroStrategy Web 9.0.0
-
-