DataSourceConfig (Apache Struts API Documentation)
Keywords: org.apache.struts.config.DataSourceConfig,DataSourceConfig class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts.config
Class DataSourceConfig

    java.lang.Object
      |
      +--org.apache.struts.config.DataSourceConfig

All Implemented Interfaces:
  java.io.Serializable

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.

Since:
  Struts 1.1
Version:
  $Revision: 1.1 $ $Date: 2003-08-22 09:14:33 +0100 (Fri, 22 Aug 2003) $
Author:
  Craig R. McClanahan
See Also:
  Serialized Form

Field Summary
`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 Summary
`DataSourceConfig()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### configured

    protected boolean configured

  Has this component been completely configured?

### key

    protected java.lang.String key

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

### properties

    protected java.util.HashMap properties

  The custom configuration properties for this data source implementation.

### type

    protected java.lang.String type

  The fully qualified class name of the `javax.sql.DataSource` implementation class.

Constructor Detail

### DataSourceConfig

    public DataSourceConfig()

Method Detail

### getKey

    public java.lang.String getKey()

### setKey

    public void setKey(java.lang.String key)

### getProperties

    public java.util.Map getProperties()

### getType

    public java.lang.String getType()

### setType

    public void setType(java.lang.String type)

### addProperty

    public void addProperty(java.lang.String name,
                            java.lang.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.

### toString

    public java.lang.String toString()

  Return a String representation of this object.

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2003 - Apache Software Foundation