public interface JCRItemWrapper
extends javax.jcr.Item
javax.jcr.Item to be able to inject
Jahia specific actions.
Jahia services should use this interface rather than the original to ensure that
we manipulate wrapped nodes and not the ones from the underlying implementation| Modifier and Type | Method and Description |
|---|---|
JCRItemWrapper |
getAncestor(int depth) |
String |
getCanonicalPath() |
JCRNodeWrapper |
getParent() |
JCRSessionWrapper |
getSession() |
void |
saveSession()
Validates all pending changes currently recorded in this
Session that apply to this Item
or any of its descendants (that is, the subtree rooted at this Item). |
JCRItemWrapper getAncestor(int depth) throws javax.jcr.ItemNotFoundException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
getAncestor in interface javax.jcr.ItemItem at the specified depth.javax.jcr.ItemNotFoundExceptionjavax.jcr.AccessDeniedExceptionjavax.jcr.RepositoryExceptionJCRNodeWrapper getParent() throws javax.jcr.ItemNotFoundException, javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
getParent in interface javax.jcr.ItemItem.javax.jcr.ItemNotFoundExceptionjavax.jcr.AccessDeniedExceptionjavax.jcr.RepositoryExceptionJCRSessionWrapper getSession() throws javax.jcr.RepositoryException
getSession in interface javax.jcr.ItemJCRSessionWrapper through which this Item was
acquired.javax.jcr.RepositoryExceptionvoid saveSession()
throws javax.jcr.AccessDeniedException,
javax.jcr.ItemExistsException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.InvalidItemStateException,
javax.jcr.ReferentialIntegrityException,
javax.jcr.version.VersionException,
javax.jcr.lock.LockException,
javax.jcr.nodetype.NoSuchNodeTypeException,
javax.jcr.RepositoryException
Session that apply to this Item
or any of its descendants (that is, the subtree rooted at this Item). If validation of all
pending changes succeeds, then this change information is cleared from the Session.
If the save occurs outside a transaction, the changes are persisted and thus
made visible to other Sessions. If the save occurs within a transaction,
the changes are not persisted until the transaction is committed.
If validation fails, then no pending changes are saved and they remain recorded on the Session.
There is no best-effort or partial save.
The item in persistent storage to which a transient item is saved is
determined by matching identifiers and paths.
An AccessDeniedException will be thrown if any of the changes
to be persisted would violate the access privileges of this
Session.
If any of the changes to be persisted would cause the removal of a node
that is currently the target of a REFERENCE property then a
ReferentialIntegrityException is thrown, provided that this Session has
read access to that REFERENCE property. If, on the other hand, this
Session does not have read access to the REFERENCE property in question,
then an AccessDeniedException is thrown instead.
An ItemExistsException will be thrown if any of the changes
to be persisted would be prevented by the presence of an already existing
item in the workspace.
A ConstraintViolationException will be thrown if any of the
changes to be persisted would violate a node type restriction.
Additionally, a repository may use this exception to enforce
implementation- or configuration-dependant restrictions.
An InvalidItemStateException is thrown if any of the
changes to be persisted conflicts with a change already persisted
through another session and the implementation is such that this
conflict can only be detected at save-time and therefore was not
detected earlier, at change-time.
A VersionException is thrown if the save would make a result in
a change to persistent storage that would violate the read-only status of a
checked-in node.
A LockException is thrown if the save would result
in a change to persistent storage that would violate a lock.
A NoSuchNodeTypeException is thrown if the save would result in the
addition of a node with an unrecognized node type.
A RepositoryException will be thrown if another error
occurs.javax.jcr.AccessDeniedException - if any of the changes to be persisted would violate
the access privileges of the this Session. Also thrown if any of the
changes to be persisted would cause the removal of a node that is currently
referenced by a REFERENCE property that this Session
does not have read access to.javax.jcr.ItemExistsException - if any of the changes
to be persisted would be prevented by the presence of an already existing
item in the workspace.javax.jcr.nodetype.ConstraintViolationException - if any of the changes to be persisted would
violate a node type or restriction. Additionally, a repository may use this
exception to enforce implementation- or configuration-dependent restrictions.javax.jcr.InvalidItemStateException - if any of the
changes to be persisted conflicts with a change already persisted
through another session and the implementation is such that this
conflict can only be detected at save-time and therefore was not
detected earlier, at change-time.javax.jcr.ReferentialIntegrityException - if any of the
changes to be persisted would cause the removal of a node that is currently
referenced by a REFERENCE property that this Session
has read access to.javax.jcr.version.VersionException - if the save would make a result in
a change to persistent storage that would violate the read-only status of a
checked-in node.javax.jcr.lock.LockException - if the save would result in a
change to persistent storage that would violate a lock.javax.jcr.nodetype.NoSuchNodeTypeException - if the save would result in the
addition of a node with an unrecognized node type.javax.jcr.RepositoryException - if another error occurs.String getCanonicalPath()
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.