org.chromattic.core
Class DomainSession
java.lang.Object
org.chromattic.core.DomainSession
- All Implemented Interfaces:
- ChromatticSession
public abstract class DomainSession
- extends Object
- implements ChromatticSession
- Version:
- $Revision$
- Author:
- Julien Viet
|
Method Summary |
protected abstract
|
_create(Class<O> clazz,
String name)
|
protected abstract
|
_findById(Class<O> clazz,
String id)
|
protected abstract
|
_findByPath(Object o,
Class<O> clazz,
String relPath)
|
protected abstract Object |
_getChild(ObjectContext ctx,
String name)
|
protected abstract
|
_getChildren(ObjectContext ctx,
Class<T> filterClass)
|
protected abstract Object |
_getParent(ObjectContext ctx)
|
protected abstract Object |
_getReferenced(ObjectContext referentCtx,
String name,
LinkType linkType)
|
protected abstract
|
_getReferents(ObjectContext referencedCtx,
String name,
Class<T> filterClass,
LinkType linkType)
|
protected abstract void |
_orderBefore(ObjectContext parentCtx,
ObjectContext srcCtx,
ObjectContext dstCtx)
|
protected abstract String |
_persist(ObjectContext ctx,
String relPath)
|
protected abstract String |
_persist(ObjectContext parentCtx,
String name,
ObjectContext childCtx)
|
protected abstract void |
_remove(Object o)
|
protected abstract void |
_remove(ObjectContext context)
|
protected abstract void |
_removeChild(ObjectContext ctx,
String name)
|
protected abstract void |
_save()
|
protected abstract boolean |
_setReferenced(ObjectContext referentCtx,
String name,
ObjectContext referencedCtx,
LinkType linkType)
|
void |
addEventListener(EventListener listener)
|
|
create(Class<O> clazz)
|
|
create(Class<O> clazz,
String name)
|
ObjectQueryBuilder<?> |
createQueryBuilder()
|
String |
decodeName(String internal)
|
String |
encodeName(String external)
|
|
findById(Class<O> clazz,
String id)
|
|
findByNode(Class<O> clazz,
javax.jcr.Node node)
|
|
findByPath(Class<O> clazz,
String relPath)
|
|
findByPath(Object o,
Class<O> clazz,
String relPath)
|
Object |
getChild(ObjectContext ctx,
String name)
|
|
getChildren(ObjectContext ctx,
Class<T> filterClass)
|
String |
getId(Object o)
|
String |
getName(Object o)
|
String |
getName(ObjectContext ctx)
|
javax.jcr.Node |
getNode(Object o)
|
Object |
getParent(ObjectContext ctx)
|
String |
getPath(Object o)
|
Object |
getReferenced(ObjectContext referentCtx,
String name,
LinkType linkType)
|
|
getReferents(ObjectContext referencedCtx,
String name,
Class<T> filterClass,
LinkType linkType)
|
Status |
getStatus(Object o)
|
|
insert(Class<O> clazz,
String relPath)
|
|
insert(Object parent,
Class<O> clazz,
String relPath)
|
void |
orderBefore(ObjectContext parentCtx,
ObjectContext srcCtx,
ObjectContext dstCtx)
|
String |
persist(Object o)
|
String |
persist(ObjectContext relatativeCtx,
String name,
ObjectContext siblingCtx)
|
String |
persist(Object parent,
Object child)
|
String |
persist(Object parent,
Object child,
String relPath)
|
String |
persist(Object o,
String relPath)
|
String |
persistWithName(ObjectContext parentCtx,
String name,
ObjectContext childCtx)
|
String |
persistWithRelativePath(ObjectContext parentCtx,
String relPath,
ObjectContext childCtx)
|
void |
remove(Object o)
|
void |
remove(ObjectContext context)
|
void |
removeChild(ObjectContext ctx,
String name)
|
void |
save()
|
void |
setName(ObjectContext ctx,
String name)
|
boolean |
setReferenced(ObjectContext referentCtx,
String name,
ObjectContext referencedCtx,
LinkType linkType)
|
ObjectContext |
unwrap(Object o)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
broadcaster
protected final EventBroadcaster broadcaster
- .
DomainSession
protected DomainSession(Domain domain)
_persist
protected abstract String _persist(ObjectContext ctx,
String relPath)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_persist
protected abstract String _persist(ObjectContext parentCtx,
String name,
ObjectContext childCtx)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_create
protected abstract <O> O _create(Class<O> clazz,
String name)
throws NullPointerException,
IllegalArgumentException,
javax.jcr.RepositoryException
- Throws:
NullPointerException
IllegalArgumentException
javax.jcr.RepositoryException
_findById
protected abstract <O> O _findById(Class<O> clazz,
String id)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_save
protected abstract void _save()
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_remove
protected abstract void _remove(Object o)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_remove
protected abstract void _remove(ObjectContext context)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getReferenced
protected abstract Object _getReferenced(ObjectContext referentCtx,
String name,
LinkType linkType)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_setReferenced
protected abstract boolean _setReferenced(ObjectContext referentCtx,
String name,
ObjectContext referencedCtx,
LinkType linkType)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getReferents
protected abstract <T> Iterator<T> _getReferents(ObjectContext referencedCtx,
String name,
Class<T> filterClass,
LinkType linkType)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_removeChild
protected abstract void _removeChild(ObjectContext ctx,
String name)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getChild
protected abstract Object _getChild(ObjectContext ctx,
String name)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getChildren
protected abstract <T> Iterator<T> _getChildren(ObjectContext ctx,
Class<T> filterClass)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getParent
protected abstract Object _getParent(ObjectContext ctx)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_findByPath
protected abstract <O> O _findByPath(Object o,
Class<O> clazz,
String relPath)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_orderBefore
protected abstract void _orderBefore(ObjectContext parentCtx,
ObjectContext srcCtx,
ObjectContext dstCtx)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
getId
public final String getId(Object o)
throws UndeclaredRepositoryException
- Specified by:
getId in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
getName
public final String getName(Object o)
throws UndeclaredRepositoryException
- Specified by:
getName in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
getPath
public final String getPath(Object o)
throws UndeclaredRepositoryException
- Specified by:
getPath in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
create
public final <O> O create(Class<O> clazz)
throws NullPointerException,
IllegalArgumentException
- Specified by:
create in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
create
public final <O> O create(Class<O> clazz,
String name)
throws NullPointerException,
IllegalArgumentException
- Specified by:
create in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
insert
public final <O> O insert(Object parent,
Class<O> clazz,
String relPath)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
- Specified by:
insert in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
ChromatticException
insert
public final <O> O insert(Class<O> clazz,
String relPath)
throws NullPointerException,
IllegalArgumentException,
UndeclaredRepositoryException
- Specified by:
insert in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
UndeclaredRepositoryException
persist
public final String persist(Object parent,
Object child,
String relPath)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
- Specified by:
persist in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
ChromatticException
persist
public final String persist(Object parent,
Object child)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
- Specified by:
persist in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
ChromatticException
persist
public final String persist(Object o)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
- Specified by:
persist in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
ChromatticException
persist
public final String persist(Object o,
String relPath)
throws NullPointerException,
IllegalArgumentException,
ChromatticException
- Specified by:
persist in interface ChromatticSession
- Throws:
NullPointerException
IllegalArgumentException
ChromatticException
findByNode
public final <O> O findByNode(Class<O> clazz,
javax.jcr.Node node)
throws UndeclaredRepositoryException
- Specified by:
findByNode in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
findById
public final <O> O findById(Class<O> clazz,
String id)
throws UndeclaredRepositoryException
- Specified by:
findById in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
findByPath
public final <O> O findByPath(Object o,
Class<O> clazz,
String relPath)
throws ChromatticException
- Specified by:
findByPath in interface ChromatticSession
- Throws:
ChromatticException
findByPath
public final <O> O findByPath(Class<O> clazz,
String relPath)
throws ChromatticException
- Specified by:
findByPath in interface ChromatticSession
- Throws:
ChromatticException
save
public final void save()
throws UndeclaredRepositoryException
- Specified by:
save in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
getStatus
public final Status getStatus(Object o)
throws UndeclaredRepositoryException
- Specified by:
getStatus in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
remove
public final void remove(Object o)
throws UndeclaredRepositoryException
- Specified by:
remove in interface ChromatticSession
- Throws:
UndeclaredRepositoryException
createQueryBuilder
public ObjectQueryBuilder<?> createQueryBuilder()
throws ChromatticException
- Specified by:
createQueryBuilder in interface ChromatticSession
- Throws:
ChromatticException
getNode
public final javax.jcr.Node getNode(Object o)
encodeName
public final String encodeName(String external)
decodeName
public final String decodeName(String internal)
getName
public final String getName(ObjectContext ctx)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
setName
public final void setName(ObjectContext ctx,
String name)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
persist
public final String persist(ObjectContext relatativeCtx,
String name,
ObjectContext siblingCtx)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
orderBefore
public final void orderBefore(ObjectContext parentCtx,
ObjectContext srcCtx,
ObjectContext dstCtx)
persistWithName
public final String persistWithName(ObjectContext parentCtx,
String name,
ObjectContext childCtx)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
persistWithRelativePath
public final String persistWithRelativePath(ObjectContext parentCtx,
String relPath,
ObjectContext childCtx)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
remove
public final void remove(ObjectContext context)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
getReferenced
public final Object getReferenced(ObjectContext referentCtx,
String name,
LinkType linkType)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
setReferenced
public final boolean setReferenced(ObjectContext referentCtx,
String name,
ObjectContext referencedCtx,
LinkType linkType)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
removeChild
public final void removeChild(ObjectContext ctx,
String name)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
getChild
public final Object getChild(ObjectContext ctx,
String name)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
getChildren
public final <T> Iterator<T> getChildren(ObjectContext ctx,
Class<T> filterClass)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
getParent
public final Object getParent(ObjectContext ctx)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
getReferents
public final <T> Iterator<T> getReferents(ObjectContext referencedCtx,
String name,
Class<T> filterClass,
LinkType linkType)
throws UndeclaredRepositoryException
- Throws:
UndeclaredRepositoryException
unwrap
public final ObjectContext unwrap(Object o)
addEventListener
public void addEventListener(EventListener listener)
- Specified by:
addEventListener in interface ChromatticSession
Copyright © 2009 eXo Platform SAS. All Rights Reserved.