public interface RepositoryService
RepositoryService
interface defines methods used to
retrieve information from the persistent layer of the repository as well
as the methods that modify its persistent state.
The implementation of this interface is intended to hold only the state of
the persistent layer, no session-related state should be held. Consequently,
each method that alters persistent state always includes all the information
necessary to fully specify and authorize a change.
For example, consider the method
void RepositoryService.copy(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, Name destName)This method performs an immediate persistent copy of the node identified by srcNodeId and that node's subtree to a position as child of the node identified by destParentNodeId and assigns the newly copied node the name destName.
SessionInfo
object provides user and workspace identification
as well as eventual lock tokens required to execute the copy.srcWorkspaceName
differs from the workspace name present with
the SessionInfo, the copy is corresponds to a copy across workspaces.
The source and destination of the copy operation are specified by
NodeId
s. The Name
holds the new name. Taken together,
this information is sufficient to completely specify and authorize the copy
operations.
The RepositoryService in addition allows to create and submit Batch
objects, that cover lists of operations that have to be applied to the
persistent layer at once.
Modifier and Type | Method and Description |
---|---|
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 |
checkout(SessionInfo sessionInfo,
NodeId nodeId,
NodeId activityId)
Performs a checkout for the
Node identified by the given
NodeId and for activity identified by the specified
activityId . |
NodeId |
checkpoint(SessionInfo sessionInfo,
NodeId nodeId)
Performs a checkpoint for the
Node identified by the given
NodeId . |
NodeId |
checkpoint(SessionInfo sessionInfo,
NodeId nodeId,
NodeId activityId)
Performs a checkpoint for the
Node identified by the given
NodeId . |
java.lang.String[] |
checkQueryStatement(SessionInfo sessionInfo,
java.lang.String statement,
java.lang.String language,
java.util.Map<java.lang.String,java.lang.String> namespaces)
Checks if the query
statement is valid according to the
specified query language and returns the bind variable
names found in the query statement. |
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 . |
NodeId |
createActivity(SessionInfo sessionInfo,
java.lang.String title)
Create a new activity.
|
Batch |
createBatch(SessionInfo sessionInfo,
ItemId itemId)
Indicates the start of a set of operations that cause modifications
on the underlying persistence layer.
|
NodeId |
createConfiguration(SessionInfo sessionInfo,
NodeId nodeId) |
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
EventFilter s. |
Tree |
createTree(SessionInfo sessionInfo,
Batch batch,
Name nodeName,
Name primaryTypeName,
java.lang.String uniqueId)
Creates a new
Tree that can be populated and later on be applied
to the specified Batch by calling #setTree . |
void |
createWorkspace(SessionInfo sessionInfo,
java.lang.String name,
java.lang.String srcWorkspaceName)
Create a new workspace with the specified
name . |
void |
deleteWorkspace(SessionInfo sessionInfo,
java.lang.String name)
Deletes the workspace with the specified
name . |
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<java.lang.String,java.lang.String> namespaces,
long limit,
long offset,
java.util.Map<java.lang.String,QValue> values)
Execute the given query statement with the specified query language.
|
java.util.Iterator<ChildInfo> |
getChildInfos(SessionInfo sessionInfo,
NodeId parentId)
Returns an Iterator of
ChildInfo s present on the
Node represented by the given parentId. |
EventBundle |
getEvents(SessionInfo sessionInfo,
EventFilter filter,
long after)
Returns events from the
EventJournal after a given point in
time. |
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 . |
ItemInfoCache |
getItemInfoCache(SessionInfo sessionInfo)
Returns a
ItemInfoCache for the given SessionInfo . |
java.util.Iterator<? extends ItemInfo> |
getItemInfos(SessionInfo sessionInfo,
ItemId itemId)
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)
Deprecated.
|
PathFactory |
getPathFactory()
Return the
PathFactory . |
PrivilegeDefinition[] |
getPrivilegeDefinitions(SessionInfo sessionInfo)
TODO
|
Name[] |
getPrivilegeNames(SessionInfo sessionInfo,
NodeId id)
TODO
|
QPropertyDefinition |
getPropertyDefinition(SessionInfo sessionInfo,
PropertyId propertyId)
Returns the
QPropertyDefinition for the Property
identified by the given id. |
PropertyInfo |
getPropertyInfo(SessionInfo sessionInfo,
PropertyId propertyId)
Deprecated.
|
java.util.Iterator<QNodeTypeDefinition> |
getQNodeTypeDefinitions(SessionInfo sessionInfo)
Retrieve the
QNodeTypeDefinition s of all registered nodetypes. |
java.util.Iterator<QNodeTypeDefinition> |
getQNodeTypeDefinitions(SessionInfo sessionInfo,
Name[] nodetypeNames)
Retrieve
QNodeTypeDefinition s for the given names. |
QValueFactory |
getQValueFactory()
Return the
QValueFactory defined with this SPI implementation. |
java.util.Iterator<PropertyId> |
getReferences(SessionInfo sessionInfo,
NodeId nodeId,
Name propertyName,
boolean weakReferences)
Returns the
Id s of the properties that are referencing
the node identified by the given nodeId . |
java.util.Map<java.lang.String,java.lang.String> |
getRegisteredNamespaces(SessionInfo sessionInfo)
Retrieve all registered namespaces.
|
java.util.Map<java.lang.String,QValue[]> |
getRepositoryDescriptors()
Returns all property descriptors that can be exposed with the
Repository implementation built on top of
this RepositoryService . |
PrivilegeDefinition[] |
getSupportedPrivileges(SessionInfo sessionInfo,
NodeId nodeId)
TODO
|
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,
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. |
LockInfo |
lock(SessionInfo sessionInfo,
NodeId nodeId,
boolean deep,
boolean sessionScoped,
long timeoutHint,
java.lang.String ownerHint)
Create a lock on the
Node identified by the given id. |
java.util.Iterator<NodeId> |
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 . |
java.util.Iterator<NodeId> |
merge(SessionInfo sessionInfo,
NodeId nodeId,
java.lang.String srcWorkspaceName,
boolean bestEffort,
boolean isShallow)
Merge the node identified by the given
NodeId and its subtree
with the corresponding node present in the workspace with the name of
srcWorkspaceName . |
java.util.Iterator<NodeId> |
mergeActivity(SessionInfo sessionInfo,
NodeId activityId)
Merges the activity identified by the given
activityId into
the workspace the specified sessionInfo has been created for. |
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(Credentials credentials,
java.lang.String workspaceName)
Returns a
SessionInfo 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 |
registerNodeTypes(SessionInfo sessionInfo,
QNodeTypeDefinition[] nodeTypeDefinitions,
boolean allowUpdate)
Registers the node types with the specified
QNodeTypeDefinition s. |
void |
removeActivity(SessionInfo sessionInfo,
NodeId activityId)
Removes the activity identified by the specified
activityId . |
void |
removeVersion(SessionInfo sessionInfo,
NodeId versionHistoryId,
NodeId versionId)
Remove the version identified 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 . |
void |
unregisterNamespace(SessionInfo sessionInfo,
java.lang.String uri)
Unregister the namespace identified by the given uri
|
void |
unregisterNodeTypes(SessionInfo sessionInfo,
Name[] nodeTypeNames)
Unregisters the node types with the specified
names . |
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.
|
IdFactory getIdFactory() throws RepositoryException
IdFactory
.IdFactory
.RepositoryException
- If an error occurs.NameFactory getNameFactory() throws RepositoryException
NameFactory
.NameFactory
.RepositoryException
- If an error occurs.PathFactory getPathFactory() throws RepositoryException
PathFactory
.PathFactory
.RepositoryException
- If an error occurs.QValueFactory getQValueFactory() throws RepositoryException
QValueFactory
defined with this SPI implementation.QValueFactory
.RepositoryException
- If an error occurs.ItemInfoCache getItemInfoCache(SessionInfo sessionInfo) throws RepositoryException
ItemInfoCache
for the given SessionInfo
.sessionInfo
- RepositoryException
java.util.Map<java.lang.String,QValue[]> getRepositoryDescriptors() throws RepositoryException
Repository
implementation built on top of
this RepositoryService
.javax.jcr.RepositoryException
RepositoryException
javax.jcr.Repository#getDescriptorKeys()
,
javax.jcr.Repository#getDescriptor(String)
SessionInfo obtain(Credentials credentials, java.lang.String workspaceName) throws LoginException, NoSuchWorkspaceException, RepositoryException
SessionInfo
that will be used by other methods
on the RepositoryService
.
An implementation may choose to authenticate the user using the supplied
credentials
.credentials
- 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.LoginException
- if authentication of the user fails.NoSuchWorkspaceException
- if the specified workspaceName
is not recognized.RepositoryException
- if an error occurs.SessionInfo impersonate(SessionInfo sessionInfo, Credentials credentials) throws LoginException, RepositoryException
SessionInfo
that will be used by other methods
on the RepositoryService
.sessionInfo
- credentials
- SessionInfo
if impersonate was successful.LoginException
RepositoryException
javax.jcr.Session#impersonate(javax.jcr.Credentials)
void dispose(SessionInfo sessionInfo) throws RepositoryException
RepositoryService
, that the given SessionInfo
will not be used any more.sessionInfo
- javax.jcr.RepositoryException
RepositoryException
java.lang.String[] getWorkspaceNames(SessionInfo sessionInfo) throws RepositoryException
SessionInfo
.sessionInfo
- javax.jcr.RepositoryException
RepositoryException
javax.jcr.Workspace#getAccessibleWorkspaceNames()
,
javax.jcr.Workspace#getName()
boolean isGranted(SessionInfo sessionInfo, ItemId itemId, java.lang.String[] actions) throws RepositoryException
SessionInfo
. False otherwise.sessionInfo
- itemId
- actions
- SessionInfo
has
the specified rights for the given item.javax.jcr.RepositoryException
RepositoryException
javax.jcr.Session#checkPermission(String, String)
,
javax.jcr.Session#hasPermission(String, String)
PrivilegeDefinition[] getPrivilegeDefinitions(SessionInfo sessionInfo) throws RepositoryException
sessionInfo
- RepositoryException
Name[] getPrivilegeNames(SessionInfo sessionInfo, NodeId id) throws RepositoryException
sessionInfo
- id
- RepositoryException
PrivilegeDefinition[] getSupportedPrivileges(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException
sessionInfo
- nodeId
- RepositoryException
QNodeDefinition getNodeDefinition(SessionInfo sessionInfo, NodeId nodeId) throws 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).sessionInfo
- nodeId
- Node
identified
by the given id.javax.jcr.RepositoryException
RepositoryException
QPropertyDefinition getPropertyDefinition(SessionInfo sessionInfo, PropertyId propertyId) throws 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.sessionInfo
- propertyId
- Property
identified by the given id.javax.jcr.RepositoryException
RepositoryException
NodeInfo getNodeInfo(SessionInfo sessionInfo, NodeId nodeId) throws ItemNotFoundException, RepositoryException
getItemInfos(SessionInfo, ItemId)
NodeInfo
for the node identified by the given
NodeId
. See getItemInfos(SessionInfo, ItemId)
for
a similar method that in addition may return ItemInfo
s of
children Item
s.sessionInfo
- nodeId
- NodeInfo
for the node identified by the given id.javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
ItemNotFoundException
RepositoryException
javax.jcr.Session#getItem(String)
,
javax.jcr.Node#getNode(String)
,
javax.jcr.version.VersionHistory#getAllVersions()
,
javax.jcr.version.VersionHistory#getVersion(String)
,
javax.jcr.version.VersionHistory#getVersionByLabel(String)
,
javax.jcr.version.VersionHistory#getRootVersion()
,
javax.jcr.Node#getBaseVersion()
,
javax.jcr.Node#getVersionHistory()
,
javax.jcr.version.Version#getContainingHistory()
java.util.Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, ItemId itemId) throws ItemNotFoundException, RepositoryException
ItemInfo
for the given ItemId
as the first
element in the Iterator
. In addition the iterator may contain
arbitrary ItemInfo
s.sessionInfo
- itemId
- Iterator
of ItemInfo
s containing
at least a single element: the ItemInfo
that represents
the Item identified by the given ItemId
. If the Iterator
contains multiple elements, the first is expected to represent the Item
identified by the given ItemId
.javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
ItemNotFoundException
RepositoryException
javax.jcr.Session#getItem(String)
,
javax.jcr.Node#getNode(String)
,
javax.jcr.version.VersionHistory#getAllVersions()
,
javax.jcr.version.VersionHistory#getVersion(String)
,
javax.jcr.version.VersionHistory#getVersionByLabel(String)
,
javax.jcr.version.VersionHistory#getRootVersion()
,
javax.jcr.Node#getBaseVersion()
,
javax.jcr.Node#getVersionHistory()
,
javax.jcr.version.Version#getContainingHistory()
java.util.Iterator<ChildInfo> getChildInfos(SessionInfo sessionInfo, NodeId parentId) throws ItemNotFoundException, RepositoryException
ChildInfo
s present on the
Node represented by the given parentId.sessionInfo
- parentId
- ChildInfo
s present on the
Node represented by the given parentId.ItemNotFoundException
RepositoryException
java.util.Iterator<PropertyId> getReferences(SessionInfo sessionInfo, NodeId nodeId, Name propertyName, boolean weakReferences) throws ItemNotFoundException, RepositoryException
Id
s of the properties that are referencing
the node identified by the given nodeId
. If
weakReferences
is true
the ids of
WEAKREFERENCE
properties are
returned, otherwise the property must be of type REFERENCE
.sessionInfo
- nodeId
- propertyName
- name filter of referring properties to be returned;
if null
then all references are returned.weakReferences
- If true
the properties must be of type
javax.jcr.PropertyType#WEAKREFERENCE
, otherwise of type
javax.jcr.PropertyType#REFERENCE
.Id
s of the properties that are
referencing the node identified by the given nodeId
or an
empty iterator if the node is not referenceable or no references exist.ItemNotFoundException
RepositoryException
PropertyInfo.getId()
PropertyInfo getPropertyInfo(SessionInfo sessionInfo, PropertyId propertyId) throws ItemNotFoundException, RepositoryException
getItemInfos(SessionInfo, ItemId)
PropertyInfo
for the Property
identified by the given id.sessionInfo
- propertyId
- PropertyInfo
for the Property
identified by the given id.javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
ItemNotFoundException
RepositoryException
javax.jcr.Session#getItem(String)
,
javax.jcr.Node#getProperty(String)
Batch createBatch(SessionInfo sessionInfo, ItemId itemId) throws RepositoryException
Batch
must be executed at once or non must be executed upon
calling submit(Batch)
.sessionInfo
- itemId
- Id of the Item that is a common ancestor of all
Item
s affected upon batch execution. This Item
might itself be modified within the scope of the Batch
.submit(Batch)
.RepositoryException
javax.jcr.Item#save()
,
javax.jcr.Session#save()
,
Batch
void submit(Batch batch) throws PathNotFoundException, ItemNotFoundException, NoSuchNodeTypeException, ValueFormatException, VersionException, LockException, ConstraintViolationException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException
Batch
or discard all the previous modifications.
See createBatch(SessionInfo,ItemId)
for additional information
regarding batch creation.batch
- PathNotFoundException
ItemNotFoundException
NoSuchNodeTypeException
ValueFormatException
VersionException
LockException
ConstraintViolationException
AccessDeniedException
UnsupportedRepositoryOperationException
RepositoryException
Batch
Tree createTree(SessionInfo sessionInfo, Batch batch, Name nodeName, Name primaryTypeName, java.lang.String uniqueId) throws RepositoryException
Tree
that can be populated and later on be applied
to the specified Batch
by calling #setTree
.nodeName
- primaryTypeName
- uniqueId
- Tree
instance.RepositoryException
void importXml(SessionInfo sessionInfo, NodeId parentId, java.io.InputStream xmlStream, int uuidBehaviour) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException
InputStream
into the
persistent layer. Note, that the implementation is responsible for
validating the data presented and for the integrity of the repository
upon completion.sessionInfo
- parentId
- xmlStream
- uuidBehaviour
- ItemExistsException
PathNotFoundException
VersionException
ConstraintViolationException
LockException
AccessDeniedException
UnsupportedRepositoryOperationException
RepositoryException
javax.jcr.Workspace#importXML(String, java.io.InputStream, int)
void move(SessionInfo sessionInfo, NodeId srcNodeId, NodeId destParentNodeId, Name destName) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, AccessDeniedException, UnsupportedRepositoryOperationException, RepositoryException
srcNodeId
(and its
entire subtree) to the new location defined by destParentNodeId
and a new name (destName
).sessionInfo
- srcNodeId
- destParentNodeId
- destName
- 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
ItemExistsException
PathNotFoundException
VersionException
ConstraintViolationException
LockException
AccessDeniedException
UnsupportedRepositoryOperationException
RepositoryException
javax.jcr.Workspace#move(String, String)
void copy(SessionInfo sessionInfo, java.lang.String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, Name destName) throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, UnsupportedRepositoryOperationException, 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.
sessionInfo
- srcWorkspaceName
- srcNodeId
- destParentNodeId
- destName
- 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
NoSuchWorkspaceException
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
UnsupportedRepositoryOperationException
RepositoryException
javax.jcr.Workspace#copy(String, String)
,
javax.jcr.Workspace#copy(String, String, String)
void update(SessionInfo sessionInfo, NodeId nodeId, java.lang.String srcWorkspaceName) throws NoSuchWorkspaceException, AccessDeniedException, LockException, InvalidItemStateException, RepositoryException
NodeId
replacing
it (an the complete subtree) with a clone of its corresponding node
present in the workspace with the given srcWorkspaceName
.sessionInfo
- nodeId
- srcWorkspaceName
- javax.jcr.NoSuchWorkspaceException
javax.jcr.AccessDeniedException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
NoSuchWorkspaceException
AccessDeniedException
LockException
InvalidItemStateException
RepositoryException
javax.jcr.Node#update(String)
void clone(SessionInfo sessionInfo, java.lang.String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, Name destName, boolean removeExisting) throws NoSuchWorkspaceException, ConstraintViolationException, VersionException, AccessDeniedException, PathNotFoundException, ItemExistsException, LockException, UnsupportedRepositoryOperationException, 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
.sessionInfo
- srcWorkspaceName
- srcNodeId
- destParentNodeId
- destName
- removeExisting
- 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
NoSuchWorkspaceException
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
UnsupportedRepositoryOperationException
RepositoryException
javax.jcr.Workspace#clone(String, String, String, boolean)
LockInfo getLockInfo(SessionInfo sessionInfo, NodeId nodeId) throws AccessDeniedException, RepositoryException
Node
identified
by the given NodeId
or null
. If the implementation
does not support locking at all, this method always returns null
.sessionInfo
- nodeId
- nodeId
or null
if no lock applies to that Node.javax.jcr.AccessDeniedException
javax.jcr.RepositoryException
- If some other error occurs.AccessDeniedException
RepositoryException
Node#getLock()
LockInfo lock(SessionInfo sessionInfo, NodeId nodeId, boolean deep, boolean sessionScoped) throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException
Node
identified by the given id.sessionInfo
- nodeId
- deep
- sessionScoped
- LockInfo
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.UnsupportedRepositoryOperationException
LockException
AccessDeniedException
RepositoryException
javax.jcr.Node#lock(boolean, boolean)
LockInfo lock(SessionInfo sessionInfo, NodeId nodeId, boolean deep, boolean sessionScoped, long timeoutHint, java.lang.String ownerHint) throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException
Node
identified by the given id.sessionInfo
- nodeId
- deep
- sessionScoped
- timeoutHint
- long indicating the desired lock timeout in seconds.
The implementation is free to ignore the hint.ownerHint
- String indicating the desired lockOwner info. The
implementation is free to ignore the hint.LockInfo
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.UnsupportedRepositoryOperationException
LockException
AccessDeniedException
RepositoryException
javax.jcr.lock.LockManager#lock(String, boolean, boolean, long, String)
void refreshLock(SessionInfo sessionInfo, NodeId nodeId) throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException
sessionInfo
- nodeId
- 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 is not locked (any more) or if the SessionInfo
does not
contain the token associated with the lock to be refreshed.javax.jcr.AccessDeniedException
javax.jcr.RepositoryException
- If another error occurs.UnsupportedRepositoryOperationException
LockException
AccessDeniedException
RepositoryException
javax.jcr.lock.Lock
void unlock(SessionInfo sessionInfo, NodeId nodeId) throws UnsupportedRepositoryOperationException, LockException, AccessDeniedException, RepositoryException
Node
identified by the given
NodeId
.
Please note, that on logout
all
session-scoped locks must be released by calling unlock.
sessionInfo
- nodeId
- 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 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.UnsupportedRepositoryOperationException
LockException
AccessDeniedException
RepositoryException
javax.jcr.Node#unlock()
NodeId checkin(SessionInfo sessionInfo, NodeId nodeId) throws VersionException, UnsupportedRepositoryOperationException, InvalidItemStateException, LockException, RepositoryException
Node
identified by the given
NodeId
.sessionInfo
- nodeId
- NodeId
of newly created versionjavax.jcr.version.VersionException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.InvalidItemStateException
javax.jcr.lock.LockException
javax.jcr.RepositoryException
VersionException
UnsupportedRepositoryOperationException
InvalidItemStateException
LockException
RepositoryException
javax.jcr.Node#checkin()
void checkout(SessionInfo sessionInfo, NodeId nodeId) throws UnsupportedRepositoryOperationException, LockException, RepositoryException
Node
identified by the given
NodeId
. Same as checkout(SessionInfo, NodeId, NodeId)
where the activityId
is null
.sessionInfo
- nodeId
- javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.lock.LockException
javax.jcr.RepositoryException
UnsupportedRepositoryOperationException
LockException
RepositoryException
javax.jcr.Node#checkout()
void checkout(SessionInfo sessionInfo, NodeId nodeId, NodeId activityId) throws UnsupportedRepositoryOperationException, LockException, RepositoryException
Node
identified by the given
NodeId
and for activity identified by the specified
activityId
. If the activityId
is null
this corresponds to checkout(SessionInfo, NodeId)
sessionInfo
- nodeId
- activityId
- Id of the activity node set to the editing session or
null
if no activity is in effect.UnsupportedRepositoryOperationException
LockException
RepositoryException
NodeId checkpoint(SessionInfo sessionInfo, NodeId nodeId) throws UnsupportedRepositoryOperationException, RepositoryException
Node
identified by the given
NodeId
.sessionInfo
- nodeId
- NodeId
of newly created versionjavax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
UnsupportedRepositoryOperationException
RepositoryException
javax.jcr.version.VersionManager#checkpoint(String)
NodeId checkpoint(SessionInfo sessionInfo, NodeId nodeId, NodeId activityId) throws UnsupportedRepositoryOperationException, RepositoryException
Node
identified by the given
NodeId
. For the checkout part the specified activityId
is taken into account as specified in checkout(SessionInfo, NodeId, NodeId)
.sessionInfo
- nodeId
- activityId
- Id of the activity node set to the editing session or
null
if no activity is in effect.UnsupportedRepositoryOperationException
LockException
RepositoryException
void removeVersion(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId) throws ReferentialIntegrityException, AccessDeniedException, UnsupportedRepositoryOperationException, VersionException, RepositoryException
versionId
.sessionInfo
- versionHistoryId
- NodeId
identifying the version
history the version identified by versionId
belongs to.versionId
- ReferentialIntegrityException
AccessDeniedException
UnsupportedRepositoryOperationException
VersionException
RepositoryException
javax.jcr.version.VersionHistory#removeVersion(String)
void restore(SessionInfo sessionInfo, NodeId nodeId, NodeId versionId, boolean removeExisting) throws VersionException, PathNotFoundException, ItemExistsException, UnsupportedRepositoryOperationException, LockException, InvalidItemStateException, RepositoryException
nodeId
to the state defined
by the version with the specified versionId
.sessionInfo
- nodeId
- versionId
- removeExisting
- 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 fails.javax.jcr.version.VersionException
javax.jcr.PathNotFoundException
javax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
VersionException
PathNotFoundException
ItemExistsException
UnsupportedRepositoryOperationException
LockException
InvalidItemStateException
RepositoryException
javax.jcr.Node#restore(String, boolean)
,
javax.jcr.Node#restore(javax.jcr.version.Version, boolean)
,
javax.jcr.Node#restore(javax.jcr.version.Version, String, boolean)
,
javax.jcr.Node#restoreByLabel(String, boolean)
void restore(SessionInfo sessionInfo, NodeId[] versionIds, boolean removeExisting) throws ItemExistsException, UnsupportedRepositoryOperationException, VersionException, LockException, InvalidItemStateException, RepositoryException
NodeId
s.sessionInfo
- versionIds
- removeExisting
- 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 fails.javax.jcr.ItemExistsException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.version.VersionException
javax.jcr.lock.LockException
javax.jcr.InvalidItemStateException
javax.jcr.RepositoryException
ItemExistsException
UnsupportedRepositoryOperationException
VersionException
LockException
InvalidItemStateException
RepositoryException
javax.jcr.Workspace#restore(javax.jcr.version.Version[], boolean)
java.util.Iterator<NodeId> merge(SessionInfo sessionInfo, NodeId nodeId, java.lang.String srcWorkspaceName, boolean bestEffort) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException
NodeId
and its subtree
with the corresponding node present in the workspace with the name of
srcWorkspaceName
.sessionInfo
- nodeId
- srcWorkspaceName
- bestEffort
- Iterator
over the NodeId
s 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.RepositoryException
NoSuchWorkspaceException
AccessDeniedException
MergeException
LockException
InvalidItemStateException
RepositoryException
javax.jcr.Node#merge(String, boolean)
java.util.Iterator<NodeId> merge(SessionInfo sessionInfo, NodeId nodeId, java.lang.String srcWorkspaceName, boolean bestEffort, boolean isShallow) throws NoSuchWorkspaceException, AccessDeniedException, MergeException, LockException, InvalidItemStateException, RepositoryException
NodeId
and its subtree
with the corresponding node present in the workspace with the name of
srcWorkspaceName
.sessionInfo
- nodeId
- srcWorkspaceName
- bestEffort
- Iterator
over the NodeId
s 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.RepositoryException
NoSuchWorkspaceException
AccessDeniedException
MergeException
LockException
InvalidItemStateException
RepositoryException
javax.jcr.version.VersionManager#merge(String, String, boolean, boolean)
void resolveMergeConflict(SessionInfo sessionInfo, NodeId nodeId, NodeId[] mergeFailedIds, NodeId[] predecessorIds) throws VersionException, InvalidItemStateException, UnsupportedRepositoryOperationException, RepositoryException
NodeId
.sessionInfo
- nodeId
- mergeFailedIds
- The NodeId
s 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.RepositoryException
VersionException
InvalidItemStateException
UnsupportedRepositoryOperationException
RepositoryException
javax.jcr.Node#cancelMerge(javax.jcr.version.Version)
,
javax.jcr.Node#doneMerge(javax.jcr.version.Version)
void addVersionLabel(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId, Name label, boolean moveLabel) throws VersionException, RepositoryException
sessionInfo
- versionHistoryId
- 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.RepositoryException
VersionException
RepositoryException
javax.jcr.version.VersionHistory#addVersionLabel(String, String, boolean)
void removeVersionLabel(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId, Name label) throws VersionException, RepositoryException
sessionInfo
- versionHistoryId
- 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.RepositoryException
VersionException
RepositoryException
javax.jcr.version.VersionHistory#removeVersionLabel(String)
NodeId createActivity(SessionInfo sessionInfo, java.lang.String title) throws UnsupportedRepositoryOperationException, RepositoryException
sessionInfo
- title
- NodeId
of the new activity node.javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
UnsupportedRepositoryOperationException
RepositoryException
javax.jcr.version.VersionManager#createActivity(String)
void removeActivity(SessionInfo sessionInfo, NodeId activityId) throws UnsupportedRepositoryOperationException, RepositoryException
activityId
.sessionInfo
- activityId
- javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
UnsupportedRepositoryOperationException
RepositoryException
javax.jcr.version.VersionManager#removeActivity(Node)
java.util.Iterator<NodeId> mergeActivity(SessionInfo sessionInfo, NodeId activityId) throws UnsupportedRepositoryOperationException, RepositoryException
activityId
into
the workspace the specified sessionInfo
has been created for.sessionInfo
- activityId
- Iterator
over the NodeId
s of all nodes that
received a merge result of "fail" in the course of this operation.UnsupportedRepositoryOperationException
RepositoryException
NodeId createConfiguration(SessionInfo sessionInfo, NodeId nodeId) throws UnsupportedRepositoryOperationException, RepositoryException
sessionInfo
- nodeId
- UnsupportedRepositoryOperationException
RepositoryException
javax.jcr.version.VersionManager#createConfiguration(String)
java.lang.String[] getSupportedQueryLanguages(SessionInfo sessionInfo) throws RepositoryException
sessionInfo
- javax.jcr.RepositoryException
RepositoryException
javax.jcr.query.QueryManager#getSupportedQueryLanguages()
java.lang.String[] checkQueryStatement(SessionInfo sessionInfo, java.lang.String statement, java.lang.String language, java.util.Map<java.lang.String,java.lang.String> namespaces) throws InvalidQueryException, RepositoryException
statement
is valid according to the
specified query language
and returns the bind variable
names found in the query statement.sessionInfo
- 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
.InvalidQueryException
- if the query statement is invalid or the
language is not supported.RepositoryException
- if an error occurs while checking the
statement.javax.jcr.query.QueryManager#createQuery(String, String)
QueryInfo executeQuery(SessionInfo sessionInfo, java.lang.String statement, java.lang.String language, java.util.Map<java.lang.String,java.lang.String> namespaces, long limit, long offset, java.util.Map<java.lang.String,QValue> values) throws 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.sessionInfo
- the session info that wants to execute the query.statement
- 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
.limit
- The maximum result size or -1
is no
maximum is set.offset
- The offset in the total result set or -1
is no offset is set.values
- A Map of name/value pairs collected upon calls to
javax.jcr.query.Query#bindValue(String,
javax.jcr.Value)
.RepositoryException
- if an error occurs.javax.jcr.query.Query#execute()
EventFilter createEventFilter(SessionInfo sessionInfo, int eventTypes, Path absPath, boolean isDeep, java.lang.String[] uuid, Name[] nodeTypeName, boolean noLocal) throws UnsupportedRepositoryOperationException, RepositoryException
javax.jcr.observation.ObservationManager#addEventListener
.
Note, that an SPI implementation may support observation even if
the corresponding repository descriptor
does not return 'true'.
sessionInfo
- 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
.UnsupportedRepositoryOperationException
- if this SPI implementation
does not allow to create event filters.RepositoryException
- if an error occurs while creating the
EventFilter.javax.jcr.observation.ObservationManager#addEventListener(javax.jcr.observation.EventListener, int, String, boolean, String[], String[], boolean)
Subscription createSubscription(SessionInfo sessionInfo, EventFilter[] filters) throws UnsupportedRepositoryOperationException, RepositoryException
Subscription
for events with an initial set of
EventFilter
s. 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
updateEventFilters(Subscription, EventFilter[])
.sessionInfo
- the session info.filters
- the initial event filters for the subscription.UnsupportedRepositoryOperationException
- if this SPI implementation does not support
observation.RepositoryException
- if an error occurs while creating the
Subscription.void updateEventFilters(Subscription subscription, EventFilter[] filters) throws RepositoryException
filters
.
An implementation is required to accept at least event filter instances
created by 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 getEvents(Subscription, long)
using the same
subscription instance as a parameter.
subscription
- 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 accept
ed 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.RepositoryException
- if an error occurs while updating the event
filters.EventBundle[] getEvents(Subscription subscription, long timeout) throws RepositoryException, java.lang.InterruptedException
Note, that an SPI implementation may support observation even if the
corresponding 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.
subscription
- 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.EventBundle
s representing the events
that occurred.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
.EventBundle getEvents(SessionInfo sessionInfo, EventFilter filter, long after) throws RepositoryException, UnsupportedRepositoryOperationException
EventJournal
after a given point in
time. The returned event bundle may only contain events up to a given
time. In order to retrieve more events a client must call this method
again with the timestamp from the last event bundle. An empty bundle
indicates that there are no more events.sessionInfo
- the session info.filter
- the event filter to apply. Please note: the
noLocal
flag is ignored.after
- retrieve events that occurred after the given
timestamp.RepositoryException
- if an error occurs.UnsupportedRepositoryOperationException
- if the underlying implementation does not
support event journaling.void dispose(Subscription subscription) throws RepositoryException
Note on thread-safety: it is permissible to call this methods
while another thread is blocked in calling getEvents(Subscription, long)
using the same
subscription instance as a parameter.
RepositoryException
- if an error occurs while the subscription is
disposed.java.util.Map<java.lang.String,java.lang.String> getRegisteredNamespaces(SessionInfo sessionInfo) throws RepositoryException
sessionInfo
- javax.jcr.RepositoryException
RepositoryException
javax.jcr.Workspace#getNamespaceRegistry()
,
javax.jcr.NamespaceRegistry#getPrefixes()
,
javax.jcr.NamespaceRegistry#getURIs()
java.lang.String getNamespaceURI(SessionInfo sessionInfo, java.lang.String prefix) throws NamespaceException, RepositoryException
prefix
.sessionInfo
- the session info.prefix
- a namespace prefix to resolve.prefix
.NamespaceException
- if prefix is not mapped to a namespace URI.RepositoryException
- if another error occurs.javax.jcr.NamespaceRegistry#getURI(String)
java.lang.String getNamespacePrefix(SessionInfo sessionInfo, java.lang.String uri) throws NamespaceException, RepositoryException
uri
.sessionInfo
- the session info.uri
- the namespace URI.NamespaceException
- if the URI unknown.RepositoryException
- if another error occurs.javax.jcr.NamespaceRegistry#getPrefix(String)
void registerNamespace(SessionInfo sessionInfo, java.lang.String prefix, java.lang.String uri) throws NamespaceException, UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException
sessionInfo
- prefix
- Prefix of the namespace to be registered.uri
- Namespace URI to be registered.javax.jcr.NamespaceException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException
NamespaceException
UnsupportedRepositoryOperationException
AccessDeniedException
RepositoryException
javax.jcr.NamespaceRegistry#registerNamespace(String, String)
void unregisterNamespace(SessionInfo sessionInfo, java.lang.String uri) throws NamespaceException, UnsupportedRepositoryOperationException, AccessDeniedException, RepositoryException
sessionInfo
- uri
- Namespace URI to be unregistered.javax.jcr.NamespaceException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.AccessDeniedException
javax.jcr.RepositoryException
NamespaceException
UnsupportedRepositoryOperationException
AccessDeniedException
RepositoryException
javax.jcr.NamespaceRegistry#unregisterNamespace(String)
java.util.Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException
QNodeTypeDefinition
s of all registered nodetypes.sessionInfo
- QNodeTypeDefinition
s.javax.jcr.RepositoryException
RepositoryException
javax.jcr.Workspace#getNodeTypeManager()
,
javax.jcr.nodetype.NodeTypeManager#getAllNodeTypes()
,
javax.jcr.nodetype.NodeTypeManager#getMixinNodeTypes()
,
javax.jcr.nodetype.NodeTypeManager#getPrimaryNodeTypes()
,
javax.jcr.nodetype.NodeTypeManager#getNodeType(String)
java.util.Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo, Name[] nodetypeNames) throws RepositoryException
QNodeTypeDefinition
s 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 QNodeTypeDefinition
s
present in the Iterator
irrespective whether they have been
loaded before or not.sessionInfo
- nodetypeNames
- names of node types to retrieveQNodeTypeDefinition
javax.jcr.nodetype.NoSuchNodeTypeException
- if for any of the given
names no QNodeTypeDefinition
exists.javax.jcr.RepositoryException
RepositoryException
javax.jcr.Workspace#getNodeTypeManager()
,
javax.jcr.nodetype.NodeTypeManager#getAllNodeTypes()
,
javax.jcr.nodetype.NodeTypeManager#getMixinNodeTypes()
,
javax.jcr.nodetype.NodeTypeManager#getPrimaryNodeTypes()
,
javax.jcr.nodetype.NodeTypeManager#getNodeType(String)
void registerNodeTypes(SessionInfo sessionInfo, QNodeTypeDefinition[] nodeTypeDefinitions, boolean allowUpdate) throws InvalidNodeTypeDefinitionException, NodeTypeExistsException, UnsupportedRepositoryOperationException, RepositoryException
QNodeTypeDefinition
s.
If allowUpdate
is true
this method may also be
used to reregister existing node types with a modified definition, otherwise
this method will fail with NodeTypeExistsException
if any of
the specified definition has the name of an already registered node type.sessionInfo
- nodeTypeDefinitions
- allowUpdate
- InvalidNodeTypeDefinitionException
- If any of the specified definitions
is invalid.NodeTypeExistsException
- If any of the specified definitions has the
name of an already registered node type and allowUpdate
is false
.UnsupportedRepositoryOperationException
- If registering node types
is not supported.RepositoryException
- If another error occurs.javax.jcr.nodetype.NodeTypeManager#registerNodeTypes(javax.jcr.nodetype.NodeTypeDefinition[], boolean)
void unregisterNodeTypes(SessionInfo sessionInfo, Name[] nodeTypeNames) throws UnsupportedRepositoryOperationException, NoSuchNodeTypeException, RepositoryException
names
.sessionInfo
- nodeTypeNames
- UnsupportedRepositoryOperationException
- If unregistering node types
is not supported.NoSuchNodeTypeException
- If any of the specified names has no
corresponding registered node type.RepositoryException
- If another error occurs.javax.jcr.nodetype.NodeTypeManager#unregisterNodeTypes(String[])
void createWorkspace(SessionInfo sessionInfo, java.lang.String name, java.lang.String srcWorkspaceName) throws AccessDeniedException, UnsupportedRepositoryOperationException, NoSuchWorkspaceException, RepositoryException
name
. If
srcWorkspaceName
isn't null
the content of
that workspace is 'cloned' to the new workspace as inital content,
otherwise an empty workspace will be created.sessionInfo
- name
- The name of the new workspace.srcWorkspaceName
- The name of the workspace from which the initial
content of the new workspace will be 'cloned'.AccessDeniedException
UnsupportedRepositoryOperationException
NoSuchWorkspaceException
RepositoryException
javax.jcr.Workspace#createWorkspace(String)
,
javax.jcr.Workspace#createWorkspace(String, String)
void deleteWorkspace(SessionInfo sessionInfo, java.lang.String name) throws AccessDeniedException, UnsupportedRepositoryOperationException, NoSuchWorkspaceException, RepositoryException
name
.sessionInfo
- name
- The name of the workspace to be deleted.AccessDeniedException
UnsupportedRepositoryOperationException
NoSuchWorkspaceException
RepositoryException
javax.jcr.Workspace#deleteWorkspace(String)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"