org.apache.struts.config

Class DataSourceConfig

Implemented Interfaces:
Serializable

public class DataSourceConfig
extends java.lang.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.

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

Field Summary

protected boolean
configured
Has this component been completely configured?
protected String
key
The servlet context attribute key under which this data source is stored and made available.
protected HashMap
properties
The custom configuration properties for this data source implementation.
protected String
type
The fully qualified class name of the javax.sql.DataSource implementation class.

Method Summary

void
addProperty(String name, String value)
Add a new custom configuration property.
void
freeze()
Freeze the configuration of this data source.
String
getKey()
Map
getProperties()
String
getType()
void
setKey(String key)
void
setType(String type)
String
toString()
Return a String representation of this object.

Field Details

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 Details

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