|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.obe.util.CommonConfig
Provides common configuration-related functionality.
Field Summary | |
protected static org.apache.commons.logging.Log |
_logger
|
protected static java.util.Properties |
_props
|
static java.lang.String |
CONFIG_DIR_PROP
Property key for the configuration directory. |
protected static java.lang.String |
CONFIG_FILE
|
static java.lang.String |
CREDENTIALS_PROP
Property key for the default JAAS credentials. |
static java.lang.String |
DATE_FORMAT_PROP
Property key for the default date format. |
static java.lang.String |
DURATION_UNIT_PROP
Property key for the default duration unit. |
static java.lang.String |
PRINCIPAL_PROP
Property key for the default JAAS principal name. |
static java.lang.String |
PROTOCOL_PROP
Property key for the default client protocol type. |
Constructor Summary | |
protected |
CommonConfig()
|
Method Summary | |
static java.net.URL |
findResource(java.lang.String resource)
Locates a configuration resource. |
protected static boolean |
getBooleanProperty(java.lang.String propertyName,
boolean defaultValue)
|
static java.io.File |
getConfigDir()
Returns the configuration directory. |
static java.lang.String |
getCredentials()
Returns the credentials with which the client should authenticate. |
static java.lang.String |
getDefaultDateFormat()
Returns the date format to be used when rendering dates. |
static java.lang.String |
getDefaultDurationUnit()
Returns the default duration unit to use if an XPDL file does not specify a default. |
protected static int |
getIntProperty(java.lang.String propertyName,
int defaultValue)
|
static java.lang.String |
getPrincipal()
Returns the default client principal name. |
static java.lang.String |
getProtocol()
Returns the default client protocol type. |
protected static java.lang.String |
getStringProperty(java.lang.String propertyName,
java.lang.String defaultValue)
|
static org.xml.sax.InputSource |
openInputSource(java.lang.String resource)
Opens a SAX input source for a resource. |
static java.io.InputStream |
openInputStream(java.lang.String resource)
Opens an input stream for the specified resource. |
static java.io.OutputStream |
openOutputStream(java.lang.String resource)
Opens an output stream for the specified resource. |
static java.io.Reader |
openReader(java.lang.String resource)
Opens a character stream for a resource. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final org.apache.commons.logging.Log _logger
protected static final java.lang.String CONFIG_FILE
public static final java.lang.String PROTOCOL_PROP
getProtocol()
,
Constant Field Valuespublic static final java.lang.String PRINCIPAL_PROP
getPrincipal()
,
Constant Field Valuespublic static final java.lang.String CREDENTIALS_PROP
getCredentials()
,
Constant Field Valuespublic static final java.lang.String CONFIG_DIR_PROP
getConfigDir()
,
Constant Field Valuespublic static final java.lang.String DATE_FORMAT_PROP
getDefaultDateFormat()
,
Constant Field Valuespublic static final java.lang.String DURATION_UNIT_PROP
getDefaultDurationUnit()
,
Constant Field Valuesprotected static final java.util.Properties _props
Constructor Detail |
protected CommonConfig()
Method Detail |
protected static boolean getBooleanProperty(java.lang.String propertyName, boolean defaultValue)
protected static int getIntProperty(java.lang.String propertyName, int defaultValue)
protected static java.lang.String getStringProperty(java.lang.String propertyName, java.lang.String defaultValue)
public static java.io.File getConfigDir()
obe.config.dir
.
CONFIG_DIR_PROP
public static java.lang.String getProtocol()
obe.client.protocol
.
"local"
.PROTOCOL_PROP
public static java.lang.String getPrincipal()
obe.client.principal
.
"system"
.PRINCIPAL_PROP
public static java.lang.String getCredentials()
obe.client.credentials
.
"password"
.CREDENTIALS_PROP
public static java.lang.String getDefaultDateFormat()
obe.xpdl.date.format
.
yyyy-MM-dd'T'HH:mm:ssZ
.DATE_FORMAT_PROP
public static java.lang.String getDefaultDurationUnit()
obe.xpdl.duration.unit
.
"D"
(day).DURATION_UNIT_PROP
public static java.net.URL findResource(java.lang.String resource)
resource
- The resource name.
null
if it could not be
located.public static java.io.InputStream openInputStream(java.lang.String resource)
resource
- The partially qualified resource name, relative to
the configuration directory or the root of obeconfig.jar.
null
if the resource could not
be located.public static java.io.OutputStream openOutputStream(java.lang.String resource)
resource
- The partially qualified resource name, relative to
the configuration directory.
null
if the resource could not
be located.public static org.xml.sax.InputSource openInputSource(java.lang.String resource)
resource
- The resource name.
null
if the resource could not
be located.public static java.io.Reader openReader(java.lang.String resource)
resource
- The resource name.
null
if the resource could
not be located.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |