org.apache.jackrabbit.spi2davex
Class RepositoryServiceImpl

java.lang.Object
  extended by org.apache.jackrabbit.spi2dav.RepositoryServiceImpl
      extended by org.apache.jackrabbit.spi2davex.RepositoryServiceImpl
All Implemented Interfaces:
RepositoryService, DavConstants

public class RepositoryServiceImpl
extends RepositoryServiceImpl

RepositoryServiceImpl...


Field Summary
 
Fields inherited from interface org.apache.jackrabbit.webdav.DavConstants
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 Summary
RepositoryServiceImpl(String jcrServerURI, BatchReadConfig batchReadConfig)
           
RepositoryServiceImpl(String jcrServerURI, String defaultWorkspaceName, BatchReadConfig batchReadConfig, int itemInfoCacheSize)
           
 
Method Summary
 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.
 void dispose(SessionInfo sessionInfo)
          Indicates to the RepositoryService, that the given SessionInfo will not be used any more.
 Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, NodeId nodeId)
          Method used to 'batch-read' from the persistent storage.
 org.apache.jackrabbit.spi2davex.QValueFactoryImpl getQValueFactory(SessionInfo sessionInfo)
           
 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.
 
Methods inherited from class org.apache.jackrabbit.spi2dav.RepositoryServiceImpl
addVersionLabel, checkin, checkout, checkout, checkpoint, checkpoint, checkQueryStatement, clearItemUriCache, createActivity, createConfiguration, createEventFilter, createSubscription, createWorkspace, deleteWorkspace, dispose, executeQuery, getChildInfos, getClient, getEvents, getEvents, getIdFactory, getItemInfoCache, getItemUri, getItemUri, getLockInfo, getNameFactory, getNamePathResolver, getNamespacePrefix, getNamespaceURI, getNodeDefinition, getNodeInfo, getPathFactory, getPropertyDefinition, getPropertyInfo, getQNodeTypeDefinitions, getQNodeTypeDefinitions, getQValueFactory, getReferences, getRegisteredNamespaces, getRepositoryDescriptors, getSupportedQueryLanguages, getWorkspaceNames, impersonate, importXml, initMethod, isGranted, lock, lock, merge, merge, mergeActivity, move, refreshLock, registerNamespace, registerNodeTypes, removeActivity, removeVersion, removeVersionLabel, resolveMergeConflict, restore, restore, unlock, unregisterNamespace, unregisterNodeTypes, update, updateEventFilters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryServiceImpl

public RepositoryServiceImpl(String jcrServerURI,
                             BatchReadConfig batchReadConfig)
                      throws RepositoryException
Throws:
RepositoryException

RepositoryServiceImpl

public RepositoryServiceImpl(String jcrServerURI,
                             String defaultWorkspaceName,
                             BatchReadConfig batchReadConfig,
                             int itemInfoCacheSize)
                      throws RepositoryException
Throws:
RepositoryException
Method Detail

getQValueFactory

public org.apache.jackrabbit.spi2davex.QValueFactoryImpl getQValueFactory(SessionInfo sessionInfo)
                                                                   throws RepositoryException
Throws:
RepositoryException
See Also:
RepositoryService.getQValueFactory()

obtain

public SessionInfo obtain(Credentials credentials,
                          String workspaceName)
                   throws RepositoryException
If the specified workspaceName the default workspace name is used for backwards compatibility with jackrabbit-jcr-server < 1.5.0

Specified by:
obtain in interface RepositoryService
Overrides:
obtain in class RepositoryServiceImpl
Parameters:
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.
Returns:
a SessionInfo if authentication was successful.
Throws:
LoginException - if authentication of the user fails.
NoSuchWorkspaceException - if the specified workspaceName is not recognized.
RepositoryException - if an error occurs.
See Also:
RepositoryService.obtain(Credentials, String)

obtain

public SessionInfo obtain(SessionInfo sessionInfo,
                          String workspaceName)
                   throws RepositoryException
If the specified workspaceName the default workspace name is used for backwards compatibility with jackrabbit-jcr-server < 1.5.0

Specified by:
obtain in interface RepositoryService
Overrides:
obtain in class RepositoryServiceImpl
Parameters:
sessionInfo - for another workspace
workspaceName - 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.
Returns:
a SessionInfo if authentication was successful.
Throws:
LoginException - if authentication of the user fails.
NoSuchWorkspaceException - if the specified workspaceName is not recognized.
RepositoryException - if an error occurs.
See Also:
RepositoryService.obtain(SessionInfo, String)

dispose

public void dispose(SessionInfo sessionInfo)
             throws RepositoryException
Description copied from interface: RepositoryService
Indicates to the RepositoryService, that the given SessionInfo will not be used any more.

Specified by:
dispose in interface RepositoryService
Overrides:
dispose in class RepositoryServiceImpl
Throws:
RepositoryException
See Also:
RepositoryService.dispose(SessionInfo)

getItemInfos

public Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo,
                                                 NodeId nodeId)
                                          throws ItemNotFoundException,
                                                 RepositoryException
Description copied from interface: RepositoryService
Method used to 'batch-read' from the persistent storage. It returns the NodeInfo for the given NodeId as the first element in the Iterator. In addition the iterator may contain arbitrary ItemInfos.

Specified by:
getItemInfos in interface RepositoryService
Overrides:
getItemInfos in class RepositoryServiceImpl
Returns:
An Iterator 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.
Throws:
ItemNotFoundException
RepositoryException
See Also:
RepositoryService.getItemInfos(SessionInfo, NodeId)

createBatch

public Batch createBatch(SessionInfo sessionInfo,
                         ItemId itemId)
                  throws RepositoryException
Description copied from interface: RepositoryService
Indicates the start of a set of operations that cause modifications on the underlying persistence layer. All modification called on the Batch must be executed at once or non must be executed upon calling RepositoryService.submit(Batch).

Specified by:
createBatch in interface RepositoryService
Overrides:
createBatch in class RepositoryServiceImpl
itemId - 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.
Returns:
A Batch indicating the start of a set of transient modifications that will be execute at once upon RepositoryService.submit(Batch).
Throws:
RepositoryException
See Also:
RepositoryService.createBatch(SessionInfo,ItemId)

submit

public void submit(Batch batch)
            throws RepositoryException
Description copied from interface: RepositoryService
Completes the given Batch or discard all the previous modifications. See RepositoryService.createBatch(SessionInfo,ItemId) for additional information regarding batch creation.

Specified by:
submit in interface RepositoryService
Overrides:
submit in class RepositoryServiceImpl
Throws:
PathNotFoundException
ItemNotFoundException
NoSuchNodeTypeException
ValueFormatException
VersionException
LockException
ConstraintViolationException
AccessDeniedException
UnsupportedRepositoryOperationException
RepositoryException
See Also:
RepositoryService.submit(Batch)

copy

public void copy(SessionInfo sessionInfo,
                 String srcWorkspaceName,
                 NodeId srcNodeId,
                 NodeId destParentNodeId,
                 Name destName)
          throws RepositoryException
Description copied from interface: RepositoryService
Clone the subtree identified by the given 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.

Specified by:
copy in interface RepositoryService
Overrides:
copy in class RepositoryServiceImpl
Throws:
NoSuchWorkspaceException
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
UnsupportedRepositoryOperationException
RepositoryException
See Also:
RepositoryService.copy(SessionInfo, String, NodeId, NodeId, Name)

clone

public void clone(SessionInfo sessionInfo,
                  String srcWorkspaceName,
                  NodeId srcNodeId,
                  NodeId destParentNodeId,
                  Name destName,
                  boolean removeExisting)
           throws RepositoryException
Description copied from interface: RepositoryService
Clone the subtree identified by the given 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.

Specified by:
clone in interface RepositoryService
Overrides:
clone in class RepositoryServiceImpl
Throws:
NoSuchWorkspaceException
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
UnsupportedRepositoryOperationException
RepositoryException
See Also:
RepositoryService.clone(SessionInfo, String, NodeId, NodeId, Name, boolean)


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.