org.chromattic.core.jcr
Class AbstractLinkManager
java.lang.Object
org.chromattic.core.jcr.AbstractLinkManager
- Direct Known Subclasses:
- PathLinkManager, ReferenceLinkManager
public abstract class AbstractLinkManager
- extends java.lang.Object
The reference manager takes care of managing references between nodes. The main reason is that
JCR reference management is a bit weird about the usage of Node#getReferences(). The goal
of this class is to manage one to many relationships between nodes and their consistency.
The life time of this object is valid from the beginning of the session until the session
or a portion of the session is saved. When a session is saved, the clear operation will reset
the state of the reference manager.
- Version:
- $Revision$
- Author:
- Julien Viet
|
Field Summary |
protected javax.jcr.Session |
session
. |
|
Method Summary |
protected abstract javax.jcr.Node |
_getReferenced(javax.jcr.Property property)
|
protected abstract java.util.Iterator<javax.jcr.Node> |
_getReferents(javax.jcr.Node referenced,
java.lang.String propertyName)
|
protected abstract void |
_setReferenced(javax.jcr.Node referent,
java.lang.String propertyName,
javax.jcr.Node referenced)
|
void |
clear()
|
javax.jcr.Node |
getReferenced(javax.jcr.Node referent,
java.lang.String propertyName)
|
java.util.Iterator<javax.jcr.Node> |
getReferents(javax.jcr.Node referenced,
java.lang.String propertyName)
|
javax.jcr.Node |
setReferenced(javax.jcr.Node referent,
java.lang.String propertyName,
javax.jcr.Node referenced)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
session
protected final javax.jcr.Session session
- .
AbstractLinkManager
public AbstractLinkManager(javax.jcr.Session session)
getReferents
public java.util.Iterator<javax.jcr.Node> getReferents(javax.jcr.Node referenced,
java.lang.String propertyName)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getReferenced
protected abstract javax.jcr.Node _getReferenced(javax.jcr.Property property)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_setReferenced
protected abstract void _setReferenced(javax.jcr.Node referent,
java.lang.String propertyName,
javax.jcr.Node referenced)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
_getReferents
protected abstract java.util.Iterator<javax.jcr.Node> _getReferents(javax.jcr.Node referenced,
java.lang.String propertyName)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
getReferenced
public javax.jcr.Node getReferenced(javax.jcr.Node referent,
java.lang.String propertyName)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
setReferenced
public javax.jcr.Node setReferenced(javax.jcr.Node referent,
java.lang.String propertyName,
javax.jcr.Node referenced)
throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
clear
public void clear()
Copyright © 2011 eXo Platform SAS. All Rights Reserved.