Class StyleMapImpl

    • Field Detail

      • ELEM_NAME_STYLEMAP

        public static final java.lang.String ELEM_NAME_STYLEMAP
        The name of the style map element.
        See Also:
        Constant Field Values
      • ATTR_NAME_STYLEMAP_FROM_STYLE

        public static final java.lang.String ATTR_NAME_STYLEMAP_FROM_STYLE
        The name of the style map "from style" attribute.
        See Also:
        Constant Field Values
    • Constructor Detail

      • StyleMapImpl

        public StyleMapImpl()
    • Method Detail

      • getStyleName

        public java.lang.String getStyleName()
        Returns the style name that this map exists for.
        Specified by:
        getStyleName in interface StyleMap
        Returns:
        The style name that this map exists for.
      • setStyleName

        public void setStyleName​(java.lang.String styleName)
        Sets the style name that this map exists for.
        Specified by:
        setStyleName in interface StyleMap
        Parameters:
        styleName - The name of the style that this map exists for.
        Throws:
        java.lang.IllegalArgumentException - DOCUMENT ME!
      • getCount

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

        public StyleMapClause getStyleMapClause​(int index)
                                         throws java.lang.IndexOutOfBoundsException
        Gets the StyleMapClause associated with supplied index. A valid index begins at 0 and continues to getCount() - 1.
        Specified by:
        getStyleMapClause in interface StyleMap
        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

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

        public void remove​(int index)
                    throws java.lang.IndexOutOfBoundsException,
                           java.lang.UnsupportedOperationException
        Removes the StyleMapClause object at the specified index.
        Specified by:
        remove in interface StyleMap
        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

        public StyleMapCondition newStyleMapCondition​(java.lang.String toStyle,
                                                      java.lang.String mapperDefn,
                                                      java.lang.String addlData)
        Creates a new style map condition object that, if the conditions were satisfied, would map the style to the specified name.
        Parameters:
        toStyle - The name of the style to use if the conditions were met.
        mapperDefn - The name of the MapperDefn object associated with this mapping condition.
        addlData - The additional data associated with this mapping condition.
        Returns:
        A new StyleMapCondition object.
        Since:
        MicroStrategy Web 9.0.1
      • setStyleMapDefault

        public StyleMapDefault setStyleMapDefault​(java.lang.String toStyle)
                                           throws java.lang.UnsupportedOperationException
        Creates a new style map default object that maps the style to the specified name.
        Specified by:
        setStyleMapDefault in interface StyleMap
        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

        public 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.
        Specified by:
        mapStyle in interface StyleMap
        Parameters:
        origStyleName - The original style name.
        context - The StyleRequestContext object that contain context data.
        Returns:
        The name of the new style name to use.
      • getKeyAttribute

        protected java.lang.String getKeyAttribute()
        Description copied from class: AbstractConfigurationElement
        This method must return the attribute that uniquely identifies this element among its siblings; if no single attribute can be used, return null and override the getKey and setKey methods.
        Specified by:
        getKeyAttribute in class AbstractConfigurationElement