public class

StyleCatalogFactory

extends Object
java.lang.Object
   ↳ com.microstrategy.web.transform.StyleCatalogFactory

This class is deprecated.
The StyleCatalogFactory is not used anymore by the application. To load a catalog, you may use directly the ConfigurationFilesCache

Class Overview

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

Summary

Protected Constructors
StyleCatalogFactory()
Public Methods
Transforms findTransforms(String packList, String classPath)
Returns a list ofall transforms located in the specified packages and in the specified class path.
Transforms findTransforms(String packList)
Returns a list of all transforms located in the specified packages
static StyleCatalogFactory getInstance()
Transform getTransformByClass(String transformName)
Returns an instance of the Transform class.
synchronized StyleCatalog loadCatalog(Document doc)
Loads the style catalog into memory from the DOM Document.
synchronized StyleCatalog loadCatalog(String fileName)
Loads the style catalog into memory from the file.
StyleCatalog loadCatalogFromXML(String xml)
Creates a style catalog object and loads it from the string xml specified.
synchronized StyleCatalog newCatalog(String fileName, boolean overwrite)
Creates a new StyleCatalog object.
void setSystemCatalog(StyleCatalog catalog)
This method is deprecated. Please use methods like loadCatalog(Document), loadCatalog(String), loadCatalog(String), newCatalog(String, boolean) instead to set up the style catalog.
[Expand]
Inherited Methods
From class java.lang.Object

Protected Constructors

protected StyleCatalogFactory ()

Public Methods

public Transforms findTransforms (String packList, String classPath)

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.

public Transforms findTransforms (String packList)

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

public static StyleCatalogFactory getInstance ()

public Transform getTransformByClass (String transformName)

Returns an instance of the Transform class.

Parameters
transformName the fully qualified class name of the transform.
Returns
Throws
WebTransformException thrown if there is an error getting a new instance of the transform.

public synchronized StyleCatalog loadCatalog (Document doc)

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

public synchronized StyleCatalog loadCatalog (String fileName)

Loads the style catalog into memory from the file. The XML is validated.

Parameters
fileName the file that contains the style catalog information.
Returns

public StyleCatalog loadCatalogFromXML (String xml)

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
Throws
WebTransformException thrown if the string xml does not contain a valid format or is null.

public synchronized StyleCatalog newCatalog (String fileName, boolean overwrite)

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
Throws
IllegalArgumentException thrown if the file name exists and it can't overwrite it.
WebTransformException thrown if the fileName is invalid.

public void setSystemCatalog (StyleCatalog catalog)

This method is deprecated.
Please use methods like loadCatalog(Document), loadCatalog(String), loadCatalog(String), newCatalog(String, boolean) instead to set up the style catalog.

Sets the system style Catalog

Parameters
catalog the StyleCatalog object set as the system style catalog.
Throws
IllegalArgumentException thrown if the style catalog is null.