org.apache.struts.config

Class DataSourceConfig

public class DataSourceConfig extends Object implements 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.

Since: Struts 1.1

Version: $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $

Field Summary
protected booleanconfigured
Has this component been completely configured?
protected Stringkey
The servlet context attribute key under which this data source is stored and made available.
protected HashMapproperties
The custom configuration properties for this data source implementation.
protected Stringtype
The fully qualified class name of the javax.sql.DataSource implementation class.
Method Summary
voidaddProperty(String name, String value)
Add a new custom configuration property.
voidfreeze()
Freeze the configuration of this data source.
StringgetKey()
MapgetProperties()
StringgetType()
voidsetKey(String key)
voidsetType(String type)
StringtoString()
Return a String representation of this object.

Field Detail

configured

protected boolean configured
Has this component been completely configured?

key

protected String key
The servlet context attribute key under which this data source is stored and made available.

properties

protected HashMap properties
The custom configuration properties for this data source implementation.

type

protected String type
The fully qualified class name of the javax.sql.DataSource implementation class.

Method Detail

addProperty

public void addProperty(String name, String value)
Add a new custom configuration property.

Parameters: name Custom property name value Custom property value

freeze

public void freeze()
Freeze the configuration of this data source.

getKey

public String getKey()

getProperties

public Map getProperties()

getType

public String getType()

setKey

public void setKey(String key)

setType

public void setType(String type)

toString

public String toString()
Return a String representation of this object.
Copyright B) 2000-2007 - The Apache Software Foundation