Interface StyleCatalog

    • 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.
      • getStyles

        Styles getStyles()
        Returns the Styles collection.
        Returns:
        the Styles 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.
      • 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. From EnumSortBy
        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. From EnumSortBy
        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 - the TransformDefn object used to filter the list of styles.
        sortBy - Defines sorting order. From EnumSortBy
        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 - the TransformDefn 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 transform
        java.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 object
        sourceLookup - the SourceLookup 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 transform
        java.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.
        Returns:
        StyleMaps a collection of StyleMap.
        Since:
        MicroStrategy Web 9.0.0
      • getMapperDefns

        MapperDefns getMapperDefns()
        Returns the collection fo mapper definitions.
        Returns:
        MapperDefns a collection of MapperDefn.
        Since:
        MicroStrategy Web 9.0.0