|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tapestry.services.impl.ComponentPropertySourceImpl
public class ComponentPropertySourceImpl
Implementation of tapestry.props.ComponentPropertySource.
TODO: Figure out a testing strategy for this beast!
Constructor Summary | |
---|---|
ComponentPropertySourceImpl()
|
Method Summary | |
---|---|
String |
getComponentProperty(IComponent component,
String propertyName)
Returns the property value for a particular named meta-data property of the component. |
String |
getLocalizedComponentProperty(IComponent component,
Locale locale,
String propertyName)
Like ComponentPropertySource.getComponentProperty(IComponent, String) , but the property name will be
localized to the component's current locale (determined from its page). |
String |
getLocalizedNamespaceProperty(INamespace namespace,
Locale locale,
String propertyName)
As with ComponentPropertySource.getLocalizedComponentProperty(IComponent, Locale, String) , but with a
INamespace . |
String |
getNamespaceProperty(INamespace namespace,
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComponentPropertySourceImpl()
Method Detail |
---|
public void resetEventDidOccur()
resetEventDidOccur
in interface ResetEventListener
public String getComponentProperty(IComponent component, String propertyName)
ComponentPropertySource
getComponentProperty
in interface ComponentPropertySource
component
- The IComponent
to get the property of.propertyName
- Key of the property.
public String getLocalizedComponentProperty(IComponent component, Locale locale, 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
component
- The IComponent
to get the property of.locale
- The Locale
to get properties for.propertyName
- Key of the property.
public String getNamespaceProperty(INamespace namespace, String propertyName)
ComponentPropertySource
getNamespaceProperty
in interface ComponentPropertySource
namespace
- The namespace to get the property from.propertyName
- The key of the property to get.
public String getLocalizedNamespaceProperty(INamespace namespace, Locale locale, String propertyName)
ComponentPropertySource
ComponentPropertySource.getLocalizedComponentProperty(IComponent, Locale, String)
, but with a
INamespace
.
getLocalizedNamespaceProperty
in interface ComponentPropertySource
namespace
- The namespace to get the property from.locale
- Locale
to filter the properties for.propertyName
- The key of the property to get.
public void setChainBuilder(org.apache.hivemind.lib.chain.ChainBuilder chainBuilder)
public void setGlobalProperties(IPropertySource globalProperties)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |