psdi.webclient.system.controller

Class PresentationLoader

  • java.lang.Object
    • psdi.webclient.system.controller.PresentationLoader


  • public class PresentationLoader
    extends java.lang.Object
    Class used for parsing presentation xml (both internal and external formats). While the class provides different methods for parsing from different input sources, they are all parsed the same way.
    • Field Detail

      • XML_VERSION_TAG_REGEX

        public static final java.lang.String XML_VERSION_TAG_REGEX
        See Also:
        Constant Field Values
      • MAXLABELS_PROPERTIES

        public static final java.util.HashMap MAXLABELS_PROPERTIES
      • MAXLABELS_PROPERTIES_SET

        public static final java.util.Set MAXLABELS_PROPERTIES_SET
    • Constructor Detail

      • PresentationLoader

        public PresentationLoader()
    • Method Detail

      • importPresentationSet

        public void importPresentationSet(WebClientSession wcs,
                                          java.lang.String xml)
                                   throws java.lang.Exception
        Reads the XML for a set of presentations and imports each individual presentation
        Parameters:
        wcs - the webClientSession
        xml - the XML containing the presentation set
        Throws:
        java.lang.Exception
      • importApp

        public void importApp(WebClientSession wcs,
                              java.lang.String xml)
                       throws java.lang.Exception
        Reads the XML for a single presentation and imports it.
        Parameters:
        wcs - the webClientSession
        xml - the XML containing the presentation
        Throws:
        java.lang.Exception
      • importAdhocReportDialog

        public void importAdhocReportDialog(WebClientSession wcs,
                                            java.lang.String completeXml,
                                            java.lang.String dialogXml)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • importApp

        public void importApp(WebClientSession wcs,
                              java.lang.String xml,
                              boolean saveLabels)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getAppID

        public java.lang.String getAppID()
      • isMaxLabelProperty

        public static boolean isMaxLabelProperty(java.lang.String property)
        Tell whether the property is a label-type property
      • exportSQL

        public void exportSQL(WebClientSession wcs)
        Handles the Export SQL function -- exports all of the presentations to presentations folder on server disk.
      • exportSQL

        public void exportSQL(WebClientSession wcs,
                              java.lang.String appID,
                              java.io.PrintWriter out)
        Handles the Export SQL function
        Parameters:
        appID - Application to be exported
      • exportXML

        @TraceMaskValue
        public java.lang.String exportXML(WebClientSession wcs,
                                                          java.lang.String appID)
                                                   throws MXException,
                                                          java.rmi.RemoteException
        Function that returns the XML for a presentation as stored in the database
        Parameters:
        appID - Application to be exported
        Returns:
        presentation XML
        Throws:
        MXException
        java.rmi.RemoteException
      • getXMLString

        public java.lang.String getXMLString(WebClientSession wcs,
                                             ControlInstance control)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • getXMLSafePropertyString

        public java.lang.String getXMLSafePropertyString(ControlInstance control,
                                                         java.util.HashMap cachedLabels)
        Returns a string containing all of the attributes for the control
        Parameters:
        labelsforcontrol - HashMap containing any new properties for the control where key=property,value=value
        Returns:
        String containing all of the attributes, empty string if none
      • makesafevalue

        public static java.lang.String makesafevalue(java.lang.String value)
        THIS IS NECESSARY TO KEEP BAD XML OUT OF THE PRESENTATION Used to protect xml values that may contain special characters. The characters are replaced with their safe equivalent symbols. New unsafe chars/safe symbol combinations should be added to the two private arrays define in this class; UNSAFE_CHARS and SAFE_SYMS Added double enocode prevention also to the UNSAFE_CHARS and SAFE_SYMS sets as per 10-14246
        Parameters:
        value - the value to be protected
        Returns:
        the contents of value with the unsafe characters replaced with safe symbols
      • writeFormattedXML

        public void writeFormattedXML(java.io.PrintWriter out,
                                      java.lang.String xml,
                                      LabelCache appLabelCache)
        Method used by designer to get the xml for exporting an application