public class ComponentPropertySourceImpl extends java.lang.Object implements ComponentPropertySource, ResetEventListener
TODO: Figure out a testing strategy for this beast!
Constructor and Description |
---|
ComponentPropertySourceImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getComponentProperty(IComponent component,
java.lang.String propertyName)
Returns the property value for a particular named meta-data property of the component.
|
java.lang.String |
getLocalizedComponentProperty(IComponent component,
java.util.Locale locale,
java.lang.String propertyName)
Like
ComponentPropertySource.getComponentProperty(IComponent, String) , but the property name will be
localized to the component's current locale (determined from its page). |
java.lang.String |
getLocalizedNamespaceProperty(INamespace namespace,
java.util.Locale locale,
java.lang.String propertyName)
|
java.lang.String |
getNamespaceProperty(INamespace namespace,
java.lang.String propertyName)
Returns the property value for a particular named meta-data property of the namespace.
|
void |
resetEventDidOccur() |
void |
setChainBuilder(org.apache.hivemind.lib.chain.ChainBuilder chainBuilder) |
void |
setGlobalProperties(IPropertySource globalProperties) |
public ComponentPropertySourceImpl()
public void resetEventDidOccur()
resetEventDidOccur
in interface ResetEventListener
public java.lang.String getComponentProperty(IComponent component, java.lang.String propertyName)
ComponentPropertySource
getComponentProperty
in interface ComponentPropertySource
public java.lang.String getLocalizedComponentProperty(IComponent component, java.util.Locale locale, java.lang.String propertyName)
ComponentPropertySource
ComponentPropertySource.getComponentProperty(IComponent, String)
, but the property name will be
localized to the component's current locale (determined from its page). Localizing the
property name means that a suffix may be appended to it. If the fully localized name is not
found, then the locale is generalized (i.e., from "en_UK" to "en" to nothing) until a match
is found.getLocalizedComponentProperty
in interface ComponentPropertySource
public java.lang.String getNamespaceProperty(INamespace namespace, java.lang.String propertyName)
ComponentPropertySource
getNamespaceProperty
in interface ComponentPropertySource
public java.lang.String getLocalizedNamespaceProperty(INamespace namespace, java.util.Locale locale, java.lang.String propertyName)
ComponentPropertySource
ComponentPropertySource.getLocalizedComponentProperty(IComponent, Locale, String)
, but with a
INamespace
.getLocalizedNamespaceProperty
in interface ComponentPropertySource
public void setChainBuilder(org.apache.hivemind.lib.chain.ChainBuilder chainBuilder)
public void setGlobalProperties(IPropertySource globalProperties)