java.lang.Object
edu.internet2.middleware.grouper.app.visualization.VisualStyle

public class VisualStyle extends Object
A visual style containing a set of properties as defined in grouper.properties. The property names are strings that map to a string value. The values can be null (since GrouperConfig doesn't easily read in blank values), so callers should query properties using the optional default if non-null properties are required. If the style has a property for "inherit", retrieval will look into its inherited style hierarchy, recursively, until it finds a non-null value.
  • Constructor Details

    • VisualStyle

      public VisualStyle(String prefix, GrouperConfig config, StyleObjectType objectType, VisualStyleSet owningStyleSet, VisualStyleSet defaultStyleSet)
      constructs a style mapping between property names and values
      Parameters:
      prefix - config property prefix, for example visualization.style.stem or visualization.module.graphviz.stem
      config - previously instantiated GrouperConfig
      objectType - the style object type
      owningStyleSet - the current style set module this style resides in, or the default module
      defaultStyleSet - the default style set, or null if this is the default
  • Method Details

    • getProperty

      public String getProperty(String name, String defaultValue)
      retrieves the property, or the default value if null
      Parameters:
      name - property name
      defaultValue - fallback value when property is null
      Returns:
      property value or default
    • getProperty

      public String getProperty(String name)
      This method pursues a few different lines to get at the property value. First, it may be directly defined. Second, //todo pass all unit tests before finishing this
      Parameters:
      name - property name
      Returns:
      property value, directly or through inherited styles
    • getPropertyDirect

      public String getPropertyDirect(String name)
      retrieves the property directly or null, without looking through the inheritance hierarchy
      Parameters:
      name -
      Returns:
    • setProperty

      public void setProperty(String name, String value)