public class RelationsServiceImpl extends Object implements RelationsService, org.picocontainer.Startable
| Constructor and Description |
|---|
RelationsServiceImpl(org.exoplatform.services.jcr.RepositoryService repositoryService,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
org.exoplatform.container.xml.InitParams params) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRelation(javax.jcr.Node node,
String relationPath,
String workspace)
Inserts a new relation is specified by relationPath params to the given node
|
List<javax.jcr.Node> |
getRelations(javax.jcr.Node node,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Gets all node that has relation to the given node
|
protected javax.jcr.Session |
getSession()
Get session of respository
|
boolean |
hasRelations(javax.jcr.Node node)
Returns true is the given node has relation
|
void |
init()
Initial the root of relation node and its sub node
|
void |
removeRelation(javax.jcr.Node node,
String relationPath)
Removes the relation to the given node by specified the relationPath params
|
void |
start() |
void |
stop() |
public RelationsServiceImpl(org.exoplatform.services.jcr.RepositoryService repositoryService,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
org.exoplatform.container.xml.InitParams params)
public boolean hasRelations(javax.jcr.Node node)
throws Exception
hasRelations in interface RelationsServicenode - Specify the node wants to check relationExceptionNodepublic List<javax.jcr.Node> getRelations(javax.jcr.Node node, org.exoplatform.services.jcr.ext.common.SessionProvider provider)
getRelations in interface RelationsServicenode - Specify the node wants to get all node relative to itprovider - The SessionProvider object is used to managed SessionsNode,
SessionProviderpublic void removeRelation(javax.jcr.Node node,
String relationPath)
throws Exception
removeRelation in interface RelationsServicenode - Specify the node wants to remove a relationrelationPath - The path of relationExceptionNodepublic void addRelation(javax.jcr.Node node,
String relationPath,
String workspace)
throws Exception
addRelation in interface RelationsServicenode - Specify the node wants to insert a new relationrelationPath - The path of relationworkspace - The name of workspaceExceptionNodepublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic void init()
throws Exception
init in interface RelationsServiceExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.