|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IPropertiesManager
This interface defines the methods would be used later for the working with the configuration functionality defined at the properties.
The com.sourceforge.jpatterns.core.configuration.PropertiesBasedFactory
class contains the getter returning the
implementation of the IPropertiesManager
. It is the single place where the configuration specifying which implementation
of the interface should be used is configured at the Java Sources. All the configuration settings necessary for implementing the
"factory" pattern is placed at the properties file, and then the JPatterns built-in pattern "factory" and xml configuration is used
later for retrieving the implementations of the interfaces.
Please review com.sourceforge.jpatterns.core.configuration.PropertiesBasedFactory#getPropertiesManager()
Please review properly the following Java Docs - it is important for understanding of the algorithm of working of the JPatterns
configuration functionality.
com.sourceforge.jpatterns.core.configuration.PropertiesProvider.JPProperties.USE_ONLY_CUSTOM_FRAMEWORK_PROPERTIES
todo [zmicer]: not sure if all these methods should take place here (e.g. getDefaultBundle etc)
$Author:: zmicer $
$Rev:: 67 $
* $Date:: 2007-08-28 21:37:07 #$
$Date:: 2007-08-28 21:37:07 #$
Method Summary | |
---|---|
boolean |
customConfigPresents()
|
boolean |
defaultConfigPresents()
|
String |
getBundle(Class key)
Get bundle for the provided key - it is a class. |
String |
getBundle(String key)
Return the bundle value using the ResourceBundle already retrieved. |
Object |
getBundledObject(Class key)
Get bundled object by the key provided. |
Object |
getBundledObject(String key)
Get bundled object by the String key provided. |
String |
getCustomBundle(String key)
Get the value from the custom bundle. this was provided in any case - potentially it could be used at the unit tests etc. |
String |
getDefaultBundle(String key)
Get the value from the default bundle. this was provided in any case - potentially it could be used at the unit tests etc. |
Set<String> |
getMergedKeys()
|
boolean |
useOnlyCustomConfigIfPresent()
This method returns the value of the props signing if custom properties file totally overrides the default, and if it is present, then the values from the default properties are not used at all. |
Method Detail |
---|
boolean customConfigPresents()
boolean defaultConfigPresents()
boolean useOnlyCustomConfigIfPresent()
com.sourceforge.jpatterns.core.configuration.PropertiesProvider.JPProperties.USE_ONLY_CUSTOM_FRAMEWORK_PROPERTIES
String getBundle(String key)
key
- for the value we need. Can not be null (otherwise IllegalArgumentException
would appear).
String getBundle(Class key)
key
- for the value we need, Class object. Can not be null (otherwise IllegalArgumentException
would appear).
Object getBundledObject(Class key)
JPConfigException
would appear.
key
- the class for which we should obtain appropriate implementation (usually it is class of the interface of abstract class
implementation of which we would obtain.)
Object getBundledObject(String key)
JPConfigException
would appear.
key
- the class for which we should obtain appropriate implementation (usually it is String - base name of the interface of
abstract class implementation of which we would obtain.)
String getDefaultBundle(String key)
key
- to be processed. Can not be null (otherwise IllegalArgumentException
would appear).
String getCustomBundle(String key)
key
- to be processed. Can not be null (otherwise IllegalArgumentException
would appear).
Set<String> getMergedKeys()
com.sourceforge.jpatterns.core.configuration.PropertiesProvider.JPProperties.USE_ONLY_CUSTOM_FRAMEWORK_PROPERTIES
)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |