Class VisualStyle
java.lang.Object
edu.internet2.middleware.grouper.app.visualization.VisualStyle
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.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionVisualStyle
(String prefix, GrouperConfig config, StyleObjectType objectType, VisualStyleSet owningStyleSet, VisualStyleSet defaultStyleSet) constructs a style mapping between property names and values -
Method Summary
Modifier and TypeMethodDescriptiongetProperty
(String name) This method pursues a few different lines to get at the property value.getProperty
(String name, String defaultValue) retrieves the property, or the default value if nullgetPropertyDirect
(String name) retrieves the property directly or null, without looking through the inheritance hierarchyvoid
setProperty
(String name, String 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.stemconfig
- previously instantiated GrouperConfigobjectType
- the style object typeowningStyleSet
- the current style set module this style resides in, or the default moduledefaultStyleSet
- the default style set, or null if this is the default
-
-
Method Details
-
getProperty
retrieves the property, or the default value if null- Parameters:
name
- property namedefaultValue
- fallback value when property is null- Returns:
- property value or default
-
getProperty
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
retrieves the property directly or null, without looking through the inheritance hierarchy- Parameters:
name
-- Returns:
-
setProperty
-