org.eclnt.jsfserver.util

## Class StyleManager

- java.lang.Object
- - org.eclnt.jsfserver.util.StyleManager

-     public class StyleManager
      extends java.lang.Object

  Access to style definitions. In general the style information is read when starting the web application - so you should only access the get-methods in order to gather for style information.
  Please also check class `StyleUtil`, which contains useful methods in the area of style management.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `StyleManager.CSSStyleParser`
    `static class` | `StyleManager.Style`
    `static class` | `StyleManager.StyleAttributeValue` Concrete attribute-value-pair.
    `static class` | `StyleManager.StyleParser`
    `static class` | `StyleManager.StyleTagInfo` Style information for a tag.
    `static class` | `StyleManager.StyleValue` Style value that is added to the style via:
    `static class` | `StyleManager.StyleVariant`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StyleManager()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `combineStyleWithAdditionalStyles(java.lang.String xml, java.lang.String styleName, java.lang.ClassLoader cl)` Combines the CSS-style-xml with additional style information coming from additional styles coming from the classloader (page bean components).
    `static java.util.List<java.lang.String>` | `getAvailableRuntimeStyles()`
    `static StyleManager.Style` | `getStyle(java.lang.String styleName)` Reads style at runtime.
    `static java.util.List<java.lang.String>` | `getStyleExtensionSequence(java.lang.String styleName)` Reads extension sequence for a given style.
    `static java.lang.String` | `getStyleValue(java.lang.String valueName)`
    `static java.lang.String` | `getStyleValue(java.lang.String styleName, java.lang.String valueName)` Get style value.
    `static java.lang.String` | `getTagAttributeValue(java.lang.String variantName, java.lang.String tagNameWithPrefix, java.lang.String attributeName)` Convenience method - returning the style value for a certain tag.
    `static StyleManager.StyleTagInfo` | `getTagInfo(java.lang.String variantName, java.lang.String tagNameWithPrefix)` Convenience method - returning the style information for the style that is used within the current session of the user.
    `static StyleManager.StyleTagInfo` | `getTagInfo(java.lang.String styleName, java.lang.String variantName, java.lang.String tagNameWithPrefix)` Central method for getting style information for a certain tag.
    `static StyleManager.Style` | `readDesignTimeStyle(java.lang.String styleName, java.lang.String styleFileName)`
    `static StyleManager.Style` | `readDesignTimeStyle(java.lang.String styleName, java.lang.String styleFileName, java.lang.ClassLoader cl)`
    `static void` | `registerStyle(java.lang.String styleName)`
    `static void` | `reset()` Allows to reset the stlye manager without restarting Tomcat...
    `static java.lang.String` | `updatePrefix(java.lang.String tagName)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StyleManager

          public StyleManager()

  - ### Method Detail

    - #### reset

          public static void reset()

      Allows to reset the stlye manager without restarting Tomcat...

    - #### updatePrefix

          public static java.lang.String updatePrefix(java.lang.String tagName)

    - #### getTagInfo

          public static StyleManager.StyleTagInfo getTagInfo(java.lang.String variantName,
                                                             java.lang.String tagNameWithPrefix)

      Convenience method - returning the style information for the style that is used within the current session of the user. This method must only be used within the context of a request processing.

    - #### getTagAttributeValue

          public static java.lang.String getTagAttributeValue(java.lang.String variantName,
                                                              java.lang.String tagNameWithPrefix,
                                                              java.lang.String attributeName)

      Convenience method - returning the style value for a certain tag.
      Parameters:
        `variantName` - e.g. "default"
        `tagNameWithPrefix` - e.g. "t:field"
        `attributeName` - e.g. "background"
      Returns:
        Style value, null if not defined.

    - #### getStyleValue

          public static java.lang.String getStyleValue(java.lang.String valueName)

    - #### getStyleValue

          public static java.lang.String getStyleValue(java.lang.String styleName,
                                                       java.lang.String valueName)

      Get style value. Style values are the values defined via .

    - #### getStyle

          public static StyleManager.Style getStyle(java.lang.String styleName)

      Reads style at runtime.

    - #### getStyleExtensionSequence

          public static java.util.List<java.lang.String> getStyleExtensionSequence(java.lang.String styleName)

      Reads extension sequence for a given style. The first style in the list is the most basic style, the last style in the list is the style passed via parameter "styleName". This is a runtime function.

    - #### getTagInfo

          public static StyleManager.StyleTagInfo getTagInfo(java.lang.String styleName,
                                                             java.lang.String variantName,
                                                             java.lang.String tagNameWithPrefix)

      Central method for getting style information for a certain tag.
      Parameters:
        `tagNameWithPrefix` - Full tag name, including prefix, e.g. "t:field".
      Returns:
        Null if nothing found.

    - #### registerStyle

          public static void registerStyle(java.lang.String styleName)

    - #### getAvailableRuntimeStyles

          public static java.util.List<java.lang.String> getAvailableRuntimeStyles()

    - #### readDesignTimeStyle

          public static StyleManager.Style readDesignTimeStyle(java.lang.String styleName,
                                                               java.lang.String styleFileName)

    - #### readDesignTimeStyle

          public static StyleManager.Style readDesignTimeStyle(java.lang.String styleName,
                                                               java.lang.String styleFileName,
                                                               java.lang.ClassLoader cl)

    - #### combineStyleWithAdditionalStyles

          public static java.lang.String combineStyleWithAdditionalStyles(java.lang.String xml,
                                                                          java.lang.String styleName,
                                                                          java.lang.ClassLoader cl)

      Combines the CSS-style-xml with additional style information coming from additional styles coming from the classloader (page bean components).

Copyright © CaptainCasa Gmbh. All Rights Reserved.