org.chromattic.core.jcr
Class SessionWrapperImpl
java.lang.Object
org.chromattic.core.jcr.SessionWrapperImpl
- All Implemented Interfaces:
- SessionWrapper
public class SessionWrapperImpl
- extends java.lang.Object
- implements SessionWrapper
- Version:
- $Revision$
- Author:
- Julien Viet
|
Method Summary |
void |
addMixin(javax.jcr.Node node,
java.lang.String mixinTypeName)
|
javax.jcr.Node |
addNode(javax.jcr.Node parentNode,
java.lang.String relPath,
java.lang.String primartyNodeTypeName,
java.util.List<java.lang.String> mixinNodeTypeNames)
|
boolean |
canAddMixin(javax.jcr.Node node,
java.lang.String mixinTypeName)
|
void |
cleanReferencesForRemoval(javax.jcr.Node node)
Need to find a way to optimized this method as it forces us to visit the entire children hierarchy. |
void |
close()
|
javax.jcr.query.Query |
createQuery(java.lang.String statement)
|
boolean |
equals(java.lang.Object obj)
|
javax.jcr.query.QueryResult |
executeQuery(javax.jcr.query.Query query,
java.lang.Long offset,
java.lang.Long limit)
|
javax.jcr.Node |
getChild(javax.jcr.Node parentNode,
java.lang.String name)
|
java.util.Iterator<javax.jcr.Node> |
getChildren(javax.jcr.Node parentNode)
|
javax.jcr.Node |
getNode(javax.jcr.Node node,
java.lang.String relPath)
|
javax.jcr.Node |
getNode(java.lang.String path)
|
javax.jcr.Node |
getNodeByUUID(java.lang.String uuid)
|
javax.jcr.nodetype.NodeType |
getNodeType(java.lang.String nodeTypeName)
|
javax.jcr.Node |
getParent(javax.jcr.Node childNode)
|
java.util.Iterator<javax.jcr.Property> |
getProperties(javax.jcr.Node node)
|
javax.jcr.Property |
getProperty(javax.jcr.Node node,
java.lang.String relPath)
|
javax.jcr.Node |
getReferenced(javax.jcr.Node referent,
java.lang.String propertyName,
LinkType linkType)
|
java.util.Iterator<javax.jcr.Node> |
getReferents(javax.jcr.Node referenced,
java.lang.String propertyName,
LinkType linkType)
|
javax.jcr.Session |
getSession()
|
int |
hashCode()
|
boolean |
haxMixin(javax.jcr.Node node,
java.lang.String mixinTypeName)
|
int |
hits(javax.jcr.query.QueryResult result)
|
boolean |
isClosed()
|
void |
move(javax.jcr.Node srcNode,
javax.jcr.Node dstNode,
java.lang.String dstName)
|
void |
orderBefore(javax.jcr.Node parentNode,
javax.jcr.Node srcNode,
javax.jcr.Node dstNode)
|
void |
remove(javax.jcr.Node node)
Remove a node recursively in order to have one remove event generated for every descendants of the node in order to
keep the contexts state corrects. |
boolean |
removeMixin(javax.jcr.Node node,
java.lang.String mixinTypeName)
|
void |
save()
|
javax.jcr.Node |
setReferenced(javax.jcr.Node referent,
java.lang.String propertyName,
javax.jcr.Node referenced,
LinkType linkType)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
SessionWrapperImpl
public SessionWrapperImpl(SessionLifeCycle sessionLifeCycle,
javax.jcr.Session session,
boolean hasPropertyOptimized,
boolean hasNodeOptimized)
getProperties
public java.util.Iterator<javax.jcr.Property> getProperties(javax.jcr.Node node)
throws javax.jcr.RepositoryException
- Specified by:
getProperties in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
getProperty
public javax.jcr.Property getProperty(javax.jcr.Node node,
java.lang.String relPath)
throws javax.jcr.RepositoryException
- Specified by:
getProperty in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
getNode
public javax.jcr.Node getNode(java.lang.String path)
throws javax.jcr.RepositoryException
- Specified by:
getNode in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
getNode
public javax.jcr.Node getNode(javax.jcr.Node node,
java.lang.String relPath)
throws javax.jcr.RepositoryException
- Specified by:
getNode in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
getNodeType
public javax.jcr.nodetype.NodeType getNodeType(java.lang.String nodeTypeName)
throws javax.jcr.RepositoryException
- Specified by:
getNodeType in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
addNode
public javax.jcr.Node addNode(javax.jcr.Node parentNode,
java.lang.String relPath,
java.lang.String primartyNodeTypeName,
java.util.List<java.lang.String> mixinNodeTypeNames)
throws javax.jcr.RepositoryException
- Specified by:
addNode in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
move
public void move(javax.jcr.Node srcNode,
javax.jcr.Node dstNode,
java.lang.String dstName)
throws javax.jcr.RepositoryException
- Specified by:
move in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
orderBefore
public void orderBefore(javax.jcr.Node parentNode,
javax.jcr.Node srcNode,
javax.jcr.Node dstNode)
throws javax.jcr.RepositoryException
- Specified by:
orderBefore in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
getNodeByUUID
public javax.jcr.Node getNodeByUUID(java.lang.String uuid)
throws javax.jcr.RepositoryException
- Specified by:
getNodeByUUID in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
getParent
public javax.jcr.Node getParent(javax.jcr.Node childNode)
throws javax.jcr.RepositoryException
- Specified by:
getParent in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
getChildren
public java.util.Iterator<javax.jcr.Node> getChildren(javax.jcr.Node parentNode)
throws javax.jcr.RepositoryException
- Specified by:
getChildren in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
getChild
public javax.jcr.Node getChild(javax.jcr.Node parentNode,
java.lang.String name)
throws javax.jcr.RepositoryException
- Specified by:
getChild in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
remove
public void remove(javax.jcr.Node node)
throws javax.jcr.RepositoryException
- Remove a node recursively in order to have one remove event generated for every descendants of the node in order to
keep the contexts state corrects. It also remove all existing references to that node.
- Specified by:
remove in interface SessionWrapper
- Parameters:
node - the node to remove
- Throws:
javax.jcr.RepositoryException - any repository exception
canAddMixin
public boolean canAddMixin(javax.jcr.Node node,
java.lang.String mixinTypeName)
throws javax.jcr.RepositoryException
- Specified by:
canAddMixin in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
addMixin
public void addMixin(javax.jcr.Node node,
java.lang.String mixinTypeName)
throws javax.jcr.RepositoryException
- Specified by:
addMixin in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
removeMixin
public boolean removeMixin(javax.jcr.Node node,
java.lang.String mixinTypeName)
throws javax.jcr.RepositoryException
- Specified by:
removeMixin in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
haxMixin
public boolean haxMixin(javax.jcr.Node node,
java.lang.String mixinTypeName)
throws javax.jcr.RepositoryException
- Specified by:
haxMixin in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
cleanReferencesForRemoval
public void cleanReferencesForRemoval(javax.jcr.Node node)
throws javax.jcr.RepositoryException
- Need to find a way to optimized this method as it forces us to visit the entire children hierarchy.
- Parameters:
node - the node to be removed
- Throws:
javax.jcr.RepositoryException - any repository exception
save
public void save()
throws javax.jcr.RepositoryException
- Specified by:
save in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
getReferenced
public javax.jcr.Node getReferenced(javax.jcr.Node referent,
java.lang.String propertyName,
LinkType linkType)
throws javax.jcr.RepositoryException
- Specified by:
getReferenced in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
setReferenced
public javax.jcr.Node setReferenced(javax.jcr.Node referent,
java.lang.String propertyName,
javax.jcr.Node referenced,
LinkType linkType)
throws javax.jcr.RepositoryException
- Specified by:
setReferenced in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
getReferents
public java.util.Iterator<javax.jcr.Node> getReferents(javax.jcr.Node referenced,
java.lang.String propertyName,
LinkType linkType)
throws javax.jcr.RepositoryException
- Specified by:
getReferents in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
getSession
public javax.jcr.Session getSession()
- Specified by:
getSession in interface SessionWrapper
isClosed
public boolean isClosed()
- Specified by:
isClosed in interface SessionWrapper
close
public void close()
- Specified by:
close in interface SessionWrapper
createQuery
public javax.jcr.query.Query createQuery(java.lang.String statement)
throws javax.jcr.RepositoryException
- Specified by:
createQuery in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
executeQuery
public javax.jcr.query.QueryResult executeQuery(javax.jcr.query.Query query,
java.lang.Long offset,
java.lang.Long limit)
throws javax.jcr.RepositoryException
- Specified by:
executeQuery in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
hits
public int hits(javax.jcr.query.QueryResult result)
throws javax.jcr.RepositoryException
- Specified by:
hits in interface SessionWrapper
- Throws:
javax.jcr.RepositoryException
Copyright © 2012 eXo Platform SAS. All Rights Reserved.