| org.apache.jetspeed.prefs.PreferencesProvider
All known Subclasses: org.apache.jetspeed.prefs.impl.PersistenceBrokerPreferencesProvider,
PreferencesProvider | public interface PreferencesProvider (Code) | |
Utility component used to pass the
PersistenceStoreContainer and
store name to the
Preferences SPI implementation.
author: David Le Strat |
Method Summary | |
Node | createNode(Node parent, String nodeName, int nodeType, String fullPath) Create a preferences node given the following parameters. | Property | createProperty(Node node, String name, Object value) Create a property on the given node. | Collection | getChildren(Node parentNode) | Node | getNode(String fullPath, int nodeType) Given the fullpath to a node, retrieve the node associated with the node path
Parameters: fullPath - the full path to the node such as "/portlet_entity/dp-1/guest/preferences/mypref" Parameters: nodeType - either System or User node type. | void | init() | Collection | lookupPreference(String nodeName, String propertyName, String propertyValue) Lookup a preference node given the preference name, a property name and
value. | boolean | nodeExists(String fullPath, int nodeType) Check for the existence of a node given the full path to the node
Parameters: fullPath - the full path to the node such as "/portlet_entity/dp-1/guest/preferences/mypref" Parameters: nodeType - either System or User node type. | void | removeNode(Node parentNode, Node node) Removes a node from a given parent node, also removing the node from the preferences persistence store. | void | storeNode(Node node) Stores a preference node to the backing preferences persistent storage.
If the node does not exist, it is created. |
createNode | Node createNode(Node parent, String nodeName, int nodeType, String fullPath) throws FailedToCreateNodeException, NodeAlreadyExistsException(Code) | | Create a preferences node given the following parameters. Will throw an exception if the node already exists.
Parameters: parent - the existing parent node of this node to be created Parameters: nodeName - the name of the node, which should be the same value as the last value of the full pathfor example when the full path is "/portlet_entity/dp-1", the nodeName will be "dp-1" Parameters: nodeType - either System or User node type. A value of 0 is User, a value of 1 is System Parameters: fullPath - the full path to the node such as "/portlet_entity/dp-1/guest/preferences/mypref" the newly created node on success throws: FailedToCreateNodeException - thrown when the node fails to create throws: NodeAlreadyExistsException - thrown when a node already exists at the given full path |
createProperty | Property createProperty(Node node, String name, Object value)(Code) | | Create a property on the given node.
Parameters: node - the node to have a property added to it Parameters: name - the name of the property to add to the node Parameters: value - the value of the property to add to the node the newly created property since: 2.1.2 |
getChildren | Collection getChildren(Node parentNode)(Code) | | Given a parent node, return a flat collection of immediate children of this node
Parameters: parentNode - the parent node to be searched for children a Java collection of immediate children of this node |
getNode | Node getNode(String fullPath, int nodeType) throws NodeDoesNotExistException(Code) | | Given the fullpath to a node, retrieve the node associated with the node path
Parameters: fullPath - the full path to the node such as "/portlet_entity/dp-1/guest/preferences/mypref" Parameters: nodeType - either System or User node type. A value of 0 is User, a value of 1 is System The Preference Node found when found throws: NodeDoesNotExistException - when a node is not found, an exception is thrown |
lookupPreference | Collection lookupPreference(String nodeName, String propertyName, String propertyValue)(Code) | | Lookup a preference node given the preference name, a property name and
value. Options can be set to null if you dont want them included in the
query.
Parameters: nodeName - the name of the node to lookup, such as 'userinfo' Parameters: propertyName - the name of the property, such as 'user.email' Parameters: propertyValue - the value of the property, such as'taylor@apache.org' a collection of found matching elements of type Node |
nodeExists | boolean nodeExists(String fullPath, int nodeType)(Code) | | Check for the existence of a node given the full path to the node
Parameters: fullPath - the full path to the node such as "/portlet_entity/dp-1/guest/preferences/mypref" Parameters: nodeType - either System or User node type. A value of 0 is User, a value of 1 is System true if the node exists, false if it does not exist |
removeNode | void removeNode(Node parentNode, Node node)(Code) | | Removes a node from a given parent node, also removing the node from the preferences persistence store.
Parameters: parentNode - the parent of the node to be deleted Parameters: node - the node to be deleted |
storeNode | void storeNode(Node node)(Code) | | Stores a preference node to the backing preferences persistent storage.
If the node does not exist, it is created. If it does exist, the node
is updated.
Parameters: node - the node to be stored. |
|
|