|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wicket.resource.PropertiesFactory
public class PropertiesFactory
Reloadable properties. It is not a 100% replacement for java.util.Properties as it does not provide the same interface. But is serves kind of the same purpose with Wicket specific features. PropertiesFactory actually loads and reloads the Properties and mataince a cache. Hence properties files are loaded just once.
IResourceSettings.getPropertiesFactory()
Constructor Summary | |
---|---|
PropertiesFactory()
Construct. |
Method Summary | |
---|---|
void |
addListener(IPropertiesReloadListener listener)
Add a listener which will be called after properties have been reloaded |
void |
clearCache()
Remove all cached properties |
java.lang.String |
createResourceKey(java.lang.Class componentClass,
java.util.Locale locale,
java.lang.String style)
Create a unique key to identify the properties file in the cache |
Properties |
get(Application application,
java.lang.Class clazz,
java.lang.String style,
java.util.Locale locale)
Get the properties for ... |
protected java.util.Map |
getCache()
For subclasses to get access to the cache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesFactory()
Method Detail |
---|
public void addListener(IPropertiesReloadListener listener)
IPropertiesFactory
addListener
in interface IPropertiesFactory
IPropertiesFactory.addListener(wicket.resource.IPropertiesReloadListener)
public Properties get(Application application, java.lang.Class clazz, java.lang.String style, java.util.Locale locale)
IPropertiesFactory
get
in interface IPropertiesFactory
application
- The application objectclazz
- The class that resources are bring loaded forstyle
- The style to load resources for (see Session
)locale
- The locale to load reosurces for
IPropertiesFactory.get(wicket.Application, java.lang.Class, java.lang.String, java.util.Locale)
protected final java.util.Map getCache()
public final void clearCache()
IPropertiesFactory
clearCache
in interface IPropertiesFactory
IPropertiesFactory.clearCache()
public final java.lang.String createResourceKey(java.lang.Class componentClass, java.util.Locale locale, java.lang.String style)
componentClass
- The class that resources are bring loaded forlocale
- The locale to load reosurces forstyle
- The style to load resources for (see Session
)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |