Interface StyleMap

  • All Superinterfaces:
    java.lang.Cloneable, ConfigurationElement
    All Known Implementing Classes:
    StyleMapImpl

    public interface StyleMap
    extends ConfigurationElement
    The StyleMap interface represents a collection of "style mapping clauses" that are evaluated for a particular style in this Style Catalog. "style mapping clauses" include zero or multiple mapping conditions and 0 or 1 default condition. default condition will be always eveluated as the last clause, and it will be met.
    Since:
    MicroStrategy Web 9.0.0
    • Method Detail

      • getStyleName

        java.lang.String getStyleName()
        Returns the style name that this map exists for.
        Returns:
        The style name that this map exists for.
      • setStyleName

        void setStyleName​(java.lang.String styleName)
        Sets the style name that this map exists for.
        Parameters:
        styleName - The name of the style that this map exists for.
      • getCount

        int getCount()
        Returns the number of StyleMapClause objects in this collection.
        Returns:
        The count of style map clause objects.
      • getStyleMapClause

        StyleMapClause getStyleMapClause​(int index)
                                  throws java.lang.IndexOutOfBoundsException
        Gets the StyleMapClause, both mapping conditions and default conditions, associated with supplied index. A valid index begins at 0 and continues to getCount() - 1.
        Parameters:
        index - The index of the StyleMapClause to return.
        Returns:
        The StyleMapClause at the supplied index.
        Throws:
        java.lang.IndexOutOfBoundsException - This exception is thown if the argument is outside the range of a valid index.
      • clear

        void clear()
            throws java.lang.UnsupportedOperationException
        Clears the collection of style map clause objects.
        Throws:
        java.lang.UnsupportedOperationException - This exception is thrown if the Style Catalog is in "read only" mode.
      • remove

        void remove​(int index)
             throws java.lang.IndexOutOfBoundsException,
                    java.lang.UnsupportedOperationException
        Removes the StyleMapClause object at the specified index.
        Parameters:
        index - The index of the style map clause object to remove.
        Throws:
        java.lang.IndexOutOfBoundsException - This exception is thown if the argument is outside the range of a valid index.
        java.lang.UnsupportedOperationException - This exception is thrown if the Style Catalog is in "read only" mode.
      • newStyleMapCondition

        StyleMapCondition newStyleMapCondition​(java.lang.String toStyle)
                                        throws java.lang.UnsupportedOperationException
        Creates a new style map condition object that, if the conditions were satifisfied, would map the style to the specified name.
        Parameters:
        toStyle - The name of the style to use if the conditions were met.
        Returns:
        A new StyleMapCondition object.
        Throws:
        java.lang.UnsupportedOperationException - This exception is thrown if the Style Catalog is in "read only" mode.
      • setStyleMapDefault

        StyleMapDefault setStyleMapDefault​(java.lang.String toStyle)
                                    throws java.lang.UnsupportedOperationException
        Sets a new style map default object that maps the style to the specified name.
        Parameters:
        toStyle - The name of the style to use.
        Returns:
        A new StyleMapDefault object.
        Throws:
        java.lang.UnsupportedOperationException - This exception is thrown if the Style Catalog is in "read only" mode.
      • mapStyle

        java.lang.String mapStyle​(java.lang.String origStyleName,
                                  StyleRequestContext context)
        Maps the original style name to a new one, based on the "style map clauses" contained in this map along with any contextual data.
        Parameters:
        origStyleName - The original style name.
        context - The StyleRequestContext object that contain context data.
        Returns:
        The name of the new style name to use.