|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.webhydra.slug.PropertiesConfigParser
public class PropertiesConfigParser
Property configuration parser.
Loads and instantiates all ISlugRunner runners from a properties
file.
runner's name is a token composed by
alphanumeric charactersrunner's name].implISlugRunner implementation class name for a runner's name
defined in slug.runners propertyrunner's name].param[param name]ISlugRunner implementation
initialization. The name is used as provided by the param name and
property's value is passed as a value for it. Zero or many parameters may be
defined for each ISlugRunner implementation instancerunner's name is a token composed by
alphanumeric characterstranslator's name].implIProcessStatusTranslator implementation class name for a
translator's name defined in slug.translators propertytranslator's name].param[param name]IProcessStatusTranslator
implementation initialization. The name is used as provided by the param name
and property's value is passed as a value for it. Zero or many parameters may be
defined for each IProcessStatusTranslator implementation instanceslug.runners=good,param_test slug.runner[good].runnerimpl=com.webhydra.slug.process.UnlimitedProcessRunner slug.runner[param_test].runnerimpl=com.webhydra.slug.SlugRunnerParamTest slug.runner[param_test].param[p1]=Test Patameter 1 slug.runner[param_test].param[p2]=Test Parameter 2 slug.translators=xml slug.translator[xml].impl=com.webhydra.slug.process.xml.XmlXsdProcessStatusTranslator
| Constructor Summary | |
|---|---|
PropertiesConfigParser()
Creates a new instance of PropertiesConfigParser |
|
| Method Summary | |
|---|---|
protected static java.lang.String |
extractParamName(java.lang.String key,
java.lang.String preffix)
Extract parameter name from an indexed parameters property. |
InstanceDef[] |
getRunnerDefs()
Gets all ISlugRunner implementation definitions |
InstanceDef[] |
getTranslatorDefs()
Gets all IProcessStatusTranslator implementation definitions |
void |
load(java.io.InputStream is)
Initializes class instance. |
protected void |
load(java.util.Properties props)
Initialize new PropertiesConfigParser instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertiesConfigParser()
| Method Detail |
|---|
public void load(java.io.InputStream is)
throws SlugInitializationException
load in interface ISlugConfigParseris - Slug's configuration properties input stream.
SlugInitializationException - if provided configurataion file is not
accessible or is invald.
protected void load(java.util.Properties props)
throws SlugInitializationException
props - Slug's configuration properties.
SlugInitializationException - if provided properties are null or empty.public InstanceDef[] getRunnerDefs()
ISlugRunner implementation definitions
getRunnerDefs in interface ISlugConfigParserpublic InstanceDef[] getTranslatorDefs()
ISlugConfigParserIProcessStatusTranslator implementation definitions
getTranslatorDefs in interface ISlugConfigParser
protected static java.lang.String extractParamName(java.lang.String key,
java.lang.String preffix)
key - property keypreffix - runner property name prefix.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||