|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sourceforge.jpatterns.core.configuration.model.JPatternsConfigBaseBean
public class JPatternsConfigBaseBean
This base class defines the fields are necessary for the defining the context of one/any combination of JPatternsConfig
castor objects. Also it contains the utility methods could be used for the forming this fields (all of them are collections) with the
appropriate information.
Currently there are two types of the storages: sections and business items. Both of them are necessary for us as they could be use for
the differenty purposes. E.g. A. the logically separate global configuration item (we would use the business items storage) and
B. factory configuration is represented as storage - in this case for the retrieving the "factory" pattern we would find the appropriate
section based castor object, and then the concrete implementation of the factory would retrieve the business items.
The fields are introduced here could be extended (or modified) in the case the structure of the JPatternsConfig
castor
object would be changed (and we would need another storages for the configuration).
Field Summary | |
---|---|
static org.apache.log4j.Logger |
LOG
Logger instance. |
Constructor Summary | |
---|---|
JPatternsConfigBaseBean()
Default public constructor. |
Method Summary | |
---|---|
boolean |
check()
|
com.sourceforge.jpatterns.schema.CastorNameScopePriorityType |
getBusinessItem(String sectionScope,
String sectionName,
String itemScope,
String itemName)
Get the business item - the instance of the CastorNameScopePriorityType class. |
Map<String,Map<String,Map<String,Map<String,com.sourceforge.jpatterns.schema.CastorNameScopePriorityType>>>> |
getBusinessItems()
Tested here com.sourceforge.jpatterns.core.configuration.model.JPatternsConfigBaseBeanTest#testSetGetBusinessItems() |
List<com.sourceforge.jpatterns.schema.CastorSectionType> |
getListOfSectionItems()
|
com.sourceforge.jpatterns.schema.CastorSectionType |
getSection(String scope,
String sectionName)
Get the section type castor object by the pointed path (basing on the scope/section name string) |
Map<String,Map<String,com.sourceforge.jpatterns.schema.CastorSectionType>> |
getSectionItems()
Tested here: com.sourceforge.jpatterns.core.configuration.model.JPatternsConfigBaseBeanTest#testSetGetSectionItems() |
void |
setBusinessItem(String sectionScope,
String sectionName,
com.sourceforge.jpatterns.schema.CastorNameScopePriorityType item)
Set the provided business item using the provided path. |
void |
setBusinessItems(Map<String,Map<String,Map<String,Map<String,com.sourceforge.jpatterns.schema.CastorNameScopePriorityType>>>> businessItems)
Set the new value for the business items. |
void |
setSection(String scope,
com.sourceforge.jpatterns.schema.CastorSectionType section)
Set the pointed section CastorSectionType castor object to the map is used for this purposes. |
void |
setSectionItems(Map<String,Map<String,com.sourceforge.jpatterns.schema.CastorSectionType>> sectionItems)
Set the new value for the section items Tested here: com.sourceforge.jpatterns.core.configuration.model.JPatternsConfigBaseBeanTest#testSetGetSectionItems() |
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
Constructor Detail |
---|
public JPatternsConfigBaseBean()
Method Detail |
---|
public void setBusinessItems(Map<String,Map<String,Map<String,Map<String,com.sourceforge.jpatterns.schema.CastorNameScopePriorityType>>>> businessItems)
com.sourceforge.jpatterns.core.configuration.model.JPatternsConfigBaseBeanTest#testSetGetBusinessItems()
businessItems
- the new value for the business items storage.
Can not be null (otherwise IllegalArgumentException
would appear).public Map<String,Map<String,Map<String,Map<String,com.sourceforge.jpatterns.schema.CastorNameScopePriorityType>>>> getBusinessItems()
com.sourceforge.jpatterns.core.configuration.model.JPatternsConfigBaseBeanTest#testSetGetBusinessItems()
public void setSectionItems(Map<String,Map<String,com.sourceforge.jpatterns.schema.CastorSectionType>> sectionItems)
sectionItems
- the section items storage
Can not be null (otherwise IllegalArgumentException
would appear).public Map<String,Map<String,com.sourceforge.jpatterns.schema.CastorSectionType>> getSectionItems()
public List<com.sourceforge.jpatterns.schema.CastorSectionType> getListOfSectionItems()
CastorSectionType
objects.public boolean check()
check
in interface com.zmicer.utils.model.ICheckable
ICheckable.check()
public com.sourceforge.jpatterns.schema.CastorNameScopePriorityType getBusinessItem(String sectionScope, String sectionName, String itemScope, String itemName)
sectionScope
- section scope id. Can not be null (otherwise IllegalArgumentException
would appear).sectionName
- section name. Can not be null (otherwise IllegalArgumentException
would appear).itemScope
- item scope. Can not be null (otherwise IllegalArgumentException
would appear).itemName
- business item name. Can not be null (otherwise IllegalArgumentException
would appear).
CastorNameScopePriorityType
castor object or the null
in the case
the provided path (these three keys) do not point to the real castor object.public void setBusinessItem(String sectionScope, String sectionName, com.sourceforge.jpatterns.schema.CastorNameScopePriorityType item)
sectionScope
- sectionScope name. Can not be null (otherwise IllegalArgumentException
would appear).sectionName
- section name. Can not be null (otherwise IllegalArgumentException
would appear).item
- the castor object to be stored. Can not be null (otherwise IllegalArgumentException
would appear).
The item name would be get from this bean too, so item.getName()
should not return null or empty
String (IllegalArgumentException
would appear in this wrong case)public com.sourceforge.jpatterns.schema.CastorSectionType getSection(String scope, String sectionName)
scope
- the scope name. Can not be null (otherwise IllegalArgumentException
would appear).sectionName
- the section name. Can not be null (otherwise IllegalArgumentException
would appear).
CastorSectionType
castor object in the case of success or null
otherwise..public void setSection(String scope, com.sourceforge.jpatterns.schema.CastorSectionType section)
CastorSectionType
castor object to the map is used for this purposes.
scope
- the name of the scope the provided CastorSectionType castor object should belong.
Can not be null (otherwise IllegalArgumentException
would appear).section
- CastorSectionType
castor object which is based for all the "section based" JPatterns configurations items
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |