org.apache.jetspeed.prefs
Interface PropertyManager


public interface PropertyManager

Service used to manage property and property set definition.

A property set definition defines a property set and the possible properties assigned to that set. All or a subset of the property set definition properties can be assigned to a node.

Author:
David Le Strat

Field Summary
static String SERVICE_NAME
          The name of the service.
 
Method Summary
 void addPropertyKeys(Preferences prefNode, Map propertyKeysMap)
          Add a set of property keys to a Preferences node.
 Map getPropertyKeys(Preferences prefNode)
          Returns the property keys available to a Preferences node whether or node those keys have values assigned to them.
 void removePropertyKeys(Preferences prefNode, Collection propertyKeys)
          Remove the specified collection of property keys from the given preferences node.
 void updatePropertyKey(String oldPropertyKeyName, Preferences prefNode, Map newPropertyKey)
          Update a property key.
 

Field Detail

SERVICE_NAME

public static final String SERVICE_NAME
The name of the service.

See Also:
Constant Field Values
Method Detail

addPropertyKeys

public void addPropertyKeys(Preferences prefNode,
                            Map propertyKeysMap)
                     throws PropertyException,
                            PreferencesException

Add a set of property keys to a Preferences node. Only keys added to a node can be set on the Preferences node.

Property keys should be passed as a map of:

The Map of [PROPERTYKEY_NAME, PROPERTYKEY_TYPE] of properties to be added to the Preferences is passed to the method.

The property names associated to a node must be unique.

Parameters:
prefNode - The Preferences node.
Throws:
PropertyException - Thrown if any property in the set in already assigned to a property set definition.
PreferencesException

getPropertyKeys

public Map getPropertyKeys(Preferences prefNode)
                    throws PreferencesException

Returns the property keys available to a Preferences node whether or node those keys have values assigned to them.

Property keys will be returned as a map of:

Parameters:
prefNode - The Preferences node.
Returns:
The map of property keys names / types.
Throws:
PreferencesException

removePropertyKeys

public void removePropertyKeys(Preferences prefNode,
                               Collection propertyKeys)
                        throws PropertyException,
                               PreferencesException

Remove the specified collection of property keys from the given preferences node.

Parameters:
prefNode - The Preferences node.
propertyKeys - A collection of property key names.
Throws:
PropertyException - Throws if delete fails.
PreferencesException

updatePropertyKey

public void updatePropertyKey(String oldPropertyKeyName,
                              Preferences prefNode,
                              Map newPropertyKey)
                       throws PropertyException,
                              PreferencesException

Update a property key.

Parameters:
oldPropertyKeyName - The old property key name.
prefNode - The Preferences node.
newPropertyKey - The property key name / type map used to update the old property.
Throws:
PropertyException - Throws if update fails.
PreferencesException


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.