org.apache.jackrabbit.spi.commons
Class AbstractRepositoryService

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.AbstractRepositoryService
All Implemented Interfaces:
RepositoryService
Direct Known Subclasses:
AbstractReadableRepositoryService

public abstract class AbstractRepositoryService
extends Object
implements RepositoryService

AbstractRepositoryService provides an abstract base class for repository service implementations. This class provides default implementations for the following methods:


Field Summary
protected  Map<String,QValue[]> descriptors
          The repository descriptors.
protected  NamespaceMapping namespaces
          The fixed set of namespaces known to the repository service.
protected  NodeTypeStorage nodeTypeDefs
          The fixed set of node type definitions known to the repository service.
protected  QNodeDefinition rootNodeDefinition
          The node definition of the root node.
 
Constructor Summary
protected AbstractRepositoryService()
           
  AbstractRepositoryService(Map<String,QValue[]> descriptors, Map<String,String> namespaces, QNodeTypeDefinition[] nodeTypeDefs)
           
  AbstractRepositoryService(Map<String,QValue[]> descriptors, Map<String,String> namespaces, Reader cnd)
           
 
Method Summary
 void addVersionLabel(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId, Name label, boolean moveLabel)
           
protected  void checkCredentials(Credentials credentials, String workspaceName)
          Checks if the given credentials are valid.
 NodeId checkin(SessionInfo sessionInfo, NodeId nodeId)
           
 void checkout(SessionInfo sessionInfo, NodeId nodeId)
           
 void checkout(SessionInfo sessionInfo, NodeId nodeId, NodeId activityId)
           
 NodeId checkpoint(SessionInfo sessionInfo, NodeId nodeId)
           
 String[] checkQueryStatement(SessionInfo sessionInfo, String statement, String language, Map<String,String> namespaces)
           
protected  void checkSessionInfo(SessionInfo sessionInfo)
          Checks the type of the sessionInfo instance.
protected  void checkWorkspace(String workspaceName)
          Checks if the given workspace is available.
 void clone(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, Name destName, boolean removeExisting)
           
 void copy(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, Name destName)
           
 NodeId createActivity(SessionInfo sessionInfo, String title)
           
 Batch createBatch(SessionInfo sessionInfo, ItemId itemId)
           
 NodeId createConfiguration(SessionInfo sessionInfo, NodeId nodeId)
           
 EventFilter createEventFilter(SessionInfo sessionInfo, int eventTypes, Path absPath, boolean isDeep, String[] uuid, Name[] nodeTypeName, boolean noLocal)
           
protected abstract  QNodeDefinition createRootNodeDefinition()
          Create the root node definition.
protected  SessionInfo createSessionInfo(Credentials credentials, String workspaceName)
          Creates a session info instance for the given credentials and workspaceName.
protected  SessionInfo createSessionInfo(SessionInfo sessionInfo, String workspaceName)
          Creates a session info instance for the given sessionInfo and workspaceName.
 Subscription createSubscription(SessionInfo sessionInfo, EventFilter[] filters)
           
 void createWorkspace(SessionInfo sessionInfo, String name, String srcWorkspaceName)
           
 void deleteWorkspace(SessionInfo sessionInfo, String name)
           
 void dispose(SessionInfo sessionInfo)
          This default implementation does nothing.
 void dispose(Subscription subscription)
           
 QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language, Map<String,String> namespaces, long limit, long offset, Map<String,QValue> values)
           
 EventBundle getEvents(SessionInfo sessionInfo, EventFilter filter, long after)
           
 EventBundle[] getEvents(Subscription subscription, long timeout)
           
 IdFactory getIdFactory()
           
 LockInfo getLockInfo(SessionInfo sessionInfo, NodeId nodeId)
           
 NameFactory getNameFactory()
           
 String getNamespacePrefix(SessionInfo sessionInfo, String uri)
          This default implementation first calls checkSessionInfo(SessionInfo) with the sessionInfo, then return the namespace prefix for the given uri.
 String getNamespaceURI(SessionInfo sessionInfo, String prefix)
          This default implementation first calls checkSessionInfo(SessionInfo) with the sessionInfo, then returns the namepsace URI for the given prefix.
 QNodeDefinition getNodeDefinition(SessionInfo sessionInfo, NodeId nodeId)
          This default implementation first calls checkSessionInfo(SessionInfo) with the sessionInfo, then lazily initializes rootNodeDefinition if nodeId denotes the root node; otherwise throws a UnsupportedRepositoryOperationException.
 PathFactory getPathFactory()
           
 QPropertyDefinition getPropertyDefinition(SessionInfo sessionInfo, PropertyId propertyId)
           
 Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo)
          This default implementation first calls checkSessionInfo(SessionInfo) with the sessionInfo,
 Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo, Name[] nodetypeNames)
          This default implementation first calls checkSessionInfo(SessionInfo) with the sessionInfo, then gathers the QNodeTypeDefinitions with the given nodetypeNames.
 QValueFactory getQValueFactory()
           
 Map<String,String> getRegisteredNamespaces(SessionInfo sessionInfo)
          This default implementation first calls checkSessionInfo(SessionInfo) with the sessionInfo, then returns the prefix to namespace URL mapping that was provided in the constructor of this repository service.
 Map<String,QValue[]> getRepositoryDescriptors()
          This default implementation returns the descriptors that were passed to the constructor of this repository service.
 String[] getSupportedQueryLanguages(SessionInfo sessionInfo)
           
 SessionInfo impersonate(SessionInfo sessionInfo, Credentials credentials)
          This default implementation returns the session info returned by the call to obtain(Credentials, String) with the workspaceName taken from the passed sessionInfo.
 void importXml(SessionInfo sessionInfo, NodeId parentId, InputStream xmlStream, int uuidBehaviour)
           
 LockInfo lock(SessionInfo sessionInfo, NodeId nodeId, boolean deep, boolean sessionScoped)
           
 LockInfo lock(SessionInfo sessionInfo, NodeId nodeId, boolean deep, boolean sessionScoped, long timeoutHint, String ownerHint)
           
 Iterator<NodeId> merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName, boolean bestEffort)
           
 Iterator<NodeId> merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName, boolean bestEffort, boolean isShallow)
           
 Iterator<NodeId> mergeActivity(SessionInfo sessionInfo, NodeId activityId)
           
 void move(SessionInfo sessionInfo, NodeId srcNodeId, NodeId destParentNodeId, Name destName)
           
 SessionInfo obtain(Credentials credentials, String workspaceName)
          This default implementation does: calls checkCredentials(Credentials, String) calls checkWorkspace(String) calls createSessionInfo(Credentials, String).
 SessionInfo obtain(SessionInfo sessionInfo, String workspaceName)
          This default implementation returns the session info returned by the call to createSessionInfo(SessionInfo, String).
 void refreshLock(SessionInfo sessionInfo, NodeId nodeId)
           
 void registerNamespace(SessionInfo sessionInfo, String prefix, String uri)
           
 void registerNodeTypes(SessionInfo sessionInfo, QNodeTypeDefinition[] nodeTypeDefinitions, boolean allowUpdate)
           
 void removeActivity(SessionInfo sessionInfo, NodeId activityId)
           
 void removeVersion(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId)
           
 void removeVersionLabel(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId, Name label)
           
 void resolveMergeConflict(SessionInfo sessionInfo, NodeId nodeId, NodeId[] mergeFailedIds, NodeId[] predecessorIds)
           
 void restore(SessionInfo sessionInfo, NodeId[] versionIds, boolean removeExisting)
           
 void restore(SessionInfo sessionInfo, NodeId nodeId, NodeId versionId, boolean removeExisting)
           
 void submit(Batch batch)
           
 void unlock(SessionInfo sessionInfo, NodeId nodeId)
           
 void unregisterNamespace(SessionInfo sessionInfo, String uri)
           
 void unregisterNodeTypes(SessionInfo sessionInfo, Name[] nodeTypeNames)
           
 void update(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName)
           
 void updateEventFilters(Subscription subscription, EventFilter[] filters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jackrabbit.spi.RepositoryService
getChildInfos, getItemInfos, getNodeInfo, getPropertyInfo, getReferences, getWorkspaceNames, isGranted
 

Field Detail

descriptors

protected final Map<String,QValue[]> descriptors
The repository descriptors.


namespaces

protected final NamespaceMapping namespaces
The fixed set of namespaces known to the repository service.


nodeTypeDefs

protected final NodeTypeStorage nodeTypeDefs
The fixed set of node type definitions known to the repository service.


rootNodeDefinition

protected QNodeDefinition rootNodeDefinition
The node definition of the root node.

Constructor Detail

AbstractRepositoryService

protected AbstractRepositoryService()
                             throws RepositoryException
Throws:
RepositoryException

AbstractRepositoryService

public AbstractRepositoryService(Map<String,QValue[]> descriptors,
                                 Map<String,String> namespaces,
                                 QNodeTypeDefinition[] nodeTypeDefs)
                          throws RepositoryException
Throws:
RepositoryException

AbstractRepositoryService

public AbstractRepositoryService(Map<String,QValue[]> descriptors,
                                 Map<String,String> namespaces,
                                 Reader cnd)
                          throws RepositoryException
Throws:
RepositoryException
Method Detail

getIdFactory

public IdFactory getIdFactory()
                       throws RepositoryException
Specified by:
getIdFactory in interface RepositoryService
Returns:
IdFactoryImpl.getInstance().
Throws:
RepositoryException - if an error occurs.

getNameFactory

public NameFactory getNameFactory()
                           throws RepositoryException
Specified by:
getNameFactory in interface RepositoryService
Returns:
NameFactoryImpl.getInstance().
Throws:
RepositoryException - if an error occurs.

getPathFactory

public PathFactory getPathFactory()
                           throws RepositoryException
Specified by:
getPathFactory in interface RepositoryService
Returns:
PathFactoryImpl.getInstance().
Throws:
RepositoryException - if an error occurs.

getQValueFactory

public QValueFactory getQValueFactory()
                               throws RepositoryException
Specified by:
getQValueFactory in interface RepositoryService
Returns:
QValueFactoryImpl.getInstance().
Throws:
RepositoryException - if an error occurs.

createRootNodeDefinition

protected abstract QNodeDefinition createRootNodeDefinition()
                                                     throws RepositoryException
Create the root node definition.

Returns:
the root node definition for a workspace.
Throws:
RepositoryException - if an error occurs.

checkCredentials

protected void checkCredentials(Credentials credentials,
                                String workspaceName)
                         throws LoginException
Checks if the given credentials are valid. This default implementation is empty thus allowing all credentials.

Parameters:
credentials - the credentials to check.
workspaceName - the workspace to access.
Throws:
LoginException - if the credentials are invalid.

checkWorkspace

protected void checkWorkspace(String workspaceName)
                       throws NoSuchWorkspaceException
Checks if the given workspace is available. The default implementation is empty thus admitting every workspace name.

Parameters:
workspaceName - Name of the workspace to check
Throws:
NoSuchWorkspaceException - If workspaceName is not available.

createSessionInfo

protected SessionInfo createSessionInfo(Credentials credentials,
                                        String workspaceName)
                                 throws RepositoryException
Creates a session info instance for the given credentials and workspaceName. This default implementation creates a SessionInfoImpl instance and sets the userId and workspaceName. The user userId is null or the userId from credentials if it is of type SimpleCredentials.

Parameters:
credentials - the credentials.
workspaceName - the name of the workspace to access or null for the default workspace.
Returns:
a session info instance for the given credentials and workspaceName.
Throws:
RepositoryException

createSessionInfo

protected SessionInfo createSessionInfo(SessionInfo sessionInfo,
                                        String workspaceName)
                                 throws RepositoryException
Creates a session info instance for the given sessionInfo and workspaceName. This default implementation creates a SessionInfoImpl instance and sets the userId and workspaceName. The user userId is set to the return value of SessionInfo.getUserID().

Parameters:
sessionInfo - the sessionInfo.
workspaceName - the name of the workspace to access.
Returns:
a session info instance for the given credentials and workspaceName.
Throws:
RepositoryException

checkSessionInfo

protected void checkSessionInfo(SessionInfo sessionInfo)
                         throws RepositoryException
Checks the type of the sessionInfo instance. This default implementation checks if sessionInfo is of type SessionInfoImpl, otherwise throws a RepositoryException.

Parameters:
sessionInfo - the session info to check.
Throws:
RepositoryException - if the given sessionInfo is not of the required type for this repository service implementation.

getRepositoryDescriptors

public Map<String,QValue[]> getRepositoryDescriptors()
                                              throws RepositoryException
This default implementation returns the descriptors that were passed to the constructor of this repository service.

Specified by:
getRepositoryDescriptors in interface RepositoryService
Throws:
RepositoryException

obtain

public SessionInfo obtain(Credentials credentials,
                          String workspaceName)
                   throws LoginException,
                          NoSuchWorkspaceException,
                          RepositoryException
This default implementation does:

Specified by:
obtain in interface RepositoryService
Parameters:
credentials - the credentials for the login.
workspaceName - the name of the workspace to log in.
Returns:
the session info.
Throws:
LoginException - if the credentials are invalid.
NoSuchWorkspaceException - if workspaceName is unknown.
RepositoryException - if another error occurs.

obtain

public SessionInfo obtain(SessionInfo sessionInfo,
                          String workspaceName)
                   throws LoginException,
                          NoSuchWorkspaceException,
                          RepositoryException
This default implementation returns the session info returned by the call to createSessionInfo(SessionInfo, String).

Specified by:
obtain in interface RepositoryService
Throws:
LoginException
NoSuchWorkspaceException
RepositoryException

impersonate

public SessionInfo impersonate(SessionInfo sessionInfo,
                               Credentials credentials)
                        throws LoginException,
                               RepositoryException
This default implementation returns the session info returned by the call to obtain(Credentials, String) with the workspaceName taken from the passed sessionInfo.

Specified by:
impersonate in interface RepositoryService
Throws:
LoginException
RepositoryException

dispose

public void dispose(SessionInfo sessionInfo)
             throws RepositoryException
This default implementation does nothing.

Specified by:
dispose in interface RepositoryService
Throws:
RepositoryException

getQNodeTypeDefinitions

public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo)
                                                      throws RepositoryException
This default implementation first calls checkSessionInfo(SessionInfo) with the sessionInfo,

Specified by:
getQNodeTypeDefinitions in interface RepositoryService
Throws:
RepositoryException

getQNodeTypeDefinitions

public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo,
                                                             Name[] nodetypeNames)
                                                      throws RepositoryException
This default implementation first calls checkSessionInfo(SessionInfo) with the sessionInfo, then gathers the QNodeTypeDefinitions with the given nodetypeNames. If one of the nodetypeNames is not a valid node type definition then a RepositoryException is thrown.

Specified by:
getQNodeTypeDefinitions in interface RepositoryService
Throws:
RepositoryException

getNodeDefinition

public QNodeDefinition getNodeDefinition(SessionInfo sessionInfo,
                                         NodeId nodeId)
                                  throws RepositoryException
This default implementation first calls checkSessionInfo(SessionInfo) with the sessionInfo, then lazily initializes rootNodeDefinition if nodeId denotes the root node; otherwise throws a UnsupportedRepositoryOperationException.

Specified by:
getNodeDefinition in interface RepositoryService
Throws:
RepositoryException

getPropertyDefinition

public QPropertyDefinition getPropertyDefinition(SessionInfo sessionInfo,
                                                 PropertyId propertyId)
                                          throws RepositoryException
Specified by:
getPropertyDefinition in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
RepositoryException

registerNodeTypes

public void registerNodeTypes(SessionInfo sessionInfo,
                              QNodeTypeDefinition[] nodeTypeDefinitions,
                              boolean allowUpdate)
                       throws InvalidNodeTypeDefinitionException,
                              NodeTypeExistsException,
                              UnsupportedRepositoryOperationException,
                              RepositoryException
Specified by:
registerNodeTypes in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
InvalidNodeTypeDefinitionException
NodeTypeExistsException
RepositoryException

unregisterNodeTypes

public void unregisterNodeTypes(SessionInfo sessionInfo,
                                Name[] nodeTypeNames)
                         throws UnsupportedRepositoryOperationException,
                                NoSuchNodeTypeException,
                                RepositoryException
Specified by:
unregisterNodeTypes in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
NoSuchNodeTypeException
RepositoryException

getRegisteredNamespaces

public Map<String,String> getRegisteredNamespaces(SessionInfo sessionInfo)
                                           throws RepositoryException
This default implementation first calls checkSessionInfo(SessionInfo) with the sessionInfo, then returns the prefix to namespace URL mapping that was provided in the constructor of this repository service.

Specified by:
getRegisteredNamespaces in interface RepositoryService
Throws:
RepositoryException

getNamespaceURI

public String getNamespaceURI(SessionInfo sessionInfo,
                              String prefix)
                       throws NamespaceException,
                              RepositoryException
This default implementation first calls checkSessionInfo(SessionInfo) with the sessionInfo, then returns the namepsace URI for the given prefix.

Specified by:
getNamespaceURI in interface RepositoryService
Throws:
NamespaceException
RepositoryException

getNamespacePrefix

public String getNamespacePrefix(SessionInfo sessionInfo,
                                 String uri)
                          throws NamespaceException,
                                 RepositoryException
This default implementation first calls checkSessionInfo(SessionInfo) with the sessionInfo, then return the namespace prefix for the given uri.

Specified by:
getNamespacePrefix in interface RepositoryService
Throws:
NamespaceException
RepositoryException

createBatch

public Batch createBatch(SessionInfo sessionInfo,
                         ItemId itemId)
                  throws RepositoryException
Specified by:
createBatch in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
RepositoryException

submit

public void submit(Batch batch)
            throws PathNotFoundException,
                   ItemNotFoundException,
                   NoSuchNodeTypeException,
                   ValueFormatException,
                   VersionException,
                   LockException,
                   ConstraintViolationException,
                   AccessDeniedException,
                   UnsupportedRepositoryOperationException,
                   RepositoryException
Specified by:
submit in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
PathNotFoundException
ItemNotFoundException
NoSuchNodeTypeException
ValueFormatException
VersionException
LockException
ConstraintViolationException
AccessDeniedException
RepositoryException

importXml

public void importXml(SessionInfo sessionInfo,
                      NodeId parentId,
                      InputStream xmlStream,
                      int uuidBehaviour)
               throws ItemExistsException,
                      PathNotFoundException,
                      VersionException,
                      ConstraintViolationException,
                      LockException,
                      AccessDeniedException,
                      UnsupportedRepositoryOperationException,
                      RepositoryException
Specified by:
importXml in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
ItemExistsException
PathNotFoundException
VersionException
ConstraintViolationException
LockException
AccessDeniedException
RepositoryException

move

public void move(SessionInfo sessionInfo,
                 NodeId srcNodeId,
                 NodeId destParentNodeId,
                 Name destName)
          throws ItemExistsException,
                 PathNotFoundException,
                 VersionException,
                 ConstraintViolationException,
                 LockException,
                 AccessDeniedException,
                 UnsupportedRepositoryOperationException,
                 RepositoryException
Specified by:
move in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
ItemExistsException
PathNotFoundException
VersionException
ConstraintViolationException
LockException
AccessDeniedException
RepositoryException

copy

public void copy(SessionInfo sessionInfo,
                 String srcWorkspaceName,
                 NodeId srcNodeId,
                 NodeId destParentNodeId,
                 Name destName)
          throws NoSuchWorkspaceException,
                 ConstraintViolationException,
                 VersionException,
                 AccessDeniedException,
                 PathNotFoundException,
                 ItemExistsException,
                 LockException,
                 UnsupportedRepositoryOperationException,
                 RepositoryException
Specified by:
copy in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
NoSuchWorkspaceException
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
RepositoryException

update

public void update(SessionInfo sessionInfo,
                   NodeId nodeId,
                   String srcWorkspaceName)
            throws NoSuchWorkspaceException,
                   AccessDeniedException,
                   LockException,
                   InvalidItemStateException,
                   RepositoryException
Specified by:
update in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
NoSuchWorkspaceException
AccessDeniedException
LockException
InvalidItemStateException
RepositoryException

clone

public void clone(SessionInfo sessionInfo,
                  String srcWorkspaceName,
                  NodeId srcNodeId,
                  NodeId destParentNodeId,
                  Name destName,
                  boolean removeExisting)
           throws NoSuchWorkspaceException,
                  ConstraintViolationException,
                  VersionException,
                  AccessDeniedException,
                  PathNotFoundException,
                  ItemExistsException,
                  LockException,
                  UnsupportedRepositoryOperationException,
                  RepositoryException
Specified by:
clone in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
NoSuchWorkspaceException
ConstraintViolationException
VersionException
AccessDeniedException
PathNotFoundException
ItemExistsException
LockException
RepositoryException

lock

public LockInfo lock(SessionInfo sessionInfo,
                     NodeId nodeId,
                     boolean deep,
                     boolean sessionScoped)
              throws UnsupportedRepositoryOperationException,
                     LockException,
                     AccessDeniedException,
                     RepositoryException
Specified by:
lock in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
LockException
AccessDeniedException
RepositoryException

lock

public LockInfo lock(SessionInfo sessionInfo,
                     NodeId nodeId,
                     boolean deep,
                     boolean sessionScoped,
                     long timeoutHint,
                     String ownerHint)
              throws UnsupportedRepositoryOperationException,
                     LockException,
                     AccessDeniedException,
                     RepositoryException
Specified by:
lock in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
LockException
AccessDeniedException
RepositoryException

getLockInfo

public LockInfo getLockInfo(SessionInfo sessionInfo,
                            NodeId nodeId)
                     throws AccessDeniedException,
                            RepositoryException
Specified by:
getLockInfo in interface RepositoryService
Returns:
null.
Throws:
AccessDeniedException
RepositoryException

refreshLock

public void refreshLock(SessionInfo sessionInfo,
                        NodeId nodeId)
                 throws UnsupportedRepositoryOperationException,
                        LockException,
                        AccessDeniedException,
                        RepositoryException
Specified by:
refreshLock in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
LockException
AccessDeniedException
RepositoryException

unlock

public void unlock(SessionInfo sessionInfo,
                   NodeId nodeId)
            throws UnsupportedRepositoryOperationException,
                   LockException,
                   AccessDeniedException,
                   RepositoryException
Specified by:
unlock in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
LockException
AccessDeniedException
RepositoryException

checkin

public NodeId checkin(SessionInfo sessionInfo,
                      NodeId nodeId)
               throws VersionException,
                      UnsupportedRepositoryOperationException,
                      InvalidItemStateException,
                      LockException,
                      RepositoryException
Specified by:
checkin in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
VersionException
InvalidItemStateException
LockException
RepositoryException

checkout

public void checkout(SessionInfo sessionInfo,
                     NodeId nodeId)
              throws UnsupportedRepositoryOperationException,
                     LockException,
                     RepositoryException
Specified by:
checkout in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
LockException
RepositoryException

checkout

public void checkout(SessionInfo sessionInfo,
                     NodeId nodeId,
                     NodeId activityId)
              throws UnsupportedRepositoryOperationException,
                     LockException,
                     RepositoryException
Specified by:
checkout in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
LockException
RepositoryException

checkpoint

public NodeId checkpoint(SessionInfo sessionInfo,
                         NodeId nodeId)
                  throws UnsupportedRepositoryOperationException,
                         LockException,
                         RepositoryException
Specified by:
checkpoint in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
LockException
RepositoryException

removeVersion

public void removeVersion(SessionInfo sessionInfo,
                          NodeId versionHistoryId,
                          NodeId versionId)
                   throws ReferentialIntegrityException,
                          AccessDeniedException,
                          UnsupportedRepositoryOperationException,
                          VersionException,
                          RepositoryException
Specified by:
removeVersion in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
ReferentialIntegrityException
AccessDeniedException
VersionException
RepositoryException

restore

public void restore(SessionInfo sessionInfo,
                    NodeId nodeId,
                    NodeId versionId,
                    boolean removeExisting)
             throws VersionException,
                    PathNotFoundException,
                    ItemExistsException,
                    UnsupportedRepositoryOperationException,
                    LockException,
                    InvalidItemStateException,
                    RepositoryException
Specified by:
restore in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
VersionException
PathNotFoundException
ItemExistsException
LockException
InvalidItemStateException
RepositoryException

restore

public void restore(SessionInfo sessionInfo,
                    NodeId[] versionIds,
                    boolean removeExisting)
             throws ItemExistsException,
                    UnsupportedRepositoryOperationException,
                    VersionException,
                    LockException,
                    InvalidItemStateException,
                    RepositoryException
Specified by:
restore in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
ItemExistsException
VersionException
LockException
InvalidItemStateException
RepositoryException

merge

public Iterator<NodeId> merge(SessionInfo sessionInfo,
                              NodeId nodeId,
                              String srcWorkspaceName,
                              boolean bestEffort)
                       throws NoSuchWorkspaceException,
                              AccessDeniedException,
                              MergeException,
                              LockException,
                              InvalidItemStateException,
                              RepositoryException
Specified by:
merge in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
NoSuchWorkspaceException
AccessDeniedException
MergeException
LockException
InvalidItemStateException
RepositoryException

merge

public Iterator<NodeId> merge(SessionInfo sessionInfo,
                              NodeId nodeId,
                              String srcWorkspaceName,
                              boolean bestEffort,
                              boolean isShallow)
                       throws NoSuchWorkspaceException,
                              AccessDeniedException,
                              MergeException,
                              LockException,
                              InvalidItemStateException,
                              RepositoryException
Specified by:
merge in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
NoSuchWorkspaceException
AccessDeniedException
MergeException
LockException
InvalidItemStateException
RepositoryException

resolveMergeConflict

public void resolveMergeConflict(SessionInfo sessionInfo,
                                 NodeId nodeId,
                                 NodeId[] mergeFailedIds,
                                 NodeId[] predecessorIds)
                          throws VersionException,
                                 InvalidItemStateException,
                                 UnsupportedRepositoryOperationException,
                                 RepositoryException
Specified by:
resolveMergeConflict in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
VersionException
InvalidItemStateException
RepositoryException

addVersionLabel

public void addVersionLabel(SessionInfo sessionInfo,
                            NodeId versionHistoryId,
                            NodeId versionId,
                            Name label,
                            boolean moveLabel)
                     throws VersionException,
                            RepositoryException
Specified by:
addVersionLabel in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
VersionException
RepositoryException

removeVersionLabel

public void removeVersionLabel(SessionInfo sessionInfo,
                               NodeId versionHistoryId,
                               NodeId versionId,
                               Name label)
                        throws VersionException,
                               RepositoryException
Specified by:
removeVersionLabel in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
VersionException
RepositoryException

createActivity

public NodeId createActivity(SessionInfo sessionInfo,
                             String title)
                      throws UnsupportedRepositoryOperationException,
                             RepositoryException
Specified by:
createActivity in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
RepositoryException

removeActivity

public void removeActivity(SessionInfo sessionInfo,
                           NodeId activityId)
                    throws UnsupportedRepositoryOperationException,
                           RepositoryException
Specified by:
removeActivity in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
RepositoryException

mergeActivity

public Iterator<NodeId> mergeActivity(SessionInfo sessionInfo,
                                      NodeId activityId)
                               throws UnsupportedRepositoryOperationException,
                                      RepositoryException
Specified by:
mergeActivity in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
RepositoryException

createConfiguration

public NodeId createConfiguration(SessionInfo sessionInfo,
                                  NodeId nodeId)
                           throws UnsupportedRepositoryOperationException,
                                  RepositoryException
Specified by:
createConfiguration in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
RepositoryException

createEventFilter

public EventFilter createEventFilter(SessionInfo sessionInfo,
                                     int eventTypes,
                                     Path absPath,
                                     boolean isDeep,
                                     String[] uuid,
                                     Name[] nodeTypeName,
                                     boolean noLocal)
                              throws UnsupportedRepositoryOperationException,
                                     RepositoryException
Specified by:
createEventFilter in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
RepositoryException

createSubscription

public Subscription createSubscription(SessionInfo sessionInfo,
                                       EventFilter[] filters)
                                throws UnsupportedRepositoryOperationException,
                                       RepositoryException
Specified by:
createSubscription in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
RepositoryException

updateEventFilters

public void updateEventFilters(Subscription subscription,
                               EventFilter[] filters)
                        throws RepositoryException
Specified by:
updateEventFilters in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
RepositoryException

getEvents

public EventBundle[] getEvents(Subscription subscription,
                               long timeout)
                        throws RepositoryException,
                               InterruptedException
Specified by:
getEvents in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
RepositoryException
InterruptedException

getEvents

public EventBundle getEvents(SessionInfo sessionInfo,
                             EventFilter filter,
                             long after)
                      throws RepositoryException,
                             UnsupportedRepositoryOperationException
Specified by:
getEvents in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
RepositoryException

dispose

public void dispose(Subscription subscription)
             throws RepositoryException
Specified by:
dispose in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
RepositoryException

registerNamespace

public void registerNamespace(SessionInfo sessionInfo,
                              String prefix,
                              String uri)
                       throws NamespaceException,
                              UnsupportedRepositoryOperationException,
                              AccessDeniedException,
                              RepositoryException
Specified by:
registerNamespace in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
NamespaceException
AccessDeniedException
RepositoryException

unregisterNamespace

public void unregisterNamespace(SessionInfo sessionInfo,
                                String uri)
                         throws NamespaceException,
                                UnsupportedRepositoryOperationException,
                                AccessDeniedException,
                                RepositoryException
Specified by:
unregisterNamespace in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
NamespaceException
AccessDeniedException
RepositoryException

createWorkspace

public void createWorkspace(SessionInfo sessionInfo,
                            String name,
                            String srcWorkspaceName)
                     throws AccessDeniedException,
                            UnsupportedRepositoryOperationException,
                            NoSuchWorkspaceException,
                            RepositoryException
Specified by:
createWorkspace in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
AccessDeniedException
NoSuchWorkspaceException
RepositoryException

deleteWorkspace

public void deleteWorkspace(SessionInfo sessionInfo,
                            String name)
                     throws AccessDeniedException,
                            UnsupportedRepositoryOperationException,
                            NoSuchWorkspaceException,
                            RepositoryException
Specified by:
deleteWorkspace in interface RepositoryService
Throws:
UnsupportedRepositoryOperationException - always.
AccessDeniedException
NoSuchWorkspaceException
RepositoryException

getSupportedQueryLanguages

public String[] getSupportedQueryLanguages(SessionInfo sessionInfo)
                                    throws RepositoryException
Specified by:
getSupportedQueryLanguages in interface RepositoryService
Throws:
RepositoryException

checkQueryStatement

public String[] checkQueryStatement(SessionInfo sessionInfo,
                                    String statement,
                                    String language,
                                    Map<String,String> namespaces)
                             throws InvalidQueryException,
                                    RepositoryException
Specified by:
checkQueryStatement in interface RepositoryService
Throws:
InvalidQueryException
RepositoryException

executeQuery

public QueryInfo executeQuery(SessionInfo sessionInfo,
                              String statement,
                              String language,
                              Map<String,String> namespaces,
                              long limit,
                              long offset,
                              Map<String,QValue> values)
                       throws RepositoryException
Specified by:
executeQuery in interface RepositoryService
Throws:
RepositoryException


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