|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.spi2jcr.RepositoryServiceImpl
public class RepositoryServiceImpl
RepositoryServiceImpl implements a repository service on top
of a JCR Repository.
| Constructor Summary | |
|---|---|
RepositoryServiceImpl(javax.jcr.Repository repository,
BatchReadConfig batchReadConfig)
Creates a new repository service based on the given repository. |
|
| Method Summary | |
|---|---|
void |
addVersionLabel(SessionInfo sessionInfo,
NodeId versionHistoryId,
NodeId versionId,
Name label,
boolean moveLabel)
Add the given version label in the persistent layer. |
NodeId |
checkin(SessionInfo sessionInfo,
NodeId nodeId)
Performs a checkin for the Node identified by the given
NodeId. |
void |
checkout(SessionInfo sessionInfo,
NodeId nodeId)
Performs a checkout for the Node identified by the given
NodeId. |
void |
checkQueryStatement(SessionInfo sessionInfo,
java.lang.String statement,
java.lang.String language,
java.util.Map namespaces)
Checks if the query statement is valid according to the
specified query language. |
void |
clone(SessionInfo sessionInfo,
java.lang.String srcWorkspaceName,
NodeId srcNodeId,
NodeId destParentNodeId,
Name destName,
boolean removeExisting)
Clone the subtree identified by the given srcNodeId
in workspace named srcWorkspaceName to the destination
in the workspace specified by the given SessionInfo. |
void |
copy(SessionInfo sessionInfo,
java.lang.String srcWorkspaceName,
NodeId srcNodeId,
NodeId destParentNodeId,
Name destName)
Clone the subtree identified by the given srcNodeId
in workspace named srcWorkspaceName to the destination
in the workspace specified by the given SessionInfo. |
Batch |
createBatch(SessionInfo sessionInfo,
ItemId itemId)
Indicates the start of a set of operations that cause modifications on the underlying persistence layer. |
EventFilter |
createEventFilter(SessionInfo sessionInfo,
int eventTypes,
Path absPath,
boolean isDeep,
java.lang.String[] uuid,
Name[] nodeTypeName,
boolean noLocal)
Creates an event filter. |
Subscription |
createSubscription(SessionInfo sessionInfo,
EventFilter[] filters)
Creates a new Subscription for events with an initial set of
EventFilters. |
void |
dispose(SessionInfo sessionInfo)
Indicates to the RepositoryService, that the given SessionInfo
will not be used any more. |
void |
dispose(Subscription subscription)
Indicates that the passed subscription is no longer needed. |
QueryInfo |
executeQuery(SessionInfo sessionInfo,
java.lang.String statement,
java.lang.String language,
java.util.Map namespaces)
Execute the given query statement with the specified query language. |
java.util.Iterator |
getChildInfos(SessionInfo sessionInfo,
NodeId parentId)
Returns an Iterator of ChildInfos present on the
Node represented by the given parentId. |
EventBundle[] |
getEvents(Subscription subscription,
long timeout)
Retrieves the events that occurred since the last call to this method for the passed subscription. |
IdFactory |
getIdFactory()
Return the IdFactory. |
java.util.Iterator |
getItemInfos(SessionInfo sessionInfo,
NodeId nodeId)
Method used to 'batch-read' from the persistent storage. |
LockInfo |
getLockInfo(SessionInfo sessionInfo,
NodeId nodeId)
Returns the lock information that applies to Node identified
by the given NodeId or null. |
NameFactory |
getNameFactory()
Return the NameFactory. |
java.lang.String |
getNamespacePrefix(SessionInfo sessionInfo,
java.lang.String uri)
Returns the namespace prefix for the given namespace uri. |
java.lang.String |
getNamespaceURI(SessionInfo sessionInfo,
java.lang.String prefix)
Returns the namespace URI for the given namespace prefix. |
QNodeDefinition |
getNodeDefinition(SessionInfo sessionInfo,
NodeId nodeId)
Returns the QNodeDefinition for the Node
identified by the given id. |
NodeInfo |
getNodeInfo(SessionInfo sessionInfo,
NodeId nodeId)
Retrieve the NodeInfo for the node identified by the given
NodeId. |
PathFactory |
getPathFactory()
Return the PathFactory. |
QPropertyDefinition |
getPropertyDefinition(SessionInfo sessionInfo,
PropertyId propertyId)
Returns the QPropertyDefinition for the Property
identified by the given id. |
PropertyInfo |
getPropertyInfo(SessionInfo sessionInfo,
PropertyId propertyId)
Returns the PropertyInfo for the Property
identified by the given id. |
java.util.Iterator |
getQNodeTypeDefinitions(SessionInfo sessionInfo)
Retrieve the QNodeTypeDefinitions of all registered nodetypes. |
java.util.Iterator |
getQNodeTypeDefinitions(SessionInfo sessionInfo,
Name[] nodetypeNames)
Retrieve QNodeTypeDefinitions for the given names. |
QValueFactory |
getQValueFactory()
Return the QValueFactory defined with this SPI implementation. |
java.util.Map |
getRegisteredNamespaces(SessionInfo sessionInfo)
Retrieve all registered namespaces. |
java.util.Map |
getRepositoryDescriptors()
Returns all property descriptors that can be exposed with the Repository implementation built on top of
this RepositoryService. |
java.lang.String[] |
getSupportedQueryLanguages(SessionInfo sessionInfo)
Returns a String array identifying all query languages supported by this SPI implementation. |
java.lang.String[] |
getWorkspaceNames(SessionInfo sessionInfo)
Return all workspace names available for the given SessionInfo. |
SessionInfo |
impersonate(SessionInfo sessionInfo,
javax.jcr.Credentials credentials)
Returns a SessionInfo that will be used by other methods
on the RepositoryService. |
void |
importXml(SessionInfo sessionInfo,
NodeId parentId,
java.io.InputStream xmlStream,
int uuidBehaviour)
Imports the data present in the given InputStream into the
persistent layer. |
boolean |
isGranted(SessionInfo sessionInfo,
ItemId itemId,
java.lang.String[] actions)
Returns true if all actions defined in the specified array are granted to given SessionInfo. |
LockInfo |
lock(SessionInfo sessionInfo,
NodeId nodeId,
boolean deep,
boolean sessionScoped)
Create a lock on the Node identified by the given id. |
java.util.Iterator |
merge(SessionInfo sessionInfo,
NodeId nodeId,
java.lang.String srcWorkspaceName,
boolean bestEffort)
Merge the node identified by the given NodeId and its subtree
with the corresponding node present in the workspace with the name of
srcWorkspaceName. |
void |
move(SessionInfo sessionInfo,
NodeId srcNodeId,
NodeId destParentNodeId,
Name destName)
Moves the node identified by the given srcNodeId (and its
entire subtree) to the new location defined by destParentNodeId
and a new name (destName). |
SessionInfo |
obtain(javax.jcr.Credentials credentials,
java.lang.String workspaceName)
Returns a SessionInfo that will be used by other methods
on the RepositoryService. |
SessionInfo |
obtain(SessionInfo sessionInfo,
java.lang.String workspaceName)
Returns a new SessionInfo for the given workspace name that
will be used by other methods on the RepositoryService. |
void |
refreshLock(SessionInfo sessionInfo,
NodeId nodeId)
Explicit refresh of an existing lock. |
void |
registerNamespace(SessionInfo sessionInfo,
java.lang.String prefix,
java.lang.String uri)
Register a new namespace with the given prefix and uri. |
void |
removeVersion(SessionInfo sessionInfo,
NodeId versionHistoryId,
NodeId versionId)
Remove the version inditified by the specified versionId. |
void |
removeVersionLabel(SessionInfo sessionInfo,
NodeId versionHistoryId,
NodeId versionId,
Name label)
Remove the given version label in the persistent layer. |
void |
resolveMergeConflict(SessionInfo sessionInfo,
NodeId nodeId,
NodeId[] mergeFailedIds,
NodeId[] predecessorIds)
Resolve an existing merge conflict present with the node identified by the given NodeId. |
void |
restore(SessionInfo sessionInfo,
NodeId[] versionIds,
boolean removeExisting)
Restore multiple versions at once. |
void |
restore(SessionInfo sessionInfo,
NodeId nodeId,
NodeId versionId,
boolean removeExisting)
Restores the node identified by nodeId to the state defined
by the version with the specified versionId. |
void |
submit(Batch batch)
Completes the given Batch or discard all the previous modifications. |
void |
unlock(SessionInfo sessionInfo,
NodeId nodeId)
Releases the lock on the Node identified by the given
NodeId.
Please note, that on logout all
session-scoped locks must be released by calling unlock. |
void |
unregisterNamespace(SessionInfo sessionInfo,
java.lang.String uri)
Unregister the namespace identified by the given uri |
void |
update(SessionInfo sessionInfo,
NodeId nodeId,
java.lang.String srcWorkspaceName)
Updates the node identified by the given NodeId replacing
it (an the complete subtree) with a clone of its corresponding node
present in the workspace with the given srcWorkspaceName. |
void |
updateEventFilters(Subscription subscription,
EventFilter[] filters)
Updates events filters on the subscription. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RepositoryServiceImpl(javax.jcr.Repository repository,
BatchReadConfig batchReadConfig)
repository.
repository - a JCR repository instance.batchReadConfig - getNodeInfo(SessionInfo, NodeId).| Method Detail |
|---|
public IdFactory getIdFactory()
IdFactory.
getIdFactory in interface RepositoryServiceIdFactory.public NameFactory getNameFactory()
NameFactory.
getNameFactory in interface RepositoryServiceNameFactory.public PathFactory getPathFactory()
PathFactory.
getPathFactory in interface RepositoryServicePathFactory.public QValueFactory getQValueFactory()
QValueFactory defined with this SPI implementation.
getQValueFactory in interface RepositoryServiceQValueFactory.
public java.util.Map getRepositoryDescriptors()
throws javax.jcr.RepositoryException
Repository implementation built on top of
this RepositoryService.
getRepositoryDescriptors in interface RepositoryServicejavax.jcr.RepositoryExceptionRepository.getDescriptorKeys(),
Repository.getDescriptor(String)
public SessionInfo obtain(javax.jcr.Credentials credentials,
java.lang.String workspaceName)
throws javax.jcr.LoginException,
javax.jcr.NoSuchWorkspaceException,
javax.jcr.RepositoryException
SessionInfo that will be used by other methods
on the RepositoryService.
An implementation may choose to authenticate the user using the supplied
credentials.
obtain in interface RepositoryServicecredentials - the credentials of the user.workspaceName - the name of the workspace the SessionInfo
should be built for. If the specified workspaceName is null
the implementation should select a default workspace.
SessionInfo if authentication was successful.
javax.jcr.LoginException - if authentication of the user fails.
javax.jcr.NoSuchWorkspaceException - if the specified workspaceName
is not recognized.
javax.jcr.RepositoryException - if an error occurs.
public SessionInfo obtain(SessionInfo sessionInfo,
java.lang.String workspaceName)
throws javax.jcr.LoginException,
javax.jcr.NoSuchWorkspaceException,
javax.jcr.RepositoryException
SessionInfo for the given workspace name that
will be used by other methods on the RepositoryService.
obtain in interface RepositoryServicesessionInfo - for another workspaceworkspaceName - the name of the workspace the new SessionInfo
should be built for. If the specified workspaceName is null
the implementation should select a default workspace.
SessionInfo if authentication was successful.
javax.jcr.LoginException - if authentication of the user fails.
javax.jcr.NoSuchWorkspaceException - if the specified workspaceName
is not recognized.
javax.jcr.RepositoryException - if an error occurs.
public SessionInfo impersonate(SessionInfo sessionInfo,
javax.jcr.Credentials credentials)
throws javax.jcr.LoginException,
javax.jcr.RepositoryException
SessionInfo that will be used by other methods
on the RepositoryService.
impersonate in interface RepositoryServiceSessionInfo if impersonate was successful.
javax.jcr.LoginException
javax.jcr.RepositoryExceptionSession.impersonate(javax.jcr.Credentials)
public void dispose(SessionInfo sessionInfo)
throws javax.jcr.RepositoryException
RepositoryService, that the given SessionInfo
will not be used any more.
dispose in interface RepositoryServicejavax.jcr.RepositoryException
public java.lang.String[] getWorkspaceNames(SessionInfo sessionInfo)
throws javax.jcr.RepositoryException
SessionInfo.
getWorkspaceNames in interface RepositoryServicejavax.jcr.RepositoryExceptionWorkspace.getAccessibleWorkspaceNames(),
Workspace.getName()
public boolean isGranted(SessionInfo sessionInfo,
ItemId itemId,
java.lang.String[] actions)
throws javax.jcr.RepositoryException
SessionInfo. False otherwise.
isGranted in interface RepositoryServiceSessionInfo has
the specified rights for the given item.
javax.jcr.RepositoryExceptionSession.checkPermission(String, String)
public QNodeDefinition getNodeDefinition(SessionInfo sessionInfo,
NodeId nodeId)
throws javax.jcr.RepositoryException
QNodeDefinition for the Node
identified by the given id. This method should only be used if the
caller is not able to unambiguously determine the applicable definition
from the parent node type definition or if no parent exists (i.e. for
the root).
getNodeDefinition in interface RepositoryServiceNode identified
by the given id.
javax.jcr.RepositoryException
public QPropertyDefinition getPropertyDefinition(SessionInfo sessionInfo,
PropertyId propertyId)
throws javax.jcr.RepositoryException
QPropertyDefinition for the Property
identified by the given id. This method should only be used if the
caller is not able to unambiguously determine the applicable definition
from the parent node type definition.
getPropertyDefinition in interface RepositoryServiceProperty
identified by the given id.
javax.jcr.RepositoryException
public NodeInfo getNodeInfo(SessionInfo sessionInfo,
NodeId nodeId)
throws javax.jcr.ItemNotFoundException,
javax.jcr.RepositoryException
NodeInfo for the node identified by the given
NodeId. See RepositoryService.getItemInfos(SessionInfo, NodeId) for
a similar method that in addition may return ItemInfos of
children Items.
getNodeInfo in interface RepositoryServiceNodeInfo for the node identified by the given id.
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryExceptionSession.getItem(String),
Node.getNode(String),
VersionHistory.getAllVersions(),
VersionHistory.getVersion(String),
VersionHistory.getVersionByLabel(String),
VersionHistory.getRootVersion(),
Node.getBaseVersion(),
Node.getVersionHistory(),
Version.getContainingHistory()
public java.util.Iterator getItemInfos(SessionInfo sessionInfo,
NodeId nodeId)
throws javax.jcr.ItemNotFoundException,
javax.jcr.RepositoryException
NodeInfo for the given NodeId as the first
element in the Iterator. In addition the iterator may contain
arbitrary ItemInfos.
getItemInfos in interface RepositoryServiceIterator of ItemInfos containing
at least a single element: the NodeInfo that represents
the Node identified by the given NodeId. If the Iterator
contains multiple elements, the first is expected to represent the Node
identified by the given NodeId.
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryExceptionSession.getItem(String),
Node.getNode(String),
VersionHistory.getAllVersions(),
VersionHistory.getVersion(String),
VersionHistory.getVersionByLabel(String),
VersionHistory.getRootVersion(),
Node.getBaseVersion(),
Node.getVersionHistory(),
Version.getContainingHistory()
public java.util.Iterator getChildInfos(SessionInfo sessionInfo,
NodeId parentId)
throws javax.jcr.ItemNotFoundException,
javax.jcr.RepositoryException
ChildInfos present on the
Node represented by the given parentId.
getChildInfos in interface RepositoryServiceChildInfos present on the
Node represented by the given parentId.
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
public PropertyInfo getPropertyInfo(SessionInfo sessionInfo,
PropertyId propertyId)
throws javax.jcr.ItemNotFoundException,
javax.jcr.RepositoryException
PropertyInfo for the Property
identified by the given id.
getPropertyInfo in interface RepositoryServicePropertyInfo for the Property
identified by the given id.
javax.jcr.ItemNotFoundException
javax.jcr.RepositoryExceptionSession.getItem(String),
Node.getProperty(String)
public Batch createBatch(SessionInfo sessionInfo,
ItemId itemId)
throws javax.jcr.RepositoryException
Batch must be executed at once or non must be executed upon
calling RepositoryService.submit(Batch).
createBatch in interface RepositoryServiceitemId - Id of the Item that is a common ancestor of all
Items affected upon batch execution. This Item
might itself be modified within the scope of the Batch.
RepositoryService.submit(Batch).
javax.jcr.RepositoryExceptionItem.save(),
Session.save(),
Batch
public void submit(Batch batch)
throws javax.jcr.PathNotFoundException,
javax.jcr.ItemNotFoundException,
javax.jcr.nodetype.NoSuchNodeTypeException,
javax.jcr.ValueFormatException,
javax.jcr.version.VersionException,
javax.jcr.lock.LockException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.AccessDeniedException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
Batch or discard all the previous modifications.
See RepositoryService.createBatch(SessionInfo,ItemId) for additional information
regarding batch creation.
submit in interface RepositoryServicejavax.jcr.PathNotFoundException
javax.jcr.ItemNotFoundException
javax.jcr.nodetype.NoSuchNodeTypeException
javax.jcr.ValueFormatException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.AccessDeniedException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryExceptionBatch
public void importXml(SessionInfo sessionInfo,
NodeId parentId,
java.io.InputStream xmlStream,
int uuidBehaviour)
throws javax.jcr.ItemExistsException,
javax.jcr.PathNotFoundException,
javax.jcr.version.VersionException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.lock.LockException,
javax.jcr.AccessDeniedException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
InputStream into the
persistent layer. Note, that the implemenation is responsible for
validating the data presented and for the integrity of the repository
upon completion.
importXml in interface RepositoryServicejavax.jcr.ItemExistsException
javax.jcr.PathNotFoundException
javax.jcr.version.VersionException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.lock.LockException
javax.jcr.AccessDeniedException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryExceptionWorkspace.importXML(String, java.io.InputStream, int)
public void move(SessionInfo sessionInfo,
NodeId srcNodeId,
NodeId destParentNodeId,
Name destName)
throws javax.jcr.ItemExistsException,
javax.jcr.PathNotFoundException,
javax.jcr.version.VersionException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.lock.LockException,
javax.jcr.AccessDeniedException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
srcNodeId (and its
entire subtree) to the new location defined by destParentNodeId
and a new name (destName).
move in interface RepositoryServicejavax.jcr.ItemExistsException
javax.jcr.PathNotFoundException
javax.jcr.version.VersionException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.lock.LockException
javax.jcr.AccessDeniedException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryExceptionWorkspace.move(String, String)
public void copy(SessionInfo sessionInfo,
java.lang.String srcWorkspaceName,
NodeId srcNodeId,
NodeId destParentNodeId,
Name destName)
throws javax.jcr.NoSuchWorkspaceException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.version.VersionException,
javax.jcr.AccessDeniedException,
javax.jcr.PathNotFoundException,
javax.jcr.ItemExistsException,
javax.jcr.lock.LockException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
srcNodeId
in workspace named srcWorkspaceName to the destination
in the workspace specified by the given SessionInfo. The
destination is composed by the given parent id and the new name
as indicated by destName.
Note, that srcWorkspaceName may be the same as the one
specified within the SessionInfo. In this case the copy
corresponds to a copy within a single workspace.
copy in interface RepositoryServicejavax.jcr.NoSuchWorkspaceException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.ItemExistsException
javax.jcr.lock.LockException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryExceptionWorkspace.copy(String, String),
Workspace.copy(String, String, String)
public void update(SessionInfo sessionInfo,
NodeId nodeId,
java.lang.String srcWorkspaceName)
throws javax.jcr.NoSuchWorkspaceException,
javax.jcr.AccessDeniedException,
javax.jcr.lock.LockException,
javax.jcr.InvalidItemStateException,
javax.jcr.RepositoryException
NodeId replacing
it (an the complete subtree) with a clone of its corresponding node
present in the workspace with the given srcWorkspaceName.
update in interface RepositoryServicejavax.jcr.NoSuchWorkspaceException
javax.jcr.AccessDeniedException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryExceptionNode.update(String)
public void clone(SessionInfo sessionInfo,
java.lang.String srcWorkspaceName,
NodeId srcNodeId,
NodeId destParentNodeId,
Name destName,
boolean removeExisting)
throws javax.jcr.NoSuchWorkspaceException,
javax.jcr.nodetype.ConstraintViolationException,
javax.jcr.version.VersionException,
javax.jcr.AccessDeniedException,
javax.jcr.PathNotFoundException,
javax.jcr.ItemExistsException,
javax.jcr.lock.LockException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
srcNodeId
in workspace named srcWorkspaceName to the destination
in the workspace specified by the given SessionInfo. The
destination is composed by the given parent id and the new name
as indicated by destName.
clone in interface RepositoryServicejavax.jcr.NoSuchWorkspaceException
javax.jcr.nodetype.ConstraintViolationException
javax.jcr.version.VersionException
javax.jcr.AccessDeniedException
javax.jcr.PathNotFoundException
javax.jcr.ItemExistsException
javax.jcr.lock.LockException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryExceptionWorkspace.clone(String, String, String, boolean)
public LockInfo getLockInfo(SessionInfo sessionInfo,
NodeId nodeId)
throws javax.jcr.RepositoryException
Node identified
by the given NodeId or null. If the implementation
does not support locking at all, this method always returns null.
getLockInfo in interface RepositoryServicenodeId or null if no lock applies to that Node.
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException - If some other error occurs.Node.getLock()
public LockInfo lock(SessionInfo sessionInfo,
NodeId nodeId,
boolean deep,
boolean sessionScoped)
throws javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.lock.LockException,
javax.jcr.AccessDeniedException,
javax.jcr.InvalidItemStateException,
javax.jcr.RepositoryException
Node identified by the given id.
lock in interface RepositoryServiceLockInfo associated with the new lock
that has been created.
javax.jcr.UnsupportedRepositoryOperationException - If this SPI
implementation does not support locking at all.
javax.jcr.lock.LockException - If the Node identified by the given
id cannot be locked due to an existing lock or due to missing mixin type.
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException - If another error occurs.
javax.jcr.InvalidItemStateExceptionNode.lock(boolean, boolean)
public void refreshLock(SessionInfo sessionInfo,
NodeId nodeId)
throws javax.jcr.lock.LockException,
javax.jcr.RepositoryException
refreshLock in interface RepositoryServicejavax.jcr.lock.LockException - If the Node identified by the given
id is not locked (any more) or if the SessionInfo does not
contain the token associated with the lock to be refreshed.
javax.jcr.UnsupportedRepositoryOperationException - If this SPI
implementation does not support locking at all.
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException - If another error occurs.Lock
public void unlock(SessionInfo sessionInfo,
NodeId nodeId)
throws javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.lock.LockException,
javax.jcr.AccessDeniedException,
javax.jcr.InvalidItemStateException,
javax.jcr.RepositoryException
Node identified by the given
NodeId.
Please note, that on logout all
session-scoped locks must be released by calling unlock.
unlock in interface RepositoryServicejavax.jcr.UnsupportedRepositoryOperationException - If this SPI
implementation does not support locking at all.
javax.jcr.lock.LockException - If the Node identified by the given
id is not locked or if the SessionInfo does not contain the
token associated with the lock to be released.
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException - If another error occurs.
javax.jcr.InvalidItemStateExceptionNode.unlock()
public NodeId checkin(SessionInfo sessionInfo,
NodeId nodeId)
throws javax.jcr.version.VersionException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.InvalidItemStateException,
javax.jcr.lock.LockException,
javax.jcr.RepositoryException
Node identified by the given
NodeId.
checkin in interface RepositoryServiceNodeId of newly created version
javax.jcr.version.VersionException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.InvalidItemStateException
javax.jcr.lock.LockException
javax.jcr.RepositoryExceptionNode.checkin()
public void checkout(SessionInfo sessionInfo,
NodeId nodeId)
throws javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.lock.LockException,
javax.jcr.RepositoryException
Node identified by the given
NodeId.
checkout in interface RepositoryServicejavax.jcr.UnsupportedRepositoryOperationException
javax.jcr.lock.LockException
javax.jcr.RepositoryExceptionNode.checkout()
public void removeVersion(SessionInfo sessionInfo,
NodeId versionHistoryId,
NodeId versionId)
throws javax.jcr.ReferentialIntegrityException,
javax.jcr.AccessDeniedException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.version.VersionException,
javax.jcr.RepositoryException
versionId.
removeVersion in interface RepositoryServiceversionHistoryId - NodeId identifying the version
history the version identified by versionId belongs to.
javax.jcr.ReferentialIntegrityException
javax.jcr.AccessDeniedException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.RepositoryExceptionVersionHistory.removeVersion(String)
public void restore(SessionInfo sessionInfo,
NodeId nodeId,
NodeId versionId,
boolean removeExisting)
throws javax.jcr.version.VersionException,
javax.jcr.PathNotFoundException,
javax.jcr.ItemExistsException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.lock.LockException,
javax.jcr.InvalidItemStateException,
javax.jcr.RepositoryException
nodeId to the state defined
by the version with the specified versionId.
restore in interface RepositoryServiceremoveExisting - boolean flag indicating how to deal with an
identifier collision that may occur if a node exists outside the subtree
to be restored with the same identified as a node that would be
introduces by the restore. If the removeExisting is
true the restored node takes precedence and the
existing node is removed. Otherwise the restore failes.
javax.jcr.version.VersionException
javax.jcr.PathNotFoundException
javax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryExceptionNode.restore(String, boolean),
Node.restore(javax.jcr.version.Version, boolean),
Node.restore(javax.jcr.version.Version, String, boolean),
Node.restoreByLabel(String, boolean)
public void restore(SessionInfo sessionInfo,
NodeId[] versionIds,
boolean removeExisting)
throws javax.jcr.ItemExistsException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.version.VersionException,
javax.jcr.lock.LockException,
javax.jcr.InvalidItemStateException,
javax.jcr.RepositoryException
NodeIds.
restore in interface RepositoryServiceremoveExisting - boolean flag indicating how to deal with an
identifier collision that may occur if a node exists outside the subtrees
to be restored with the same identified as any node that would be
introduces by the restore. If the removeExisting is
true the node to be restored takes precedence and the
existing node is removed. Otherwise the restore failes.
javax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryExceptionWorkspace.restore(javax.jcr.version.Version[], boolean)
public java.util.Iterator merge(SessionInfo sessionInfo,
NodeId nodeId,
java.lang.String srcWorkspaceName,
boolean bestEffort)
throws javax.jcr.NoSuchWorkspaceException,
javax.jcr.AccessDeniedException,
javax.jcr.MergeException,
javax.jcr.lock.LockException,
javax.jcr.InvalidItemStateException,
javax.jcr.RepositoryException
NodeId and its subtree
with the corresponding node present in the workspace with the name of
srcWorkspaceName.
merge in interface RepositoryServiceIterator over the NodeIds of all nodes that
received a merge result of "fail" in the course of this operation.
javax.jcr.NoSuchWorkspaceException
javax.jcr.AccessDeniedException
javax.jcr.MergeException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryExceptionNode.merge(String, boolean)
public void resolveMergeConflict(SessionInfo sessionInfo,
NodeId nodeId,
NodeId[] mergeFailedIds,
NodeId[] predecessorIds)
throws javax.jcr.version.VersionException,
javax.jcr.InvalidItemStateException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
NodeId.
resolveMergeConflict in interface RepositoryServicemergeFailedIds - The NodeIds remaining in the jcr:mergeFailed
REFERENCE property. The version id(s) to be resolved were removed from the
array and added to the predecessor ids in case of Node.doneMerge(Version).
In case of a Node.cancelMerge(Version) the version id only gets
removed from the list.predecessorIds - The complete set of predecessor id including those
that have been added in order to resolve a merge conflict.
javax.jcr.version.VersionException
javax.jcr.InvalidItemStateException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryExceptionNode.cancelMerge(javax.jcr.version.Version),
Node.doneMerge(javax.jcr.version.Version)
public void addVersionLabel(SessionInfo sessionInfo,
NodeId versionHistoryId,
NodeId versionId,
Name label,
boolean moveLabel)
throws javax.jcr.version.VersionException,
javax.jcr.RepositoryException
addVersionLabel in interface RepositoryServiceversionHistoryId - NodeId identifying the version
history the version identified by versionId belongs to.versionId - NodeId identifying the version the
label belongs to.label - The label to be added.moveLabel - If the label is already assigned to a version within
the same version history this parameter has the following effect: If true
the label already present gets moved to be now be a label of the version
indicated by versionId. If false this method
fails and the label remains with the original version.
javax.jcr.version.VersionException
javax.jcr.RepositoryExceptionVersionHistory.addVersionLabel(String, String, boolean)
public void removeVersionLabel(SessionInfo sessionInfo,
NodeId versionHistoryId,
NodeId versionId,
Name label)
throws javax.jcr.version.VersionException,
javax.jcr.RepositoryException
removeVersionLabel in interface RepositoryServiceversionHistoryId - NodeId identifying the version
history the version identified by versionId belongs to.versionId - NodeId identifying the version the
label belongs to.label - The label to be removed.
javax.jcr.version.VersionException
javax.jcr.RepositoryExceptionVersionHistory.removeVersionLabel(String)
public java.lang.String[] getSupportedQueryLanguages(SessionInfo sessionInfo)
throws javax.jcr.RepositoryException
getSupportedQueryLanguages in interface RepositoryServicejavax.jcr.RepositoryExceptionQueryManager.getSupportedQueryLanguages()
public void checkQueryStatement(SessionInfo sessionInfo,
java.lang.String statement,
java.lang.String language,
java.util.Map namespaces)
throws javax.jcr.query.InvalidQueryException,
javax.jcr.RepositoryException
statement is valid according to the
specified query language.
checkQueryStatement in interface RepositoryServicesessionInfo - the session info.statement - the query statement to check.language - the query language.namespaces - the locally re-mapped namespace which may be used in
the query statement.
javax.jcr.query.InvalidQueryException - if the query statement is invalid or the
language is not supported.
javax.jcr.RepositoryException - if an error occurs while checking the
statement.QueryManager.createQuery(String, String)
public QueryInfo executeQuery(SessionInfo sessionInfo,
java.lang.String statement,
java.lang.String language,
java.util.Map namespaces)
throws javax.jcr.RepositoryException
namespaces parameter provides a mapping of prefix
to namespace uri in order to be able to properly resolve prefix:localname
patterns present within the query statement.
executeQuery in interface RepositoryServicestatement - the query statement to be execute.language - the query language used to parse the query statement.namespaces - the locally re-mapped namespace which may be used in
the query statement.
javax.jcr.RepositoryExceptionQuery.execute()
public EventFilter createEventFilter(SessionInfo sessionInfo,
int eventTypes,
Path absPath,
boolean isDeep,
java.lang.String[] uuid,
Name[] nodeTypeName,
boolean noLocal)
throws javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
ObservationManager.addEventListener(javax.jcr.observation.EventListener, int, java.lang.String, boolean, java.lang.String[], java.lang.String[], boolean).
Note, that an SPI implementation may support observation even if
the corresponding repository descriptor
does not return 'true'.
createEventFilter in interface RepositoryServicesessionInfo - the session info which requests an event filter.eventTypes - A combination of one or more event type constants
encoded as a bitmask.absPath - An absolute path.isDeep - A boolean.uuid - Array of jcr:uuid properties.nodeTypeName - Array of node type names.noLocal - A boolean.
javax.jcr.UnsupportedRepositoryOperationException - if this SPI implementation
does not allow to create event filters.
javax.jcr.RepositoryException - if an error occurs while creating the
EventFilter.ObservationManager.addEventListener(javax.jcr.observation.EventListener, int, String, boolean, String[], String[], boolean)
public Subscription createSubscription(SessionInfo sessionInfo,
EventFilter[] filters)
throws javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
Subscription for events with an initial set of
EventFilters. The returned subscription must provide events from
the time when the subscription was created. If an empty array of filters
is passed no events will be available through the created subscription
unless the filters are later updated by calling
RepositoryService.updateEventFilters(Subscription, EventFilter[]).
createSubscription in interface RepositoryServicesessionInfo - the session info.filters - the initial event filters for the subscription.
javax.jcr.UnsupportedRepositoryOperationException - if this SPI implementation does not support
observation.
javax.jcr.RepositoryException - if an error occurs while creating the
Subscription.
public EventBundle[] getEvents(Subscription subscription,
long timeout)
throws javax.jcr.RepositoryException,
javax.jcr.UnsupportedRepositoryOperationException,
java.lang.InterruptedException
repository descriptor does return 'false'.
An implementation should un-block a calling thread and let it return if
the associated subscription is disposed by another thread.
getEvents in interface RepositoryServicesubscription - a subscription.timeout - a timeout in milliseconds to wait at most for an
event bundle. If timeout is up and no
event occurred meanwhile an empty array is returned.
EventBundles representing the events
that occurred.
javax.jcr.RepositoryException - if an error occurs while retrieving the
event bundles.
java.lang.InterruptedException - if the calling thread is interrupted while
waiting for events within the specified
timeout.
javax.jcr.UnsupportedRepositoryOperationException
public void updateEventFilters(Subscription subscription,
EventFilter[] filters)
throws javax.jcr.RepositoryException
filters.
An implementation is required to accept at least event filter instances
created by RepositoryService.createEventFilter(org.apache.jackrabbit.spi.SessionInfo, int, org.apache.jackrabbit.spi.Path, boolean, java.lang.String[], org.apache.jackrabbit.spi.Name[], boolean). Optionally an
implementation may also support event filters instanciated by the client
itself. An implementation may require special deployment in that case,
e.g. to make the event filter implementation class available to the
repository server.
Note on thread-safety: it is permissible to call this methods
while another thread is blocked in calling RepositoryService.getEvents(Subscription, long) using the same
subscription instance as a parameter.
updateEventFilters in interface RepositoryServicesubscription - the subscription where the event filters are
applied.filters - the filters that are applied to the events as they
occurred on the repository. An event is included in an
event bundle if it is accepted by at least one of the supplied
filters. If an empty array is passed none of the potential
events are include in an event bundle. This allows a
client to skip or ignore events for a certain period of
time.
javax.jcr.RepositoryException - if an error occurs while updating the event
filters.
public void dispose(Subscription subscription)
throws javax.jcr.RepositoryException
RepositoryService.getEvents(Subscription, long) using the same
subscription instance as a parameter.
dispose in interface RepositoryServicejavax.jcr.RepositoryException - if an error occurs while the subscription is
disposed.
public java.util.Map getRegisteredNamespaces(SessionInfo sessionInfo)
throws javax.jcr.RepositoryException
getRegisteredNamespaces in interface RepositoryServicejavax.jcr.RepositoryExceptionWorkspace.getNamespaceRegistry(),
NamespaceRegistry.getPrefixes(),
NamespaceRegistry.getURIs()
public java.lang.String getNamespaceURI(SessionInfo sessionInfo,
java.lang.String prefix)
throws javax.jcr.NamespaceException,
javax.jcr.RepositoryException
prefix.
getNamespaceURI in interface RepositoryServicesessionInfo - the session info.prefix - a namespace prefix to resolve.
prefix.
javax.jcr.NamespaceException - if prefix is not mapped to a namespace URI.
javax.jcr.RepositoryException - if another error occurs.NamespaceRegistry.getURI(String)
public java.lang.String getNamespacePrefix(SessionInfo sessionInfo,
java.lang.String uri)
throws javax.jcr.NamespaceException,
javax.jcr.RepositoryException
uri.
getNamespacePrefix in interface RepositoryServicesessionInfo - the session info.uri - the namespace URI.
javax.jcr.NamespaceException - if the URI unknown.
javax.jcr.RepositoryException - if another error occurs.NamespaceRegistry.getPrefix(String)
public void registerNamespace(SessionInfo sessionInfo,
java.lang.String prefix,
java.lang.String uri)
throws javax.jcr.NamespaceException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
registerNamespace in interface RepositoryServiceprefix - Prefix of the namespace to be registered.uri - Namespace URI to be registered.
javax.jcr.NamespaceException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryExceptionNamespaceRegistry.registerNamespace(String, String)
public void unregisterNamespace(SessionInfo sessionInfo,
java.lang.String uri)
throws javax.jcr.NamespaceException,
javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.AccessDeniedException,
javax.jcr.RepositoryException
unregisterNamespace in interface RepositoryServiceuri - Namespace URI to be unregistered.
javax.jcr.NamespaceException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryExceptionNamespaceRegistry.unregisterNamespace(String)
public java.util.Iterator getQNodeTypeDefinitions(SessionInfo sessionInfo)
throws javax.jcr.RepositoryException
QNodeTypeDefinitions of all registered nodetypes.
getQNodeTypeDefinitions in interface RepositoryServiceQNodeTypeDefinitions.
javax.jcr.RepositoryExceptionWorkspace.getNodeTypeManager(),
NodeTypeManager.getAllNodeTypes(),
NodeTypeManager.getMixinNodeTypes(),
NodeTypeManager.getPrimaryNodeTypes(),
NodeTypeManager.getNodeType(String)
public java.util.Iterator getQNodeTypeDefinitions(SessionInfo sessionInfo,
Name[] nodetypeNames)
throws javax.jcr.RepositoryException
QNodeTypeDefinitions for the given names. The
implementation is free to return additional definitions which will (probably)
be needed by the caller due to node type inheritance. The caller must be
able to deal with any kind of additional QNodeTypeDefinitions
present in the Iterator irrespective whether they have been
loaded before or not.
getQNodeTypeDefinitions in interface RepositoryServicenodetypeNames - names of node types to retrieve
QNodeTypeDefinition
javax.jcr.nodetype.NoSuchNodeTypeException - if for any of the given
names no QNodeTypeDefinition exists.
javax.jcr.RepositoryExceptionWorkspace.getNodeTypeManager(),
NodeTypeManager.getAllNodeTypes(),
NodeTypeManager.getMixinNodeTypes(),
NodeTypeManager.getPrimaryNodeTypes(),
NodeTypeManager.getNodeType(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||