Class NodeHierarchyCreatorImpl
java.lang.Object
org.exoplatform.services.jcr.ext.hierarchy.impl.NodeHierarchyCreatorImpl
- All Implemented Interfaces:
NodeHierarchyCreator,org.picocontainer.Startable
public class NodeHierarchyCreatorImpl
extends Object
implements NodeHierarchyCreator, org.picocontainer.Startable
Created by The eXo Platform SAS Author : Dang Van Minh minh.dang@exoplatform.com Nov 15, 2007
2:21:57 PM
-
Constructor Summary
ConstructorsConstructorDescriptionNodeHierarchyCreatorImpl(org.exoplatform.services.jcr.RepositoryService jcrService, org.exoplatform.container.xml.InitParams params) NodeHierarchyCreatorImpl(org.exoplatform.services.jcr.RepositoryService jcrService, DataDistributionManager dataDistributionManager, org.exoplatform.container.xml.InitParams params) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPlugin(org.exoplatform.container.component.ComponentPlugin plugin) Registers a new pluginsgetJcrPath(String alias) Gets the JCR path corresponding to the given aliasjavax.jcr.NodegetPublicApplicationNode(SessionProvider sessionProvider) Gets the JCR node corresponding to the root node of the public applicationsjavax.jcr.NodegetUserApplicationNode(SessionProvider sessionProvider, String userName) Gets the JCR node corresponding to the root node of the user's applicationsjavax.jcr.NodegetUserNode(SessionProvider sessionProvider, String userName) Gets the JCR node corresponding to the root node of the user workspacevoidinit()Initialize the current repository thanks to all the registered pluginsvoidInitialize the given repository thanks to all the registered pluginsbooleanvoidremoveUserNode(SessionProvider sessionProvider, String userName) Remove the JCR node corresponding to the root node of the user workspacevoidstart()voidstop()
-
Constructor Details
-
NodeHierarchyCreatorImpl
public NodeHierarchyCreatorImpl(org.exoplatform.services.jcr.RepositoryService jcrService, org.exoplatform.container.xml.InitParams params) -
NodeHierarchyCreatorImpl
public NodeHierarchyCreatorImpl(org.exoplatform.services.jcr.RepositoryService jcrService, DataDistributionManager dataDistributionManager, org.exoplatform.container.xml.InitParams params)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-
init
Initialize the given repository thanks to all the registered plugins- Specified by:
initin interfaceNodeHierarchyCreator- Parameters:
repository- the repository to initialize- Throws:
Exception- if an exception occurs
-
init
Initialize the current repository thanks to all the registered plugins- Specified by:
initin interfaceNodeHierarchyCreator- Throws:
Exception- if an exception occurs
-
getUserApplicationNode
public javax.jcr.Node getUserApplicationNode(SessionProvider sessionProvider, String userName) throws Exception Gets the JCR node corresponding to the root node of the user's applications- Specified by:
getUserApplicationNodein interfaceNodeHierarchyCreator- Parameters:
sessionProvider- the session provider to use to get the root nodeuserName- the user name for which we want to find the root node of his applications- Returns:
- the root node of the user's applications of the given user
- Throws:
Exception- if an exception occurs
-
getPublicApplicationNode
Gets the JCR node corresponding to the root node of the public applications- Specified by:
getPublicApplicationNodein interfaceNodeHierarchyCreator- Parameters:
sessionProvider- the session provider to use to get the root node- Returns:
- the root node of the public applications
- Throws:
Exception- if an exception occurs
-
getUserNode
public javax.jcr.Node getUserNode(SessionProvider sessionProvider, String userName) throws Exception Gets the JCR node corresponding to the root node of the user workspace- Specified by:
getUserNodein interfaceNodeHierarchyCreator- Parameters:
sessionProvider- the session provider to use to get the root nodeuserName- the user name for which we want to find the root node of his workspace- Returns:
- the root node of the workspace of the given user
- Throws:
Exception- if an exception occurs
-
removeUserNode
Remove the JCR node corresponding to the root node of the user workspace- Specified by:
removeUserNodein interfaceNodeHierarchyCreator- Parameters:
sessionProvider- the session provider to use to remove the root nodeuserName- the user name for which we want to remove the root node of his workspace- Throws:
Exception- if an exception occurs
-
getJcrPath
Gets the JCR path corresponding to the given alias- Specified by:
getJcrPathin interfaceNodeHierarchyCreator- Parameters:
alias- the alias of the path to retrieve- Returns:
- the corresponding JCR path
-
addPlugin
public void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin) Registers a new plugins- Specified by:
addPluginin interfaceNodeHierarchyCreator- Parameters:
plugin- the plugin to register
-
isNodeHierarchyCreatorInitialized
public boolean isNodeHierarchyCreatorInitialized()- Specified by:
isNodeHierarchyCreatorInitializedin interfaceNodeHierarchyCreator- Returns:
- if the service has started or not
-