AbstractPropertySet Class

com.bea.p13n.property
AbstractPropertySet Class

public abstract class AbstractPropertySet

    extends Object
    implements PropertySet, Serializable

Default implementation of a Property Sets, which is a logical grouping of property definitions. A Property Set can be defined to contain the definitions of a group of related properties, such as user preferences.

These property definitions are used by Configurable Entity EJB's to validate property values and retrieve default values for properties. They can also be used by tools to display a list of available properties for an entity.


Hierarchy
Object
  AbstractPropertySet
All Implemented Interfaces

PropertySet, Serializable
Direct Known Subclasses

PropertySetImpl

Constructor Summary

AbstractPropertySet()

Default constructor
AbstractPropertySet(String typeArg, String nameArg, String descriptionArg)

Constructor to initialize attributes
 

Method Summary

public void
addPropertyDefinition(String name, PropertyDefinition value)
Add a property definition to the property set.
public String
getDescription()
Get the description of this property set
public String
getName()
Get the name of this property set
public PropertyDefinition
getPropertyDefinition(String key)
Retrieve a particular PropertyDefinition by name.
public Map
getPropertyDefinitions()
Retrieve all the property definitions in this property set.
public String
getType()
Get the type of this property set.
public void
setDescription(String s)
Set the description of this property set
public void
setName(String s)
Set the name of this property set
public void
setType(String s)
Set the type of this property set.
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.bea.p13n.property.PropertySet
getDescription, getName, getPropertyDefinition, getPropertyDefinitions, getType
 

Constructor Detail

AbstractPropertySet

public AbstractPropertySet()
Default constructor

AbstractPropertySet

public AbstractPropertySet(String typeArg, 
                           String nameArg, 
                           String descriptionArg)
Constructor to initialize attributes
 

Method Detail

addPropertyDefinition(String, PropertyDefinition) Method

public void addPropertyDefinition(String name, 
                                  PropertyDefinition value)
Add a property definition to the property set. This is NOT exposed in the public interface because property sets are read-only to the outside world.

Parameters

name
the new property's name
value
the new property definition

getDescription() Method

public String getDescription()
Get the description of this property set


getName() Method

public String getName()
Get the name of this property set


getPropertyDefinition(String) Method

public PropertyDefinition getPropertyDefinition(String key)
Retrieve a particular PropertyDefinition by name.

Parameters

key
the name of the PropertyDefinition to retrieve

Returns

the named PropertyDefinition, or null if it does not exist

getPropertyDefinitions() Method

public Map getPropertyDefinitions()
Retrieve all the property definitions in this property set.

Returns

a Map of property name -> PropertyDefinition objects that make up this property set; or null if the property set is empty

getType() Method

public String getType()
Get the type of this property set. The Type is a String that specifies what types of Entities are intended to use the properties defined in a property set. When a ConfigurableEntity EJB is deployed, it must define a variable PropertySetType in its deployment descriptor; at run-time, only property sets of that type will be used to validate properties for that entity.

Type is also used as a way to namespace property sets - two property sets can have the same name, as long as they are different types.


setDescription(String) Method

public void setDescription(String s)
Set the description of this property set


setName(String) Method

public void setName(String s)
Set the name of this property set


setType(String) Method

public void setType(String s)
Set the type of this property set. The Type is a String that specifies what types of Entities are intended to use the properties defined in a property set. When a ConfigurableEntity EJB is deployed, it must define a variable PropertySetType in its deployment descriptor; at run-time, only property sets of that type will be used to validate properties for that entity.

Type is also used as a way to namespace property sets - two property sets can have the same name, as long as they are different types.