org.chromattic.core.jcr
Class SessionWrapperImpl

java.lang.Object
  extended by org.chromattic.core.jcr.SessionWrapperImpl
All Implemented Interfaces:
SessionWrapper

public class SessionWrapperImpl
extends Object
implements SessionWrapper

Version:
$Revision$
Author:
Julien Viet

Field Summary
 javax.jcr.Session session
          .
 
Constructor Summary
SessionWrapperImpl(SessionLifeCycle sessionLifeCycle, javax.jcr.Session session)
           
 
Method Summary
 javax.jcr.Node addNode(javax.jcr.Node parentNode, String relPath, NodeDef nodeType)
           
 javax.jcr.Node addNode(String relPath, NodeDef nodeType)
           
 void close()
           
 boolean equals(Object obj)
           
 javax.jcr.Node getChild(javax.jcr.Node parentNode, String name)
           
 Iterator<javax.jcr.Node> getChildren(javax.jcr.Node parentNode)
           
 javax.jcr.Node getNodeByUUID(String uuid)
           
 javax.jcr.nodetype.NodeType getNodeType(String nodeTypeName)
           
 javax.jcr.Node getParent(javax.jcr.Node childNode)
           
 javax.jcr.Node getReferenced(javax.jcr.Node referent, String propertyName, LinkType linkType)
           
 Iterator<javax.jcr.Node> getReferents(javax.jcr.Node referenced, String propertyName, LinkType linkType)
           
 javax.jcr.Session getSession()
           
 int hashCode()
           
 void orderBefore(javax.jcr.Node parentNode, javax.jcr.Node srcNode, javax.jcr.Node dstNode)
           
 Iterator<String> 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.
 void remove(javax.jcr.Node node, LinkedList<String> ids)
           
 void save()
           
 javax.jcr.Node setReferenced(javax.jcr.Node referent, String propertyName, javax.jcr.Node referenced, LinkType linkType)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

session

public final javax.jcr.Session session
.

Constructor Detail

SessionWrapperImpl

public SessionWrapperImpl(SessionLifeCycle sessionLifeCycle,
                          javax.jcr.Session session)
Method Detail

getNodeType

public javax.jcr.nodetype.NodeType getNodeType(String nodeTypeName)
                                        throws javax.jcr.RepositoryException
Specified by:
getNodeType in interface SessionWrapper
Throws:
javax.jcr.RepositoryException

addNode

public javax.jcr.Node addNode(String relPath,
                              NodeDef nodeType)
                       throws javax.jcr.RepositoryException
Specified by:
addNode in interface SessionWrapper
Throws:
javax.jcr.RepositoryException

addNode

public javax.jcr.Node addNode(javax.jcr.Node parentNode,
                              String relPath,
                              NodeDef nodeType)
                       throws javax.jcr.RepositoryException
Specified by:
addNode 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(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 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,
                               String name)
                        throws javax.jcr.RepositoryException
Specified by:
getChild in interface SessionWrapper
Throws:
javax.jcr.RepositoryException

remove

public Iterator<String> 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

remove

public void remove(javax.jcr.Node node,
                   LinkedList<String> ids)
            throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

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,
                                    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,
                                    String propertyName,
                                    javax.jcr.Node referenced,
                                    LinkType linkType)
                             throws javax.jcr.RepositoryException
Specified by:
setReferenced in interface SessionWrapper
Throws:
javax.jcr.RepositoryException

getReferents

public Iterator<javax.jcr.Node> getReferents(javax.jcr.Node referenced,
                                             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 Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getSession

public javax.jcr.Session getSession()
Specified by:
getSession in interface SessionWrapper

close

public void close()
Specified by:
close in interface SessionWrapper


Copyright © 2009 eXo Platform SAS. All Rights Reserved.