javax.slee.resource
Class ConfigProperties

java.lang.Object
  extended by javax.slee.resource.ConfigProperties
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public final class ConfigProperties
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

The ConfigProperties class represents a set of configuration properties for a Resource Adaptor or resource adaptor entity.

Configuration properties that start with "javax.slee:" are reserved for use by the SLEE specification. The following standard configuration properties are defined by the specification and may be used by resource adaptors:

SLEE vendor defined configuration properties should be prefixed with "slee-vendor:" and the configuration property name should utilize Java package name conventions. For example, properties from a SLEE vendor "mycompany" should be prefixed with "slee-vendor:com.mycompany.".

Since:
SLEE 1.1
See Also:
Serialized Form

Nested Class Summary
static class ConfigProperties.Property
          The Property class represents a single property.
 
Constructor Summary
ConfigProperties()
          Create a new ConfigProperties object with an initially empty set of properties.
ConfigProperties(ConfigProperties.Property[] properties)
          Create a new ConfigProperties object prepopulated with a set of properties.
 
Method Summary
 void addProperty(ConfigProperties.Property property)
          Add a property to this ConfigProperties object.
 java.lang.Object clone()
          Creates and returns a deep copy of this ConfigProperties object.
 ConfigProperties.Property[] getProperties()
          Get all properties.
 ConfigProperties.Property getProperty(java.lang.String name)
          Get the property with the specified name.
 java.lang.String toString()
          Get a string representation for this ConfigProperties object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigProperties

public ConfigProperties()
Create a new ConfigProperties object with an initially empty set of properties.


ConfigProperties

public ConfigProperties(ConfigProperties.Property[] properties)
Create a new ConfigProperties object prepopulated with a set of properties.

Parameters:
properties - the properties to add to the created ConfigProperties object.
Throws:
java.lang.NullPointerException - if properties is null or containes null elements.
Method Detail

getProperties

public ConfigProperties.Property[] getProperties()
Get all properties.

Returns:
an array of ConfigProperties.Property objects.

getProperty

public ConfigProperties.Property getProperty(java.lang.String name)
Get the property with the specified name.

Parameters:
name - the name of the property.
Returns:
the ConfigProperties.Property, or null if the property does not exist in this ConfigProperties object.

addProperty

public void addProperty(ConfigProperties.Property property)
Add a property to this ConfigProperties object.

Parameters:
property - the property to add.
Throws:
java.lang.NullPointerException - if property is null.
java.lang.IllegalArgumentException - if a property with the same name already exists.

toString

public java.lang.String toString()
Get a string representation for this ConfigProperties object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation for this ConfigProperties object.

clone

public java.lang.Object clone()
Creates and returns a deep copy of this ConfigProperties object. Changes to the properties of the object returned from this method will not affect the properties stored by the original object cloned.

Overrides:
clone in class java.lang.Object
Returns:
a deep copy of this ConfigProperties object.


Copyright © 2008. All Rights Reserved.