Class 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
    • 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

      • 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 the getKey and setKey methods.
        Specified by:
        getKeyAttribute in class AbstractConfigurationElement
        Since:
        MicroStrategy Web 9.0.0
      • getKey

        public java.lang.Object getKey()
        Description copied from class: AbstractConfigurationElement
        Default implementation for getKey(). It assumes a single attribute can be used to uniquely identify this element among its siblings; the attribute to use is specified by the getKeyAttribute() method.
        Specified by:
        getKey in interface ConfigurationElement
        Overrides:
        getKey in class AbstractConfigurationElement
        Returns:
        If getKeyAttribute() is empty returns null, 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 for setKey(). 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 the getKeyAttribute() method.
        Overrides:
        setKey in class AbstractConfigurationElement
        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 class AbstractConfigurationElement
        Parameters:
        protoName - Prototype name, typically the name of a sibling node in the xml.
        Since:
        MicroStrategy Web 9.0.0