Class StyleManager

java.lang.Object
org.eclnt.jsfserver.util.StyleManager
All Implemented Interfaces:
ICCServerConstants

public class StyleManager extends Object implements ICCServerConstants
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.
  • Constructor Details

    • StyleManager

      public StyleManager()
  • Method Details

    • reset

      public static void reset()
      Allows to reset the stlye manager without restarting Tomcat...
    • updatePrefix

      public static String updatePrefix(String tagName)
    • getTagInfo

      public static StyleManager.StyleTagInfo getTagInfo(String variantName, 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 String getTagAttributeValue(String variantName, String tagNameWithPrefix, 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 String getStyleValue(String valueName)
    • getStyleValue

      public static String getStyleValue(String styleName, String valueName)
      Get style value. Style values are the values defined via .
    • getStyle

      public static StyleManager.Style getStyle(String styleName)
      Reads style at runtime.
    • getStyleExtensionSequence

      public static List<String> getStyleExtensionSequence(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(String styleName, String variantName, String includingPageName, String componentLayoutId, String tagNameWithPrefix)
      Style access with cascading over styleVariant, includingPageName, componentId.
    • getTagInfo

      public static StyleManager.StyleTagInfo getTagInfo(String styleName, String variantName, 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(String styleName)
    • registerStyle

      public static void registerStyle(String styleName, boolean withError)
    • getAvailableRuntimeStyles

      public static List<String> getAvailableRuntimeStyles()
    • readDesignTimeStyle

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

      public static StyleManager.Style readDesignTimeStyle(String styleName, String styleFileName, ClassLoader cl)
    • addCSSGlobalVariablesToDeignTimeStyle

      public static void addCSSGlobalVariablesToDeignTimeStyle(StyleManager.Style style, String styleFileName)
    • combineStyleWithAdditionalStyles

      public static String combineStyleWithAdditionalStyles(String xml, String styleName, ClassLoader cl)
      Combines the CSS-style-xml with additional style information coming from additional styles coming from the classloader (page bean components).