|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport
org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport
org.apache.jetspeed.prefs.impl.PersistenceBrokerPreferencesProvider
public class PersistenceBrokerPreferencesProvider
PersistenceBrokerPreferencesProvider
| Field Summary |
|---|
| Fields inherited from class org.apache.jetspeed.components.dao.InitablePersistenceBrokerDaoSupport |
|---|
repositoryPath |
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
PersistenceBrokerPreferencesProvider(java.lang.String repositoryPath)
|
|
PersistenceBrokerPreferencesProvider(java.lang.String repositoryPath,
JetspeedCache preferenceCache)
|
|
PersistenceBrokerPreferencesProvider(java.lang.String repositoryPath,
JetspeedCache preferenceCache,
java.util.List apps,
boolean preloadEntities)
|
|
| Method Summary | |
|---|---|
protected void |
addToCache(org.apache.jetspeed.prefs.impl.PersistenceBrokerPreferencesProvider.NodeCache content)
|
Node |
createNode(Node parent,
java.lang.String nodeName,
int nodeType,
java.lang.String fullPath)
Create a preferences node given the following parameters. |
Property |
createProperty(Node node,
java.lang.String name,
java.lang.Object value)
Create a property on the given node. |
java.util.Collection |
getChildren(Node parentNode)
Given a parent node, return a flat collection of immediate children of this node |
Node |
getNode(java.lang.String fullPath,
int nodeType)
Given the fullpath to a node, retrieve the node associated with the node path |
void |
init()
init |
protected int |
loadNodeAndAllChildren(java.lang.String path)
|
java.util.Collection |
lookupPreference(java.lang.String nodeName,
java.lang.String propertyName,
java.lang.String propertyValue)
Lookup a preference node given the preference name, a property name and value. |
boolean |
nodeExists(java.lang.String fullPath,
int nodeType)
Check for the existence of a node given the full path to the node |
void |
preloadAllEntities()
|
void |
preloadApplicationPreferences(java.lang.String portletApplicationName)
|
void |
redoNode(NodeImplProxy proxy,
java.lang.String fullPath,
int nodeType)
|
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. |
| Methods inherited from class org.springframework.orm.ojb.support.PersistenceBrokerDaoSupport |
|---|
checkDaoConfig, closePersistenceBrokerIfNecessary, convertOjbAccessException, createPersistenceBrokerTemplate, getJcdAlias, getPersistenceBroker, getPersistenceBrokerTemplate, releasePersistenceBroker, setJcdAlias, setPersistenceBrokerTemplate |
| Methods inherited from class org.springframework.dao.support.DaoSupport |
|---|
afterPropertiesSet, initDao |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PersistenceBrokerPreferencesProvider(java.lang.String repositoryPath)
throws java.lang.ClassNotFoundException
repositoryPath - Location of repository mapping file. Must be available within the classpath.
java.lang.ClassNotFoundException - if the prefsFactoryImpl argument does not reperesent a Class that exists in the
current classPath.
public PersistenceBrokerPreferencesProvider(java.lang.String repositoryPath,
JetspeedCache preferenceCache)
throws java.lang.ClassNotFoundException
repository - Location of repository mapping file. Must be available within the classpath.prefsFactoryImpl - java.util.prefs.PreferencesFactory implementation to use.enablePropertyManager - Whether or not we chould be suing the property manager.
java.lang.ClassNotFoundException - if the prefsFactoryImpl argument does not reperesent a Class that exists in the
current classPath.
public PersistenceBrokerPreferencesProvider(java.lang.String repositoryPath,
JetspeedCache preferenceCache,
java.util.List apps,
boolean preloadEntities)
throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException| Method Detail |
|---|
protected void addToCache(org.apache.jetspeed.prefs.impl.PersistenceBrokerPreferencesProvider.NodeCache content)
public Node getNode(java.lang.String fullPath,
int nodeType)
throws NodeDoesNotExistException
PreferencesProvider
getNode in interface PreferencesProviderfullPath - 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
public void redoNode(NodeImplProxy proxy,
java.lang.String fullPath,
int nodeType)
throws NodeDoesNotExistException
NodeDoesNotExistExceptionPreferencesProvider.getNode(java.lang.String, int)
public boolean nodeExists(java.lang.String fullPath,
int nodeType)
PreferencesProvider
nodeExists in interface PreferencesProviderfullPath - 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
PreferencesProvider.nodeExists(java.lang.String, int)
public Node createNode(Node parent,
java.lang.String nodeName,
int nodeType,
java.lang.String fullPath)
throws FailedToCreateNodeException,
NodeAlreadyExistsException
PreferencesProvider
createNode in interface PreferencesProviderparent - 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 pathPreferencesProvider.createNode(org.apache.jetspeed.prefs.om.Node, java.lang.String, int, java.lang.String)public java.util.Collection getChildren(Node parentNode)
PreferencesProvider
getChildren in interface PreferencesProviderparentNode - the parent node to be searched for children
PreferencesProvider.getChildren(org.apache.jetspeed.prefs.om.Node)public void storeNode(Node node)
PreferencesProvider
storeNode in interface PreferencesProvidernode - the node to be stored.PreferencesProvider.storeNode(org.apache.jetspeed.prefs.om.Node)
public void removeNode(Node parentNode,
Node node)
PreferencesProvider
removeNode in interface PreferencesProviderparentNode - the parent of the node to be deletednode - the node to be deletedPreferencesProvider.removeNode(org.apache.jetspeed.prefs.om.Node, org.apache.jetspeed.prefs.om.Node)
public java.util.Collection lookupPreference(java.lang.String nodeName,
java.lang.String propertyName,
java.lang.String propertyValue)
PreferencesProvider
lookupPreference in interface PreferencesProvidernodeName - 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'
NodePreferencesProvider.lookupPreference(java.lang.String, java.lang.String, java.lang.String)
public Property createProperty(Node node,
java.lang.String name,
java.lang.Object value)
PreferencesProvider
createProperty in interface PreferencesProvidernode - 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
public void init()
throws java.lang.Exception
InitablePersistenceBrokerDaoSupportinit
Loads the correct repository descriptor for InitablePersistenceBrokerDaoSupport
init in interface PreferencesProviderinit in class InitablePersistenceBrokerDaoSupportjava.lang.ExceptionPersistenceBrokerDaoSupport
public void preloadApplicationPreferences(java.lang.String portletApplicationName)
throws NodeDoesNotExistException
NodeDoesNotExistExceptionprotected int loadNodeAndAllChildren(java.lang.String path)
public void preloadAllEntities()
throws NodeDoesNotExistException
NodeDoesNotExistException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||