|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PreferencesProvider
Utility component used to pass the PersistenceStoreContainer and
store name to the Preferences SPI implementation.
| 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)
Given a parent node, return a flat collection of immediate children of this node |
Node |
getNode(String fullPath,
int nodeType)
Given the fullpath to a node, retrieve the node associated with the node path |
void |
init()
Initializes the preferences node |
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 |
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. |
| Method Detail |
|---|
Node getNode(String fullPath,
int nodeType)
throws NodeDoesNotExistException
fullPath - the full path to the node such as "/portlet_entity/dp-1/guest/preferences/mypref"nodeType - either System or User node type. A value of 0 is User, a value of 1 is System
NodeDoesNotExistException - when a node is not found, an exception is thrown
boolean nodeExists(String fullPath,
int nodeType)
fullPath - the full path to the node such as "/portlet_entity/dp-1/guest/preferences/mypref"nodeType - either System or User node type. A value of 0 is User, a value of 1 is System
Node createNode(Node parent,
String nodeName,
int nodeType,
String fullPath)
throws FailedToCreateNodeException,
NodeAlreadyExistsException
parent - the existing parent node of this node to be creatednodeName - the name of the node, which should be the same value as the last value of the full path
for example when the full path is "/portlet_entity/dp-1", the nodeName will be "dp-1"nodeType - either System or User node type. A value of 0 is User, a value of 1 is SystemfullPath - the full path to the node such as "/portlet_entity/dp-1/guest/preferences/mypref"
FailedToCreateNodeException - thrown when the node fails to create
NodeAlreadyExistsException - thrown when a node already exists at the given full path
Property createProperty(Node node,
String name,
Object value)
node - the node to have a property added to itname - the name of the property to add to the nodevalue - the value of the property to add to the node
Collection getChildren(Node parentNode)
parentNode - the parent node to be searched for children
void storeNode(Node node)
node - the node to be stored.
void removeNode(Node parentNode,
Node node)
parentNode - the parent of the node to be deletednode - the node to be deleted
Collection lookupPreference(String nodeName,
String propertyName,
String propertyValue)
nodeName - the name of the node to lookup, such as 'userinfo'propertyName - the name of the property, such as 'user.email'propertyValue - the value of the property, such as
'taylor@apache.org'
Node
void init()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||