Class StyleCatalogFactory


  • public class StyleCatalogFactory
    extends java.lang.Object
    Deprecated.
    The StyleCatalogFactory is not used anymore by the application. To load a catalog, you may use directly the ConfigurationFilesCache
    The StyleCatalog Factory class is a singleton that manages 2 top level objects: 1. A transform object. This is an object that implements the Transform interface. 2. A style catalog object, which manages a set of styles. This class must manage a single global instance of the style catalog. The StyleCatalogFactory is not used anymore by the application. MicroStrategy Web now uses a generic configuration files cache mechanism (ConfigurationFilesCache and the style catalog is part of this cache. As before, the StyleCatalog can be accessed through the BeanContext (which will internally use the cache), or directly from the cache:
    StyleCatalog sc = (StyleCatalog) ConfigurationFilesCache.getConfiguration(path, StyleCatalogImpl.class); where path is the location of your styleCatalog.xml
    Since:
    MicroStrategy Web 7.3.1 or earlier
    See Also:
    ConfigurationFilesCache
    • Constructor Detail

      • StyleCatalogFactory

        protected StyleCatalogFactory()
        Deprecated.
    • Method Detail

      • newCatalog

        public StyleCatalog newCatalog​(java.lang.String fileName,
                                       boolean overwrite)
                                throws java.lang.IllegalArgumentException,
                                       WebTransformException
        Deprecated.
        Creates a new StyleCatalog object.
        Parameters:
        fileName - the file name of the new style catalog.
        overwrite - whether it will overwirte the file if it already exists.
        Returns:
        the StyleCatalog object created.
        Throws:
        java.lang.IllegalArgumentException - thrown if the file name exists and it can't overwrite it.
        WebTransformException - thrown if the fileName is invalid.
      • loadCatalog

        public StyleCatalog loadCatalog​(java.lang.String fileName)
                                 throws WebTransformException
        Deprecated.
        Loads the style catalog into memory from the file. The XML is validated.
        Parameters:
        fileName - the file that contains the style catalog information.
        Returns:
        the StyleCatalog object.
        Throws:
        WebTransformException
      • loadCatalog

        public StyleCatalog loadCatalog​(org.w3c.dom.Document doc)
                                 throws WebTransformException
        Deprecated.
        Loads the style catalog into memory from the DOM Document. Note that no validation is performed on the object model in this operation.
        Parameters:
        doc - the Document node that contains the style catalog information.
        Returns:
        the StyleCatalog object.
        Throws:
        WebTransformException
      • loadCatalogFromXML

        public StyleCatalog loadCatalogFromXML​(java.lang.String xml)
                                        throws WebTransformException
        Deprecated.
        Creates a style catalog object and loads it from the string xml specified. A DTD is automatically appended to the XML, and validated accordingly.
        Parameters:
        xml - the xml string containing the style catalog information.
        Returns:
        the StyleCatalog object created from the xml string.
        Throws:
        WebTransformException - thrown if the string xml does not contain a valid format or is null.
      • getTransformByClass

        public Transform getTransformByClass​(java.lang.String transformName)
                                      throws WebTransformException
        Deprecated.
        Returns an instance of the Transform class.
        Parameters:
        transformName - the fully qualified class name of the transform.
        Returns:
        an instance of the Transform object.
        Throws:
        WebTransformException - thrown if there is an error getting a new instance of the transform.
      • findTransforms

        public Transforms findTransforms​(java.lang.String packList)
        Deprecated.
        Returns a list of all transforms located in the specified packages
        Parameters:
        packList - a string countering semicolon separated list of Java packages where to look for transforms
        Returns:
        a Transforms collection containing all Transforms located in the specified packages
      • findTransforms

        public Transforms findTransforms​(java.lang.String packList,
                                         java.lang.String classPath)
        Deprecated.
        Returns a list ofall transforms located in the specified packages and in the specified class path.
        Parameters:
        packList - a string countering semicolon separeted list of Java packages where to look for transforms.
        classPath - a string containing the class path where to look for transforms.
        Returns:
        a Transforms collection containing all Transforms located in the specified packages and class path.