Package com.microstrategy.web.transform
Interface StyleCatalog
-
- All Superinterfaces:
java.lang.Cloneable
,ConfigurationElement
,ConfigurationFile
- All Known Implementing Classes:
StyleCatalogImpl
public interface StyleCatalog extends ConfigurationElement, ConfigurationFile
The StyleCatalog interface presents the methods that a caller needs to manage the state of a style catalog.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deleteTransformDefnFromStyles(TransformDefn trDef, boolean removeStyles)
Cleans all the possible associatios made to the TransformDefn object specified.BeanDefn
getBeanDefn(TransformDefn tDefn)
Returns the BeanDefn for a bean supported by this transform.BeanDefns
getBeanDefns()
Returns the BeanDefns collection.java.lang.String
getDescription()
Returns the textual description of the style catalog.java.lang.String
getFileName()
Returns the file name used by the style catalog.LayoutParserDefns
getLayoutParserDefns()
Gets the collection of layout parser definition objects.LayoutSourceDefns
getLayoutSourceDefns()
Gets the collection of layout source definition objects.MapperDefns
getMapperDefns()
Returns the collection fo mapper definitions.java.lang.String
getName()
Returns the name of the style catalog.SourceLookup
getSourceLookup(java.lang.String source)
Returns the registered SourceLookup object with the specified name.StyleMaps
getStyleMaps()
Returns the collection of style maps.Styles
getStyles()
Returns the Styles collection.Transform
getTransformByStyle(java.lang.String styleName)
Returns the transform object associated with the specified style.Transform
getTransformByStyle(java.lang.String styleName, StyleRequestContext context)
Returns the transform object associated with the specified style.TransformDefns
getTransformDefns()
Returns the TransformDefns collection.java.lang.String
getVersion()
Returns the current version of the styleCatalogboolean
hasChanged()
Returns whether the style catalog has changed.Styles
listStyles(TransformDefn trDef, int sortBy)
Lists all styles for a specified transform.Styles
listStylesForBean(java.lang.String beanName, int sortBy)
Lists styles filtered by the bean type and/or sorted by bean type.TransformDefns
listTransformDefns(java.lang.String beanName, int sortBy)
Lists transform definitions filtered by the bean type and/or sorted by bean type.void
reset()
Reloads the previous style catalog file - undoing any in-memory changes reverting back to the file definition.void
save()
Saves the contents of the style catalog to disk.StyleCatalog
saveAs(java.lang.String fileName, boolean overwrite)
Saves the contents of the style catalog in a new instance and to disk.void
setDescription(java.lang.String description)
Sets the textual description of the style catalog.void
setFileName(java.lang.String fileName)
Sets the name of the file used by the style catalog.void
setName(java.lang.String name)
Sets the name of the style catalog.void
setSourceLookup(java.lang.String source, SourceLookup sourceLookup)
Registers a SourceLookup object with the specified key.-
Methods inherited from interface com.microstrategy.utils.config.ConfigurationElement
getAttribute, getAttributes, getElement, getElements, getKey, getNodeName, getStrAttribute, initFromXML, reload, toXML
-
Methods inherited from interface com.microstrategy.utils.config.ConfigurationFile
applyCustomization, applyCustomizations, load, reload, save, setUseValidation, useValidation
-
-
-
-
Method Detail
-
getFileName
java.lang.String getFileName()
Returns the file name used by the style catalog.- Returns:
- the file name used by the style catalog.
-
setFileName
void setFileName(java.lang.String fileName)
Sets the name of the file used by the style catalog.- Parameters:
fileName
- the file name used by the style catalog.
-
getName
java.lang.String getName()
Returns the name of the style catalog.- Returns:
- the name of the style catalog.
-
setName
void setName(java.lang.String name)
Sets the name of the style catalog.- Parameters:
name
- the name of the style catalog.
-
getDescription
java.lang.String getDescription()
Returns the textual description of the style catalog.- Returns:
- the description of the style catalog.
-
setDescription
void setDescription(java.lang.String description)
Sets the textual description of the style catalog.- Parameters:
description
- the description of the style catalog.
-
getTransformDefns
TransformDefns getTransformDefns()
Returns the TransformDefns collection.- Returns:
- the
TransformDefns
object.
-
getBeanDefns
BeanDefns getBeanDefns()
Returns the BeanDefns collection.- Returns:
- the
BeanDefns
object.
-
getBeanDefn
BeanDefn getBeanDefn(TransformDefn tDefn)
Returns the BeanDefn for a bean supported by this transform.- Returns:
- the
BeanDefn
for a bean supported by this transform.
-
hasChanged
boolean hasChanged()
Returns whether the style catalog has changed.- Returns:
- whether the style catalog changed.
-
save
void save() throws WebTransformException
Saves the contents of the style catalog to disk.- Specified by:
save
in interfaceConfigurationFile
- Throws:
WebTransformException
- thrown if an error saving to the file occurs.
-
saveAs
StyleCatalog saveAs(java.lang.String fileName, boolean overwrite) throws WebTransformException, java.lang.IllegalArgumentException
Saves the contents of the style catalog in a new instance and to disk.- Parameters:
fileName
- the name of the file for the new StyleCatalog object.overwrite
- whether it overwrites the file if already exists.- Returns:
- a new instance of the StyleCatalog object with the copied contents.
- Throws:
WebTransformException
- thrown if an error saving to the file occurs.java.lang.IllegalArgumentException
- thrown if the file name exists and it can't overwrite it.
-
listTransformDefns
TransformDefns listTransformDefns(java.lang.String beanName, int sortBy) throws java.lang.IllegalArgumentException
Lists transform definitions filtered by the bean type and/or sorted by bean type.- Parameters:
beanName
- the filer bean type. Must be a valid bean type or FILTER_NONE, in which case no filtering will be performed.sortBy
- Defines sorting order. FromEnumSortBy
- Returns:
- a subset of TransformDefinition objects filtered according to the beanName parameter and sorted according to the sortBy parameter. Returned subset is read-only, calling any update method on it will result in UnsupportedOperationException.
- Throws:
java.lang.IllegalArgumentException
- thrown if the sortBy parameter is invalid.
-
listStylesForBean
Styles listStylesForBean(java.lang.String beanName, int sortBy) throws java.lang.IllegalArgumentException
Lists styles filtered by the bean type and/or sorted by bean type.- Parameters:
beanName
- the filer bean type. Must be a valid bean type or FILTER_NONE, in which case no filtering will be performed.sortBy
- Defines sorting order. FromEnumSortBy
- Returns:
- a subset of Style objects filtered according to the beanName parameter and sorted according to the sortBy parameter. Returned subset is read-only, calling any update method on it will result in UnsupportedOperationException.
- Throws:
java.lang.IllegalArgumentException
- thrown if the sortBy parameter is invalid.
-
listStyles
Styles listStyles(TransformDefn trDef, int sortBy) throws java.lang.IllegalArgumentException
Lists all styles for a specified transform. Styles will be sorted according to the sortBy value.- Parameters:
trDef
- theTransformDefn
object used to filter the list of styles.sortBy
- Defines sorting order. FromEnumSortBy
- Returns:
- a subset of Style objects belonging to the specified TransformDefinition and sorted according to the sortBy parameter Returned subset is read-only, calling any update method on it will result in UnsupportedOperationException.
- Throws:
java.lang.IllegalArgumentException
- thrown if the sortBy parameter is invalid or the TransformDefn object is null.
-
deleteTransformDefnFromStyles
void deleteTransformDefnFromStyles(TransformDefn trDef, boolean removeStyles) throws java.lang.IllegalArgumentException
Cleans all the possible associatios made to the TransformDefn object specified. It will have the option to remove all the Style objects associated with this TransformDefn object.- Parameters:
trDef
- theTransformDefn
object you want to remove.removeStyles
- inicates whether you want to remove the styles associated with this TransformDefn object or not.- Throws:
java.lang.IllegalArgumentException
- thrown if the TransformDefn object is null.
-
getTransformByStyle
Transform getTransformByStyle(java.lang.String styleName) throws WebTransformException, java.lang.IllegalArgumentException
Returns the transform object associated with the specified style.- Parameters:
styleName
- the name of the style.- Returns:
- an instance of the
Transform
object. - Throws:
WebTransformException
- thrown if there is an error getting a new instance of the transformjava.lang.IllegalArgumentException
- thrown if the style name was not found in this style catalog.
-
getLayoutSourceDefns
LayoutSourceDefns getLayoutSourceDefns()
Gets the collection of layout source definition objects.- Returns:
- The collection of layout source definition objects.
- Since:
- MicroStrategy Web 8.0.0
-
getLayoutParserDefns
LayoutParserDefns getLayoutParserDefns()
Gets the collection of layout parser definition objects.- Returns:
- The collection of layout parser definition objects.
- Since:
- MicroStrategy Web 8.0.0
-
reset
void reset() throws WebTransformException
Reloads the previous style catalog file - undoing any in-memory changes reverting back to the file definition. Nothing happens if a style catalog was not previously loaded.
- Throws:
WebTransformException
- Since:
- MicroStrategy Web 8.0.0
-
getVersion
java.lang.String getVersion()
Returns the current version of the styleCatalog- Returns:
- the version of the styleCatalog
- Since:
- MicroStrategy Web 8.0.0
-
getSourceLookup
SourceLookup getSourceLookup(java.lang.String source)
Returns the registered SourceLookup object with the specified name.- Parameters:
source
- the name used to look up the SourceLookup object.- Returns:
- the SourceLookup object with the specified name.
- Since:
- MicroStrategy Web 8.0.0
-
setSourceLookup
void setSourceLookup(java.lang.String source, SourceLookup sourceLookup)
Registers a SourceLookup object with the specified key.- Parameters:
source
- the key mapped to the SourceLookup objectsourceLookup
- theSourceLookup
object to register- Since:
- MicroStrategy Web 8.0.0
-
getTransformByStyle
Transform getTransformByStyle(java.lang.String styleName, StyleRequestContext context) throws WebTransformException, java.lang.IllegalArgumentException
Returns the transform object associated with the specified style.- Parameters:
styleName
- the name of the style.context
- the StyleRequestContext object used to resolve dynamic actual parameter values.- Returns:
- an instance of the
Transform
object. - Throws:
WebTransformException
- thrown if there is an error getting a new instance of the transformjava.lang.IllegalArgumentException
- thrown if the style name was not found in this style catalog.- Since:
- MicroStrategy Web 8.0.0
-
getStyleMaps
StyleMaps getStyleMaps()
Returns the collection of style maps.
-
getMapperDefns
MapperDefns getMapperDefns()
Returns the collection fo mapper definitions.- Returns:
MapperDefns
a collection ofMapperDefn
.- Since:
- MicroStrategy Web 9.0.0
-
-