org.apache.struts.config
public class DataSourceConfig extends java.lang.Object implements java.io.Serializable
A JavaBean representing the configuration information of a
<data-source>
element from a Struts
configuration file.
WARNING - The properties of this configuration bean are recognized by the default data source implementation, but some or all of them may be ignored by custom data source implementations.
Modifier and Type | Field and Description |
---|---|
protected boolean |
configured
Has this component been completely configured?
|
protected java.lang.String |
key
The servlet context attribute key under which this data source
is stored and made available.
|
protected java.util.HashMap |
properties
The custom configuration properties for this data source implementation.
|
protected java.lang.String |
type
The fully qualified class name of the
javax.sql.DataSource
implementation class. |
Constructor and Description |
---|
DataSourceConfig() |
Modifier and Type | Method and Description |
---|---|
void |
addProperty(java.lang.String name,
java.lang.String value)
Add a new custom configuration property.
|
void |
freeze()
Freeze the configuration of this data source.
|
java.lang.String |
getKey() |
java.util.Map |
getProperties() |
java.lang.String |
getType() |
void |
setKey(java.lang.String key) |
void |
setType(java.lang.String type) |
java.lang.String |
toString()
Return a String representation of this object.
|
protected boolean configured
protected java.lang.String key
protected java.util.HashMap properties
protected java.lang.String type
javax.sql.DataSource
implementation class.public java.lang.String getKey()
public void setKey(java.lang.String key)
public java.util.Map getProperties()
public java.lang.String getType()
public void setType(java.lang.String type)
public void addProperty(java.lang.String name, java.lang.String value)
name
- Custom property namevalue
- Custom property valuepublic void freeze()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright ? 2000-2014 - The Apache Software Foundation