public class RepositoryServiceImpl extends RepositoryServiceImpl
RepositoryServiceImpl
...MAX_CONNECTIONS_DEFAULT
creationDateFormat, DEPTH_0, DEPTH_1, DEPTH_INFINITY, DEPTH_INFINITY_S, HEADER_AUTHORIZATION, HEADER_CONTENT_LANGUAGE, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_DAV, HEADER_DEPTH, HEADER_DESTINATION, HEADER_ETAG, HEADER_IF, HEADER_LAST_MODIFIED, HEADER_LOCK_TOKEN, HEADER_OVERWRITE, HEADER_TIMEOUT, INFINITE_TIMEOUT, modificationDateFormat, NAMESPACE, OPAQUE_LOCK_TOKEN_PREFIX, PROPERTY_CREATIONDATE, PROPERTY_DISPLAYNAME, PROPERTY_GETCONTENTLANGUAGE, PROPERTY_GETCONTENTLENGTH, PROPERTY_GETCONTENTTYPE, PROPERTY_GETETAG, PROPERTY_GETLASTMODIFIED, PROPERTY_LOCKDISCOVERY, PROPERTY_RESOURCETYPE, PROPERTY_SOURCE, PROPERTY_SUPPORTEDLOCK, PROPFIND_ALL_PROP, PROPFIND_ALL_PROP_INCLUDE, PROPFIND_BY_PROPERTY, PROPFIND_PROPERTY_NAMES, TIMEOUT_INFINITE, UNDEFINED_TIME, UNDEFINED_TIMEOUT, XML_ACTIVELOCK, XML_ALLPROP, XML_COLLECTION, XML_DEPTH, XML_DST, XML_EXCLUSIVE, XML_HREF, XML_INCLUDE, XML_KEEPALIVE, XML_LINK, XML_LOCKENTRY, XML_LOCKINFO, XML_LOCKROOT, XML_LOCKSCOPE, XML_LOCKTOKEN, XML_LOCKTYPE, XML_MULTISTATUS, XML_OMIT, XML_OWNER, XML_PROP, XML_PROPERTYBEHAVIOR, XML_PROPERTYUPDATE, XML_PROPFIND, XML_PROPNAME, XML_PROPSTAT, XML_REMOVE, XML_RESPONSE, XML_RESPONSEDESCRIPTION, XML_SET, XML_SHARED, XML_SOURCE, XML_STATUS, XML_TIMEOUT, XML_WRITE
Constructor and Description |
---|
RepositoryServiceImpl(String jcrServerURI,
BatchReadConfig batchReadConfig)
Same as
RepositoryServiceImpl(String, String, BatchReadConfig, int, int)
using null workspace name, ItemInfoCacheImpl.DEFAULT_CACHE_SIZE
as size for the item cache and RepositoryServiceImpl.MAX_CONNECTIONS_DEFAULT for the
maximum number of connections on the client. |
RepositoryServiceImpl(String jcrServerURI,
String defaultWorkspaceName,
BatchReadConfig batchReadConfig,
int itemInfoCacheSize)
Same as
RepositoryServiceImpl(String, String, BatchReadConfig, int, int)
using RepositoryServiceImpl.MAX_CONNECTIONS_DEFAULT for the maximum number of
connections on the client. |
RepositoryServiceImpl(String jcrServerURI,
String defaultWorkspaceName,
BatchReadConfig batchReadConfig,
int itemInfoCacheSize,
int maximumHttpConnections)
Creates a new instance of this repository service.
|
Modifier and Type | Method and Description |
---|---|
void |
clone(SessionInfo sessionInfo,
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,
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.
|
Tree |
createTree(SessionInfo sessionInfo,
Batch batch,
Name nodeName,
Name primaryTypeName,
String uniqueId)
Creates a new
Tree that can be populated and later on be applied
to the specified Batch by calling #setTree . |
void |
dispose(SessionInfo sessionInfo)
Indicates to the
RepositoryService , that the given SessionInfo
will not be used any more. |
Iterator<? extends ItemInfo> |
getItemInfos(SessionInfo sessionInfo,
ItemId itemId)
Method used to 'batch-read' from the persistent storage.
|
PropertyInfo |
getPropertyInfo(SessionInfo sessionInfo,
PropertyId propertyId)
Returns the
PropertyInfo for the Property
identified by the given id. |
SessionInfo |
obtain(Credentials credentials,
String workspaceName)
If the specified
workspaceName the default workspace name
is used for backwards compatibility with jackrabbit-jcr-server < 1.5.0 |
SessionInfo |
obtain(SessionInfo sessionInfo,
String workspaceName)
If the specified
workspaceName the default workspace name
is used for backwards compatibility with jackrabbit-jcr-server < 1.5.0 |
void |
submit(Batch batch)
Completes the given
Batch or discard all the previous modifications. |
addVersionLabel, checkin, checkout, checkout, checkpoint, checkpoint, checkQueryStatement, clearItemUriCache, computeRepositoryUri, createActivity, createConfiguration, createEventFilter, createSubscription, createWorkspace, deleteWorkspace, dispose, executeQuery, executeRequest, getChildInfos, getClient, getContext, getEvents, getEvents, getIdFactory, getItemInfoCache, getItemUri, getItemUri, getLockInfo, getNameFactory, getNamePathResolver, getNamespacePrefix, getNamespaceURI, getNodeDefinition, getNodeInfo, getPathFactory, getPrivilegeDefinitions, getPrivilegeNames, getPropertyDefinition, getQNodeTypeDefinitions, getQNodeTypeDefinitions, getQValueFactory, getReferences, getRegisteredNamespaces, getRepositoryDescriptors, getSupportedPrivileges, getSupportedQueryLanguages, getWorkspaceNames, impersonate, importXml, initMethod, initMethod, isGranted, lock, lock, merge, merge, mergeActivity, move, refreshLock, registerNamespace, registerNodeTypes, removeActivity, removeVersion, removeVersionLabel, resolveMergeConflict, restore, restore, unlock, unregisterNamespace, unregisterNodeTypes, update, updateEventFilters
public RepositoryServiceImpl(String jcrServerURI, BatchReadConfig batchReadConfig) throws RepositoryException
RepositoryServiceImpl(String, String, BatchReadConfig, int, int)
using null
workspace name, ItemInfoCacheImpl.DEFAULT_CACHE_SIZE
as size for the item cache and RepositoryServiceImpl.MAX_CONNECTIONS_DEFAULT
for the
maximum number of connections on the client.jcrServerURI
- The server uri.batchReadConfig
- The batch read configuration.RepositoryException
- If an exception occurs.public RepositoryServiceImpl(String jcrServerURI, String defaultWorkspaceName, BatchReadConfig batchReadConfig, int itemInfoCacheSize) throws RepositoryException
RepositoryServiceImpl(String, String, BatchReadConfig, int, int)
using RepositoryServiceImpl.MAX_CONNECTIONS_DEFAULT
for the maximum number of
connections on the client.jcrServerURI
- The server uri.defaultWorkspaceName
- The default workspace name.batchReadConfig
- The batch read configuration.itemInfoCacheSize
- The size of the item info cache.RepositoryException
- If an exception occurs.public RepositoryServiceImpl(String jcrServerURI, String defaultWorkspaceName, BatchReadConfig batchReadConfig, int itemInfoCacheSize, int maximumHttpConnections) throws RepositoryException
jcrServerURI
- The server uri.defaultWorkspaceName
- The default workspace name.batchReadConfig
- The batch read configuration.itemInfoCacheSize
- The size of the item info cache.maximumHttpConnections
- maximumHttpConnections A int >0 defining
the maximum number of connections per host to be configured on
HttpConnectionManagerParams.setDefaultMaxConnectionsPerHost(int)
.RepositoryException
- If an exception occurs.public SessionInfo obtain(Credentials credentials, String workspaceName) throws RepositoryException
workspaceName
the default workspace name
is used for backwards compatibility with jackrabbit-jcr-server < 1.5.0obtain
in interface RepositoryService
obtain
in class RepositoryServiceImpl
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.RepositoryService.obtain(Credentials, String)
public SessionInfo obtain(SessionInfo sessionInfo, String workspaceName) throws RepositoryException
workspaceName
the default workspace name
is used for backwards compatibility with jackrabbit-jcr-server < 1.5.0obtain
in interface RepositoryService
obtain
in class RepositoryServiceImpl
sessionInfo
- 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.LoginException
- if authentication of the user fails.NoSuchWorkspaceException
- if the specified workspaceName
is not recognized.RepositoryException
- if an error occurs.RepositoryService.obtain(SessionInfo, String)
public void dispose(SessionInfo sessionInfo) throws RepositoryException
RepositoryService
RepositoryService
, that the given SessionInfo
will not be used any more.dispose
in interface RepositoryService
dispose
in class RepositoryServiceImpl
RepositoryException
RepositoryService.dispose(SessionInfo)
public Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, ItemId itemId) throws RepositoryException
RepositoryService
ItemInfo
for the given ItemId
as the first
element in the Iterator
. In addition the iterator may contain
arbitrary ItemInfo
s.getItemInfos
in interface RepositoryService
getItemInfos
in class RepositoryServiceImpl
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
.ItemNotFoundException
RepositoryException
RepositoryService.getItemInfos(SessionInfo, ItemId)
public PropertyInfo getPropertyInfo(SessionInfo sessionInfo, PropertyId propertyId) throws RepositoryException
RepositoryService
PropertyInfo
for the Property
identified by the given id.getPropertyInfo
in interface RepositoryService
getPropertyInfo
in class RepositoryServiceImpl
PropertyInfo
for the Property
identified by the given id.ItemNotFoundException
RepositoryException
RepositoryService.getPropertyInfo(SessionInfo, PropertyId)
public Batch createBatch(SessionInfo sessionInfo, ItemId itemId) throws RepositoryException
RepositoryService
Batch
must be executed at once or non must be executed upon
calling RepositoryService.submit(Batch)
.createBatch
in interface RepositoryService
createBatch
in class RepositoryServiceImpl
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
.RepositoryService.submit(Batch)
.RepositoryException
Item.save()
,
Session.save()
,
Batch
public void submit(Batch batch) throws RepositoryException
RepositoryService
Batch
or discard all the previous modifications.
See RepositoryService.createBatch(SessionInfo,ItemId)
for additional information
regarding batch creation.submit
in interface RepositoryService
submit
in class RepositoryServiceImpl
PathNotFoundException
ItemNotFoundException
NoSuchNodeTypeException
ValueFormatException
VersionException
LockException
ConstraintViolationException
AccessDeniedException
UnsupportedRepositoryOperationException
RepositoryException
Batch
public Tree createTree(SessionInfo sessionInfo, Batch batch, Name nodeName, Name primaryTypeName, String uniqueId) throws RepositoryException
RepositoryService
Tree
that can be populated and later on be applied
to the specified Batch
by calling #setTree
.createTree
in interface RepositoryService
createTree
in class RepositoryServiceImpl
Tree
instance.RepositoryException
public void copy(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, Name destName) throws RepositoryException
RepositoryService
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 RepositoryService
copy
in class RepositoryServiceImpl
NoSuchWorkspaceException
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
UnsupportedRepositoryOperationException
RepositoryException
Workspace.copy(String, String)
,
Workspace.copy(String, String, String)
public void clone(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, Name destName, boolean removeExisting) throws RepositoryException
RepositoryService
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 RepositoryService
clone
in class RepositoryServiceImpl
NoSuchWorkspaceException
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
UnsupportedRepositoryOperationException
RepositoryException
Workspace.clone(String, String, String, boolean)
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.