org.chromattic.core
Class DomainSessionImpl

java.lang.Object
  extended by org.chromattic.core.DomainSession
      extended by org.chromattic.core.DomainSessionImpl
All Implemented Interfaces:
ChromatticSession

public class DomainSessionImpl
extends DomainSession

Version:
$Revision$
Author:
Julien Viet

Field Summary
 
Fields inherited from class org.chromattic.core.DomainSession
broadcaster, sessionWrapper
 
Constructor Summary
DomainSessionImpl(Domain domain, SessionWrapper sessionWrapper)
           
 
Method Summary
protected
<O> O
_create(java.lang.Class<O> clazz, java.lang.String name)
           
protected
<O> O
_findById(java.lang.Class<O> clazz, java.lang.String id)
           
protected
<O> O
_findByPath(EntityContext ctx, java.lang.Class<O> clazz, java.lang.String relPath)
           
protected  java.lang.Object _getChild(EntityContext ctx, java.lang.String name)
           
protected
<T> java.util.Iterator<T>
_getChildren(EntityContext ctx, java.lang.Class<T> filterClass)
           
protected  java.lang.String _getName(EntityContext ctx)
           
protected  java.lang.Object _getParent(EntityContext ctx)
           
protected  java.lang.Object _getReferenced(EntityContext referentCtx, java.lang.String name, LinkType linkType)
           
protected
<T> java.util.Iterator<T>
_getReferents(EntityContext referencedCtx, java.lang.String name, java.lang.Class<T> filterClass, LinkType linkType)
           
protected  javax.jcr.Node _getRoot()
           
protected  void _move(EntityContext srcCtx, EntityContext dstCtx)
           
protected  void _orderBefore(EntityContext parentCtx, EntityContext srcCtx, EntityContext dstCtx)
           
protected  java.lang.String _persist(EntityContext ctx, java.lang.String name)
           
protected  java.lang.String _persist(EntityContext srcCtx, java.lang.String name, EntityContext dstCtx)
          Insert a context as a child of a parent context.
protected  void _remove(EntityContext context)
           
protected  void _removeChild(EntityContext ctx, java.lang.String name)
           
protected  void _save()
           
protected  void _setName(EntityContext ctx, java.lang.String name)
           
protected  boolean _setReferenced(EntityContext referentCtx, java.lang.String name, EntityContext referencedCtx, LinkType linkType)
           
 void close()
           
 void nodeAdded(javax.jcr.Node node, EntityContext ctx)
           
 void nodeRead(javax.jcr.Node node)
           
 void nodeRemoved(java.lang.String nodeId)
           
 
Methods inherited from class org.chromattic.core.DomainSession
addEventListener, create, create, createQueryBuilder, findById, findByNode, findByPath, findByPath, getChild, getChildren, getDomain, getId, getJCRSession, getName, getName, getNode, getParent, getPath, getReferenced, getReferents, getRoot, getSessionWrapper, getStatus, insert, insert, move, orderBefore, persist, persist, persist, persist, persist, remove, remove, removeChild, save, setName, setReferenced, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainSessionImpl

public DomainSessionImpl(Domain domain,
                         SessionWrapper sessionWrapper)
Method Detail

_getName

protected java.lang.String _getName(EntityContext ctx)
Specified by:
_getName in class DomainSession

_setName

protected void _setName(EntityContext ctx,
                        java.lang.String name)
Specified by:
_setName in class DomainSession

_findByPath

protected <O> O _findByPath(EntityContext ctx,
                            java.lang.Class<O> clazz,
                            java.lang.String relPath)
                 throws javax.jcr.RepositoryException
Specified by:
_findByPath in class DomainSession
Throws:
javax.jcr.RepositoryException

_persist

protected java.lang.String _persist(EntityContext ctx,
                                    java.lang.String name)
                             throws javax.jcr.RepositoryException
Specified by:
_persist in class DomainSession
Throws:
javax.jcr.RepositoryException

_persist

protected java.lang.String _persist(EntityContext srcCtx,
                                    java.lang.String name,
                                    EntityContext dstCtx)
                             throws java.lang.NullPointerException,
                                    java.lang.IllegalArgumentException,
                                    java.lang.IllegalStateException,
                                    javax.jcr.RepositoryException
Insert a context as a child of a parent context.

Specified by:
_persist in class DomainSession
Parameters:
srcCtx - the source context
name - the destination path relative to the source context
dstCtx - the destination context
Returns:
the id of the inserted context
Throws:
java.lang.NullPointerException
java.lang.IllegalArgumentException
java.lang.IllegalStateException
javax.jcr.RepositoryException

_move

protected void _move(EntityContext srcCtx,
                     EntityContext dstCtx)
              throws javax.jcr.RepositoryException
Specified by:
_move in class DomainSession
Throws:
javax.jcr.RepositoryException

_orderBefore

protected void _orderBefore(EntityContext parentCtx,
                            EntityContext srcCtx,
                            EntityContext dstCtx)
                     throws javax.jcr.RepositoryException
Specified by:
_orderBefore in class DomainSession
Throws:
javax.jcr.RepositoryException

_create

protected <O> O _create(java.lang.Class<O> clazz,
                        java.lang.String name)
             throws java.lang.NullPointerException,
                    java.lang.IllegalArgumentException,
                    javax.jcr.RepositoryException
Specified by:
_create in class DomainSession
Throws:
java.lang.NullPointerException
java.lang.IllegalArgumentException
javax.jcr.RepositoryException

_findById

protected <O> O _findById(java.lang.Class<O> clazz,
                          java.lang.String id)
               throws javax.jcr.RepositoryException
Specified by:
_findById in class DomainSession
Throws:
javax.jcr.RepositoryException

_save

protected void _save()
              throws javax.jcr.RepositoryException
Specified by:
_save in class DomainSession
Throws:
javax.jcr.RepositoryException

_remove

protected void _remove(EntityContext context)
                throws javax.jcr.RepositoryException
Specified by:
_remove in class DomainSession
Throws:
javax.jcr.RepositoryException

_getReferenced

protected java.lang.Object _getReferenced(EntityContext referentCtx,
                                          java.lang.String name,
                                          LinkType linkType)
                                   throws javax.jcr.RepositoryException
Specified by:
_getReferenced in class DomainSession
Throws:
javax.jcr.RepositoryException

_setReferenced

protected boolean _setReferenced(EntityContext referentCtx,
                                 java.lang.String name,
                                 EntityContext referencedCtx,
                                 LinkType linkType)
                          throws javax.jcr.RepositoryException
Specified by:
_setReferenced in class DomainSession
Throws:
javax.jcr.RepositoryException

_getReferents

protected <T> java.util.Iterator<T> _getReferents(EntityContext referencedCtx,
                                                  java.lang.String name,
                                                  java.lang.Class<T> filterClass,
                                                  LinkType linkType)
                                       throws javax.jcr.RepositoryException
Specified by:
_getReferents in class DomainSession
Throws:
javax.jcr.RepositoryException

_removeChild

protected void _removeChild(EntityContext ctx,
                            java.lang.String name)
                     throws javax.jcr.RepositoryException
Specified by:
_removeChild in class DomainSession
Throws:
javax.jcr.RepositoryException

_getChild

protected java.lang.Object _getChild(EntityContext ctx,
                                     java.lang.String name)
                              throws javax.jcr.RepositoryException
Specified by:
_getChild in class DomainSession
Throws:
javax.jcr.RepositoryException

_getChildren

protected <T> java.util.Iterator<T> _getChildren(EntityContext ctx,
                                                 java.lang.Class<T> filterClass)
                                      throws javax.jcr.RepositoryException
Specified by:
_getChildren in class DomainSession
Throws:
javax.jcr.RepositoryException

_getParent

protected java.lang.Object _getParent(EntityContext ctx)
                               throws javax.jcr.RepositoryException
Specified by:
_getParent in class DomainSession
Throws:
javax.jcr.RepositoryException

_getRoot

protected javax.jcr.Node _getRoot()
                           throws javax.jcr.RepositoryException
Specified by:
_getRoot in class DomainSession
Throws:
javax.jcr.RepositoryException

nodeRead

public void nodeRead(javax.jcr.Node node)
              throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

nodeAdded

public void nodeAdded(javax.jcr.Node node,
                      EntityContext ctx)
               throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

nodeRemoved

public void nodeRemoved(java.lang.String nodeId)
                 throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

close

public void close()


Copyright © 2009 eXo Platform SAS. All Rights Reserved.