com.sourceforge.jpatterns.patterns.config
Class JPConfigImpl
java.lang.Object
com.sourceforge.jpatterns.patterns.PatternBase
com.sourceforge.jpatterns.patterns.config.JPConfigImpl
- All Implemented Interfaces:
- IJPConfig, IJPattern, com.zmicer.utils.model.ICheckable, Serializable
public class JPConfigImpl
- extends PatternBase
- implements IJPConfig
The real, default implementation of the IJPConfig
pattern interface.
$Author:: $
$Rev:: $
$Date:: $
- See Also:
- Serialized Form
Field Summary |
static org.apache.log4j.Logger |
LOG
Logger instance. |
Method Summary |
boolean |
check()
|
boolean |
checkCastorConfig(com.sourceforge.jpatterns.schema.CastorSectionType castorSectionType)
Make the check this type of the castor config fits the pattern |
String |
getValue(String key,
String scope)
Get the value using the key provided. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.sourceforge.jpatterns.patterns.IJPattern |
init |
LOG
public static final org.apache.log4j.Logger LOG
- Logger instance.
JPConfigImpl
public JPConfigImpl()
getValue
public String getValue(String key,
String scope)
throws JPConfigException
- Description copied from interface:
IJPConfig
- Get the value using the key provided. It is the simplest form of this config pattern, still if to remember about the scopes and names - it
provides lots of usefull facilities.
- Specified by:
getValue
in interface IJPConfig
- Parameters:
key
- the key using which we should obtain the value
Can not be null (otherwise IllegalArgumentException
would appear).scope
- the scope to be used
Can not be null (otherwise IllegalArgumentException
would appear).
- Returns:
- the necessary value to be retrieved. Nul won't be retrieved here as the JPConfigException would be thrown
- Throws:
JPConfigException
- would be thrown in the case of smth. wrong with the configuration. Please be noticed it could be
JPConsumerConfigException and JPFrameworkConfigException
- See Also:
IJPConfig.getValue(String, String)
checkCastorConfig
public boolean checkCastorConfig(com.sourceforge.jpatterns.schema.CastorSectionType castorSectionType)
- Description copied from interface:
IJPattern
- Make the check this type of the castor config fits the pattern
- Specified by:
checkCastorConfig
in interface IJPattern
- Specified by:
checkCastorConfig
in class PatternBase
- Parameters:
castorSectionType
- the castor config object which is the root configuration storage for all the patterns (according to the XSD scheme)
- Returns:
- true if this fits to the pattern implementation nature, and false otherwise
- See Also:
IJPattern.checkCastorConfig(com.sourceforge.jpatterns.schema.CastorSectionType)
check
public boolean check()
- Specified by:
check
in interface com.zmicer.utils.model.ICheckable
- Overrides:
check
in class PatternBase
- See Also:
ICheckable.check()
Copyright © 2007 jzmicer.team. All Rights Reserved.