com.bea.p13n.property
Interface PropertySet
- All Known Implementing Classes:
- AbstractPropertySet
- public interface PropertySet
This is the public interface for Property Sets, which are logical
groupings 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.
You can use the no-arg constructor for the internal class
com.bea.p13n.property.internal.PropertySetImpl when creating a PropertySet.
PropertySetImpl extends com.bea.p13n.property.AbstractPropertySet.
For example:
PropertySetImpl myPSet = new PropertySetImpl();
myPSet.setName(psName);
myPSet.setDescription(psDesc);
myPSet.setType(psType);
myPSet.addPropertyDefinition(propName, myPropSetDefImpl);
- See Also:
PropertyDefinition
,
ConfigurableEntity
,
AbstractPropertySet
getDescription
public String getDescription()
- Get the description of this property set
getName
public String getName()
- Get the name of this property set
getPropertyDefinition
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
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 this property set is empty
getType
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.
Copyright © 2005 BEA Systems, Inc. All Rights Reserved