|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sourceforge.jpatterns.patterns.PatternBase
public abstract class PatternBase
The abstratc class to implement the IJPattern - provides base facilities for all the IJPattern implementations.
todo [zmicer]: tests redesign - move from JPFactoryImpl to this class test
$Author:: $
$Rev:: $
$Date:: $
| Field Summary | |
|---|---|
static org.apache.log4j.Logger |
LOG
Logger instance. |
protected com.sourceforge.jpatterns.schema.CastorSectionType |
m_castorSection
The castor config object used for the storing business info. |
protected JPatternsConfigsBean |
m_configBean
The config bean - is a wrapper under the Factory castor config bean. |
| Constructor Summary | |
|---|---|
PatternBase()
|
|
| Method Summary | |
|---|---|
boolean |
check()
|
abstract boolean |
checkCastorConfig(com.sourceforge.jpatterns.schema.CastorSectionType castorSectionType)
Make the check this type of the castor config fits the pattern |
protected String |
getActualScope(String scope,
com.sourceforge.jpatterns.schema.CastorSectionType section)
Get the actual scope. |
void |
init(com.sourceforge.jpatterns.schema.CastorSectionType castorSectionType,
JPatternsConfigsBean configBean)
Perform the initialization of the JPatterns with the appropriate child instance of CastorSectionType castor config
class and the JPatternsConfigsBean bean storing all the consumer configuration. |
protected void |
logAndThrow(String message)
Log the message and then throw it. |
protected com.sourceforge.jpatterns.schema.Item |
retrieveItem(Object nameStorage,
String scope)
Retrieve the item object from the castor factory storing in this model factory object using the provided information: the name of the business item and the scope provided. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.log4j.Logger LOG
protected com.sourceforge.jpatterns.schema.CastorSectionType m_castorSection
JPatternsConfigsBean which is the JPatterns consumer configuration entry point.
protected JPatternsConfigsBean m_configBean
| Constructor Detail |
|---|
public PatternBase()
| Method Detail |
|---|
public abstract boolean checkCastorConfig(com.sourceforge.jpatterns.schema.CastorSectionType castorSectionType)
IJPattern
checkCastorConfig in interface IJPatterncastorSectionType - the castor config object which is the root configuration storage for all the patterns (according to the XSD scheme)
IJPattern.checkCastorConfig(com.sourceforge.jpatterns.schema.CastorSectionType)
public void init(com.sourceforge.jpatterns.schema.CastorSectionType castorSectionType,
JPatternsConfigsBean configBean)
IJPatternCastorSectionType castor config
class and the JPatternsConfigsBean bean storing all the consumer configuration.
init in interface IJPatterncastorSectionType - castor config object of CastorSectionType class.
Can not be null (otherwise IllegalArgumentException would appear).configBean - JPatternsConfigsBean config bean with all the JPatterns consumer configuration.
Can not be null (otherwise IllegalArgumentException would appear).IJPattern.init(com.sourceforge.jpatterns.schema.CastorSectionType,
com.sourceforge.jpatterns.core.configuration.model.JPatternsConfigsBean)public boolean check()
check in interface com.zmicer.utils.model.ICheckableICheckable.check()
protected String getActualScope(String scope,
com.sourceforge.jpatterns.schema.CastorSectionType section)
scope - the scope variable to be checked. Could be null, in this case we would deal with the scope of the section typesection - the castor section scope of which would be used (in any case this object and its scope can not be null)
protected com.sourceforge.jpatterns.schema.Item retrieveItem(Object nameStorage,
String scope)
nameStorage - the name of the Item to be retrieved. Can not be null (otherwise IllegalArgumentException would
appear).scope - the scope we need to use, could be null.
protected void logAndThrow(String message)
throws JPConfigException
message - the not emopty message to be thrown and logged
JPConfigException - always, using message
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||