public class RepositoryServiceLogger extends AbstractLogger implements RepositoryService
RepositoryService.AbstractLogger.Callable, AbstractLogger.SafeCallablewriter| Constructor and Description | 
|---|
| RepositoryServiceLogger(RepositoryService service,
                       LogWriter writer)Create a new instance for the given  servicewhich useswriterfor persisting log messages. | 
| 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  Nodeidentified by the givenNodeId. | 
| void | checkout(SessionInfo sessionInfo,
        NodeId nodeId)Performs a checkout for the  Nodeidentified by the givenNodeId. | 
| void | checkout(SessionInfo sessionInfo,
        NodeId nodeId,
        NodeId activityId)Performs a checkout for the  Nodeidentified by the givenNodeIdand for activity identified by the specifiedactivityId. | 
| NodeId | checkpoint(SessionInfo sessionInfo,
          NodeId nodeId)Performs a checkpoint for the  Nodeidentified by the givenNodeId. | 
| NodeId | checkpoint(SessionInfo sessionInfo,
          NodeId nodeId,
          NodeId activityId)Performs a checkpoint for the  Nodeidentified by the givenNodeId. | 
| String[] | checkQueryStatement(SessionInfo sessionInfo,
                   String statement,
                   String language,
                   Map<String,String> namespaces)Checks if the query  statementis valid according to the
 specified querylanguageand returns the bind variable
 names found in the query statement. | 
| void | clone(SessionInfo sessionInfo,
     String srcWorkspaceName,
     NodeId srcNodeId,
     NodeId destParentNodeId,
     Name destName,
     boolean removeExisting)Clone the subtree identified by the given  srcNodeIdin workspace namedsrcWorkspaceNameto the destination
 in the workspace specified by the givenSessionInfo. | 
| void | copy(SessionInfo sessionInfo,
    String srcWorkspaceName,
    NodeId srcNodeId,
    NodeId destParentNodeId,
    Name destName)Clone the subtree identified by the given  srcNodeIdin workspace namedsrcWorkspaceNameto the destination
 in the workspace specified by the givenSessionInfo. | 
| NodeId | createActivity(SessionInfo sessionInfo,
              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,
                 String[] uuid,
                 Name[] qnodeTypeName,
                 boolean noLocal)Creates an event filter. | 
| Subscription | createSubscription(SessionInfo sessionInfo,
                  EventFilter[] filters)Creates a new  Subscriptionfor events with an initial set ofEventFilters. | 
| Tree | createTree(SessionInfo sessionInfo,
          Batch batch,
          Name nodeName,
          Name primaryTypeName,
          String uniqueId)Creates a new  Treethat can be populated and later on be applied
 to the specifiedBatchby calling#setTree. | 
| void | createWorkspace(SessionInfo sessionInfo,
               String name,
               String srcWorkspaceName)Create a new workspace with the specified  name. | 
| void | deleteWorkspace(SessionInfo sessionInfo,
               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,
            String statement,
            String language,
            Map<String,String> namespaces,
            long limit,
            long offset,
            Map<String,QValue> values)Execute the given query statement with the specified query language. | 
| Iterator<ChildInfo> | getChildInfos(SessionInfo sessionInfo,
             NodeId parentId)Returns an Iterator of  ChildInfos present on the
 Node represented by the given parentId. | 
| EventBundle | getEvents(SessionInfo sessionInfo,
         EventFilter filter,
         long after)Returns events from the  EventJournalafter 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  ItemInfoCachefor the givenSessionInfo. | 
| 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  Nodeidentified
 by the givenNodeIdornull. | 
| NameFactory | getNameFactory()Return the  NameFactory. | 
| String | getNamespacePrefix(SessionInfo sessionInfo,
                  String uri)Returns the namespace prefix for the given namespace  uri. | 
| String | getNamespaceURI(SessionInfo sessionInfo,
               String prefix)Returns the namespace URI for the given namespace  prefix. | 
| QNodeDefinition | getNodeDefinition(SessionInfo sessionInfo,
                 NodeId nodeId)Returns the  QNodeDefinitionfor theNodeidentified by the given id. | 
| NodeInfo | getNodeInfo(SessionInfo sessionInfo,
           NodeId nodeId)Retrieve the  NodeInfofor the node identified by the givenNodeId. | 
| PathFactory | getPathFactory()Return the  PathFactory. | 
| PrivilegeDefinition[] | getPrivilegeDefinitions(SessionInfo sessionInfo)TODO | 
| Name[] | getPrivilegeNames(SessionInfo sessionInfo,
                 NodeId nodeId)TODO | 
| QPropertyDefinition | getPropertyDefinition(SessionInfo sessionInfo,
                     PropertyId propertyId)Returns the  QPropertyDefinitionfor thePropertyidentified by the given id. | 
| PropertyInfo | getPropertyInfo(SessionInfo sessionInfo,
               PropertyId propertyId)Returns the  PropertyInfofor thePropertyidentified by the given id. | 
| Iterator<QNodeTypeDefinition> | getQNodeTypeDefinitions(SessionInfo sessionInfo)Retrieve the  QNodeTypeDefinitions of all registered nodetypes. | 
| Iterator<QNodeTypeDefinition> | getQNodeTypeDefinitions(SessionInfo sessionInfo,
                       Name[] nodetypeNames)Retrieve  QNodeTypeDefinitions for the given names. | 
| QValueFactory | getQValueFactory()Return the  QValueFactorydefined with this SPI implementation. | 
| Iterator<PropertyId> | getReferences(SessionInfo sessionInfo,
             NodeId nodeId,
             Name propertyName,
             boolean weakReferences)Returns the  Ids of the properties that are referencing
 the node identified by the givennodeId. | 
| Map<String,String> | getRegisteredNamespaces(SessionInfo sessionInfo)Retrieve all registered namespaces. | 
| Map<String,QValue[]> | getRepositoryDescriptors()Returns all property descriptors that can be exposed with the
  Repositoryimplementation built on top of
 thisRepositoryService. | 
| RepositoryService | getRepositoryService() | 
| PrivilegeDefinition[] | getSupportedPrivileges(SessionInfo sessionInfo,
                      NodeId nodeId)TODO | 
| String[] | getSupportedQueryLanguages(SessionInfo sessionInfo)Returns a String array identifying all query languages supported by this
 SPI implementation. | 
| String[] | getWorkspaceNames(SessionInfo sessionInfo)Return all workspace names available for the given  SessionInfo. | 
| SessionInfo | impersonate(SessionInfo sessionInfo,
           Credentials credentials)Returns a  SessionInfothat will be used by other methods
 on theRepositoryService. | 
| void | importXml(SessionInfo sessionInfo,
         NodeId parentId,
         InputStream xmlStream,
         int uuidBehaviour)Imports the data present in the given  InputStreaminto the
 persistent layer. | 
| boolean | isGranted(SessionInfo sessionInfo,
         ItemId itemId,
         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  Nodeidentified by the given id. | 
| LockInfo | lock(SessionInfo sessionInfo,
    NodeId nodeId,
    boolean deep,
    boolean sessionScoped,
    long timeoutHint,
    String ownerHint)Create a lock on the  Nodeidentified by the given id. | 
| Iterator<NodeId> | merge(SessionInfo sessionInfo,
     NodeId nodeId,
     String srcWorkspaceName,
     boolean bestEffort)Merge the node identified by the given  NodeIdand its subtree
 with the corresponding node present in the workspace with the name ofsrcWorkspaceName. | 
| Iterator<NodeId> | merge(SessionInfo sessionInfo,
     NodeId nodeId,
     String srcWorkspaceName,
     boolean bestEffort,
     boolean isShallow)Merge the node identified by the given  NodeIdand its subtree
 with the corresponding node present in the workspace with the name ofsrcWorkspaceName. | 
| Iterator<NodeId> | mergeActivity(SessionInfo sessionInfo,
             NodeId activityId)Merges the activity identified by the given  activityIdinto
 the workspace the specifiedsessionInfohas 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 bydestParentNodeIdand a new name (destName). | 
| SessionInfo | obtain(Credentials credentials,
      String workspaceName)Returns a  SessionInfothat will be used by other methods
 on theRepositoryService. | 
| SessionInfo | obtain(SessionInfo sessionInfo,
      String workspaceName)Returns a new  SessionInfofor the given workspace name that
 will be used by other methods on theRepositoryService. | 
| void | refreshLock(SessionInfo sessionInfo,
           NodeId nodeId)Explicit refresh of an existing lock. | 
| void | registerNamespace(SessionInfo sessionInfo,
                 String prefix,
                 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  QNodeTypeDefinitions. | 
| 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[] nodeIds,
       boolean removeExisting)Restore multiple versions at once. | 
| void | restore(SessionInfo sessionInfo,
       NodeId nodeId,
       NodeId versionId,
       boolean removeExisting)Restores the node identified by  nodeIdto the state defined
 by the version with the specifiedversionId. | 
| void | submit(Batch batch)Completes the given  Batchor discard all the previous modifications. | 
| void | unlock(SessionInfo sessionInfo,
      NodeId nodeId)Releases the lock on the  Nodeidentified by the givenNodeId. | 
| void | unregisterNamespace(SessionInfo sessionInfo,
                   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,
      String srcWorkspaceName)Updates the node identified by the given  NodeIdreplacing
 it (an the complete subtree) with a clone of its corresponding node
 present in the workspace with the givensrcWorkspaceName. | 
| void | updateEventFilters(Subscription subscription,
                  EventFilter[] eventFilters)Updates events filters on the subscription. | 
execute, executepublic RepositoryServiceLogger(RepositoryService service, LogWriter writer)
service which uses
 writer for persisting log messages.service - writer - public RepositoryService getRepositoryService()
public NameFactory getNameFactory() throws RepositoryException
RepositoryServiceNameFactory.getNameFactory in interface RepositoryServiceNameFactory.RepositoryException - If an error occurs.public PathFactory getPathFactory() throws RepositoryException
RepositoryServicePathFactory.getPathFactory in interface RepositoryServicePathFactory.RepositoryException - If an error occurs.public IdFactory getIdFactory() throws RepositoryException
RepositoryServiceIdFactory.getIdFactory in interface RepositoryServiceIdFactory.RepositoryException - If an error occurs.public QValueFactory getQValueFactory() throws RepositoryException
RepositoryServiceQValueFactory defined with this SPI implementation.getQValueFactory in interface RepositoryServiceQValueFactory.RepositoryException - If an error occurs.public Map<String,QValue[]> getRepositoryDescriptors() throws RepositoryException
RepositoryServiceRepository implementation built on top of
 this RepositoryService.getRepositoryDescriptors in interface RepositoryServiceRepositoryExceptionRepository.getDescriptorKeys(), 
Repository.getDescriptor(String)public ItemInfoCache getItemInfoCache(SessionInfo sessionInfo) throws RepositoryException
RepositoryServiceItemInfoCache for the given SessionInfo.getItemInfoCache in interface RepositoryServiceRepositoryExceptionpublic SessionInfo obtain(Credentials credentials, String workspaceName) throws RepositoryException
RepositoryServiceSessionInfo that will be used by other methods
 on the RepositoryService.
 An implementation may choose to authenticate the user using the supplied
 credentials.obtain in interface RepositoryServicecredentials - the credentials of the user.workspaceName - the name of the workspace the SessionInfo
 should be built for. If the specified workspaceName is null
 the implementation should select a default workspace.SessionInfo if authentication was successful.LoginException - if authentication of the user fails.NoSuchWorkspaceException - if the specified workspaceName
                                  is not recognized.RepositoryException - if an error occurs.public SessionInfo obtain(SessionInfo sessionInfo, String workspaceName) throws RepositoryException
RepositoryServiceSessionInfo for the given workspace name that
 will be used by other methods on the RepositoryService.obtain in interface RepositoryServicesessionInfo - for another workspaceworkspaceName - the name of the workspace the new SessionInfo
 should be built for. If the specified workspaceName is null
 the implementation should select a default workspace.SessionInfo if authentication was successful.LoginException - if authentication of the user fails.NoSuchWorkspaceException - if the specified workspaceName
                                  is not recognized.RepositoryException - if an error occurs.public SessionInfo impersonate(SessionInfo sessionInfo, Credentials credentials) throws RepositoryException
RepositoryServiceSessionInfo that will be used by other methods
 on the RepositoryService.impersonate in interface RepositoryServiceSessionInfo if impersonate was successful.LoginExceptionRepositoryExceptionSession.impersonate(javax.jcr.Credentials)public void dispose(SessionInfo sessionInfo) throws RepositoryException
RepositoryServiceRepositoryService, that the given SessionInfo
 will not be used any more.dispose in interface RepositoryServiceRepositoryExceptionpublic String[] getWorkspaceNames(SessionInfo sessionInfo) throws RepositoryException
RepositoryServiceSessionInfo.getWorkspaceNames in interface RepositoryServiceRepositoryExceptionWorkspace.getAccessibleWorkspaceNames(), 
Workspace.getName()public boolean isGranted(SessionInfo sessionInfo, ItemId itemId, String[] actions) throws RepositoryException
RepositoryServiceSessionInfo. False otherwise.isGranted in interface RepositoryServiceSessionInfo has
 the specified rights for the given item.RepositoryExceptionSession.checkPermission(String, String), 
Session.hasPermission(String, String)public PrivilegeDefinition[] getPrivilegeDefinitions(SessionInfo sessionInfo) throws RepositoryException
RepositoryServicegetPrivilegeDefinitions in interface RepositoryServiceRepositoryExceptionpublic PrivilegeDefinition[] getSupportedPrivileges(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException
RepositoryServicegetSupportedPrivileges in interface RepositoryServiceRepositoryExceptionpublic Name[] getPrivilegeNames(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException
RepositoryServicegetPrivilegeNames in interface RepositoryServiceRepositoryExceptionpublic QNodeDefinition getNodeDefinition(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException
RepositoryServiceQNodeDefinition for the Node
 identified by the given id. This method should only be used if the
 caller is not able to unambiguously determine the applicable definition
 from the parent node type definition or if no parent exists (i.e. for
 the root).getNodeDefinition in interface RepositoryServiceNode identified
 by the given id.RepositoryExceptionpublic QPropertyDefinition getPropertyDefinition(SessionInfo sessionInfo, PropertyId propertyId) throws RepositoryException
RepositoryServiceQPropertyDefinition for the Property
 identified by the given id. This method should only be used if the
 caller is not able to unambiguously determine the applicable definition
 from the parent node type definition.getPropertyDefinition in interface RepositoryServiceProperty
 identified by the given id.RepositoryExceptionpublic NodeInfo getNodeInfo(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException
RepositoryServiceNodeInfo for the node identified by the given
 NodeId. See RepositoryService.getItemInfos(SessionInfo, ItemId) for
 a similar method that in addition may return ItemInfos of
 children Items.getNodeInfo in interface RepositoryServiceNodeInfo for the node identified by the given id.ItemNotFoundExceptionRepositoryExceptionSession.getItem(String), 
Node.getNode(String), 
VersionHistory.getAllVersions(), 
VersionHistory.getVersion(String), 
VersionHistory.getVersionByLabel(String), 
VersionHistory.getRootVersion(), 
Node.getBaseVersion(), 
Node.getVersionHistory(), 
Version.getContainingHistory()public Iterator<? extends ItemInfo> getItemInfos(SessionInfo sessionInfo, ItemId itemId) throws RepositoryException
RepositoryServiceItemInfo for the given ItemId as the first
 element in the Iterator. In addition the iterator may contain
 arbitrary ItemInfos.getItemInfos in interface RepositoryServiceIterator of ItemInfos containing
 at least a single element: the 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.ItemNotFoundExceptionRepositoryExceptionSession.getItem(String), 
Node.getNode(String), 
VersionHistory.getAllVersions(), 
VersionHistory.getVersion(String), 
VersionHistory.getVersionByLabel(String), 
VersionHistory.getRootVersion(), 
Node.getBaseVersion(), 
Node.getVersionHistory(), 
Version.getContainingHistory()public Iterator<ChildInfo> getChildInfos(SessionInfo sessionInfo, NodeId parentId) throws RepositoryException
RepositoryServiceChildInfos present on the
 Node represented by the given parentId.getChildInfos in interface RepositoryServiceChildInfos present on the
 Node represented by the given parentId.ItemNotFoundExceptionRepositoryExceptionpublic Iterator<PropertyId> getReferences(SessionInfo sessionInfo, NodeId nodeId, Name propertyName, boolean weakReferences) throws RepositoryException
RepositoryServiceIds 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.getReferences in interface RepositoryServicepropertyName - name filter of referring properties to be returned;
 if null then all references are returned.weakReferences - If true the properties must be of type
 PropertyType.WEAKREFERENCE, otherwise of type
 PropertyType.REFERENCE.Ids 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.ItemNotFoundExceptionRepositoryExceptionPropertyInfo.getId()public PropertyInfo getPropertyInfo(SessionInfo sessionInfo, PropertyId propertyId) throws RepositoryException
RepositoryServicePropertyInfo for the Property
 identified by the given id.getPropertyInfo in interface RepositoryServicePropertyInfo for the Property
 identified by the given id.ItemNotFoundExceptionRepositoryExceptionSession.getItem(String), 
Node.getProperty(String)public Batch createBatch(SessionInfo sessionInfo, ItemId itemId) throws RepositoryException
RepositoryServiceBatch must be executed at once or non must be executed upon
 calling RepositoryService.submit(Batch).createBatch in interface RepositoryServiceitemId - Id of the Item that is a common ancestor of all
 Items affected upon batch execution. This Item
 might itself be modified within the scope of the Batch.RepositoryService.submit(Batch).RepositoryExceptionItem.save(), 
Session.save(), 
Batchpublic void submit(Batch batch) throws RepositoryException
RepositoryServiceBatch or discard all the previous modifications.
 See RepositoryService.createBatch(SessionInfo,ItemId) for additional information
 regarding batch creation.submit in interface RepositoryServicePathNotFoundExceptionItemNotFoundExceptionNoSuchNodeTypeExceptionValueFormatExceptionVersionExceptionLockExceptionConstraintViolationExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionBatchpublic Tree createTree(SessionInfo sessionInfo, Batch batch, Name nodeName, Name primaryTypeName, String uniqueId) throws RepositoryException
RepositoryServiceTree that can be populated and later on be applied
 to the specified Batch by calling #setTree.createTree in interface RepositoryServiceTree instance.RepositoryExceptionpublic void importXml(SessionInfo sessionInfo, NodeId parentId, InputStream xmlStream, int uuidBehaviour) throws RepositoryException
RepositoryServiceInputStream into the
 persistent layer. Note, that the implementation is responsible for
 validating the data presented and for the integrity of the repository
 upon completion.importXml in interface RepositoryServiceItemExistsExceptionPathNotFoundExceptionVersionExceptionConstraintViolationExceptionLockExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionWorkspace.importXML(String, java.io.InputStream, int)public void move(SessionInfo sessionInfo, NodeId srcNodeId, NodeId destParentNodeId, Name destName) throws RepositoryException
RepositoryServicesrcNodeId (and its
 entire subtree) to the new location defined by destParentNodeId
 and a new name (destName).public void copy(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, Name destName) throws RepositoryException
RepositoryServicesrcNodeId
 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 RepositoryServiceNoSuchWorkspaceExceptionConstraintViolationExceptionVersionExceptionAccessDeniedExceptionPathNotFoundExceptionItemExistsExceptionLockExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionWorkspace.copy(String, String), 
Workspace.copy(String, String, String)public void update(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName) throws RepositoryException
RepositoryServiceNodeId replacing
 it (an the complete subtree) with a clone of its corresponding node
 present in the workspace with the given srcWorkspaceName.update in interface RepositoryServiceNoSuchWorkspaceExceptionAccessDeniedExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionNode.update(String)public void clone(SessionInfo sessionInfo, String srcWorkspaceName, NodeId srcNodeId, NodeId destParentNodeId, Name destName, boolean removeExisting) throws RepositoryException
RepositoryServicesrcNodeId
 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 RepositoryServiceNoSuchWorkspaceExceptionConstraintViolationExceptionVersionExceptionAccessDeniedExceptionPathNotFoundExceptionItemExistsExceptionLockExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionWorkspace.clone(String, String, String, boolean)public LockInfo getLockInfo(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException
RepositoryServiceNode identified
 by the given NodeId or null. If the implementation
 does not support locking at all, this method always returns null.getLockInfo in interface RepositoryServicenodeId or null if no lock applies to that Node.AccessDeniedExceptionRepositoryException - If some other error occurs.Node.getLock()public LockInfo lock(SessionInfo sessionInfo, NodeId nodeId, boolean deep, boolean sessionScoped) throws RepositoryException
RepositoryServiceNode identified by the given id.lock in interface RepositoryServiceLockInfo associated with the new lock
 that has been created.UnsupportedRepositoryOperationException - If this SPI
 implementation does not support locking at all.LockException - If the Node identified by the given
 id cannot be locked due to an existing lock or due to missing mixin type.AccessDeniedExceptionRepositoryException - If another error occurs.Node.lock(boolean, boolean)public LockInfo lock(SessionInfo sessionInfo, NodeId nodeId, boolean deep, boolean sessionScoped, long timeoutHint, String ownerHint) throws RepositoryException
RepositoryServiceNode identified by the given id.lock in interface RepositoryServicetimeoutHint - 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.UnsupportedRepositoryOperationException - If this SPI
 implementation does not support locking at all.LockException - If the Node identified by the given
 id cannot be locked due to an existing lock or due to missing mixin type.AccessDeniedExceptionRepositoryException - If another error occurs.LockManager.lock(String, boolean, boolean, long, String)public void refreshLock(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException
RepositoryServicerefreshLock in interface RepositoryServiceUnsupportedRepositoryOperationException - If this SPI
 implementation does not support locking at all.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.AccessDeniedExceptionRepositoryException - If another error occurs.Lockpublic void unlock(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException
RepositoryServiceNode identified by the given
 NodeId.
 
 Please note, that on logout all
 session-scoped locks must be released by calling unlock.
unlock in interface RepositoryServiceUnsupportedRepositoryOperationException - If this SPI
 implementation does not support locking at all.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.AccessDeniedExceptionRepositoryException - If another error occurs.Node.unlock()public NodeId checkin(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException
RepositoryServiceNode identified by the given
 NodeId.checkin in interface RepositoryServiceNodeId of newly created versionVersionExceptionUnsupportedRepositoryOperationExceptionInvalidItemStateExceptionLockExceptionRepositoryExceptionNode.checkin()public void checkout(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException
RepositoryServiceNode identified by the given
 NodeId. Same as RepositoryService.checkout(SessionInfo, NodeId, NodeId)
 where the activityId is null.checkout in interface RepositoryServiceUnsupportedRepositoryOperationExceptionLockExceptionRepositoryExceptionNode.checkout()public void checkout(SessionInfo sessionInfo, NodeId nodeId, NodeId activityId) throws RepositoryException
RepositoryServiceNode identified by the given
 NodeId and for activity identified by the specified
 activityId. If the activityId is null
 this corresponds to RepositoryService.checkout(SessionInfo, NodeId)checkout in interface RepositoryServiceactivityId - Id of the activity node set to the editing session or
 null if no activity is in effect.UnsupportedRepositoryOperationExceptionLockExceptionRepositoryExceptionpublic NodeId checkpoint(SessionInfo sessionInfo, NodeId nodeId) throws UnsupportedRepositoryOperationException, RepositoryException
RepositoryServiceNode identified by the given
 NodeId.checkpoint in interface RepositoryServiceNodeId of newly created versionUnsupportedRepositoryOperationExceptionRepositoryExceptionVersionManager.checkpoint(String)public NodeId checkpoint(SessionInfo sessionInfo, NodeId nodeId, NodeId activityId) throws UnsupportedRepositoryOperationException, RepositoryException
RepositoryServiceNode identified by the given
 NodeId. For the checkout part the specified activityId
 is taken into account as specified in RepositoryService.checkout(SessionInfo, NodeId, NodeId).checkpoint in interface RepositoryServiceactivityId - Id of the activity node set to the editing session or
 null if no activity is in effect.UnsupportedRepositoryOperationExceptionLockExceptionRepositoryExceptionpublic void removeVersion(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId) throws RepositoryException
RepositoryServiceversionId.removeVersion in interface RepositoryServiceversionHistoryId - NodeId identifying the version
 history the version identified by versionId belongs to.ReferentialIntegrityExceptionAccessDeniedExceptionUnsupportedRepositoryOperationExceptionVersionExceptionRepositoryExceptionVersionHistory.removeVersion(String)public void restore(SessionInfo sessionInfo, NodeId nodeId, NodeId versionId, boolean removeExisting) throws RepositoryException
RepositoryServicenodeId to the state defined
 by the version with the specified versionId.restore in interface RepositoryServiceremoveExisting - boolean flag indicating how to deal with an
 identifier collision that may occur if a node exists outside the subtree
 to be restored with the same identified as a node that would be
 introduces by the restore. If the removeExisting is
 true the restored node takes precedence and the
 existing node is removed. Otherwise the restore fails.VersionExceptionPathNotFoundExceptionItemExistsExceptionUnsupportedRepositoryOperationExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionNode.restore(String, boolean), 
Node.restore(javax.jcr.version.Version, boolean), 
Node.restore(javax.jcr.version.Version, String, boolean), 
Node.restoreByLabel(String, boolean)public void restore(SessionInfo sessionInfo, NodeId[] nodeIds, boolean removeExisting) throws RepositoryException
RepositoryServiceNodeIds.restore in interface RepositoryServiceremoveExisting - boolean flag indicating how to deal with an
 identifier collision that may occur if a node exists outside the subtrees
 to be restored with the same identified as any node that would be
 introduces by the restore. If the removeExisting is
 true the node to be restored takes precedence and the
 existing node is removed. Otherwise the restore fails.ItemExistsExceptionUnsupportedRepositoryOperationExceptionVersionExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionWorkspace.restore(javax.jcr.version.Version[], boolean)public Iterator<NodeId> merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName, boolean bestEffort) throws RepositoryException
RepositoryServiceNodeId and its subtree
 with the corresponding node present in the workspace with the name of
 srcWorkspaceName.merge in interface RepositoryServiceIterator over the NodeIds of all nodes that
 received a merge result of "fail" in the course of this operation.NoSuchWorkspaceExceptionAccessDeniedExceptionMergeExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionNode.merge(String, boolean)public Iterator<NodeId> merge(SessionInfo sessionInfo, NodeId nodeId, String srcWorkspaceName, boolean bestEffort, boolean isShallow) throws RepositoryException
RepositoryServiceNodeId and its subtree
 with the corresponding node present in the workspace with the name of
 srcWorkspaceName.merge in interface RepositoryServiceIterator over the NodeIds of all nodes that
 received a merge result of "fail" in the course of this operation.NoSuchWorkspaceExceptionAccessDeniedExceptionMergeExceptionLockExceptionInvalidItemStateExceptionRepositoryExceptionVersionManager.merge(String, String, boolean, boolean)public void resolveMergeConflict(SessionInfo sessionInfo, NodeId nodeId, NodeId[] mergeFailedIds, NodeId[] predecessorIds) throws RepositoryException
RepositoryServiceNodeId.resolveMergeConflict in interface RepositoryServicemergeFailedIds - The NodeIds remaining in the jcr:mergeFailed
 REFERENCE property. The version id(s) to be resolved were removed from the
 array and added to the predecessor ids in case of Node.doneMerge(Version).
 In case of a Node.cancelMerge(Version) the version id only gets
 removed from the list.predecessorIds - The complete set of predecessor id including those
 that have been added in order to resolve a merge conflict.VersionExceptionInvalidItemStateExceptionUnsupportedRepositoryOperationExceptionRepositoryExceptionNode.cancelMerge(javax.jcr.version.Version), 
Node.doneMerge(javax.jcr.version.Version)public void addVersionLabel(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId, Name label, boolean moveLabel) throws RepositoryException
RepositoryServiceaddVersionLabel in interface RepositoryServiceversionHistoryId - NodeId identifying the version
 history the version identified by versionId belongs to.versionId - NodeId identifying the version the
 label belongs to.label - The label to be added.moveLabel - If the label is already assigned to a version within
 the same version history this parameter has the following effect: If true
 the label already present gets moved to be now be a label of the version
 indicated by versionId. If false this method
 fails and the label remains with the original version.VersionExceptionRepositoryExceptionVersionHistory.addVersionLabel(String, String, boolean)public void removeVersionLabel(SessionInfo sessionInfo, NodeId versionHistoryId, NodeId versionId, Name label) throws RepositoryException
RepositoryServiceremoveVersionLabel in interface RepositoryServiceversionHistoryId - NodeId identifying the version
 history the version identified by versionId belongs to.versionId - NodeId identifying the version the
 label belongs to.label - The label to be removed.VersionExceptionRepositoryExceptionVersionHistory.removeVersionLabel(String)public NodeId createActivity(SessionInfo sessionInfo, String title) throws UnsupportedRepositoryOperationException, RepositoryException
RepositoryServicecreateActivity in interface RepositoryServiceNodeId of the new activity node.UnsupportedRepositoryOperationExceptionRepositoryExceptionVersionManager.createActivity(String)public void removeActivity(SessionInfo sessionInfo, NodeId activityId) throws UnsupportedRepositoryOperationException, RepositoryException
RepositoryServiceactivityId.removeActivity in interface RepositoryServiceUnsupportedRepositoryOperationExceptionRepositoryExceptionVersionManager.removeActivity(Node)public Iterator<NodeId> mergeActivity(SessionInfo sessionInfo, NodeId activityId) throws UnsupportedRepositoryOperationException, RepositoryException
RepositoryServiceactivityId into
 the workspace the specified sessionInfo has been created for.mergeActivity in interface RepositoryServiceIterator over the NodeIds of all nodes that
 received a merge result of "fail" in the course of this operation.UnsupportedRepositoryOperationExceptionRepositoryExceptionpublic NodeId createConfiguration(SessionInfo sessionInfo, NodeId nodeId) throws UnsupportedRepositoryOperationException, RepositoryException
createConfiguration in interface RepositoryServiceUnsupportedRepositoryOperationExceptionRepositoryExceptionVersionManager.createConfiguration(String)public String[] getSupportedQueryLanguages(SessionInfo sessionInfo) throws RepositoryException
RepositoryServicegetSupportedQueryLanguages in interface RepositoryServiceRepositoryExceptionQueryManager.getSupportedQueryLanguages()public String[] checkQueryStatement(SessionInfo sessionInfo, String statement, String language, Map<String,String> namespaces) throws RepositoryException
RepositoryServicestatement is valid according to the
 specified query language and returns the bind variable
 names found in the query statement.checkQueryStatement in interface RepositoryServicesessionInfo - the session info.statement - the query statement to check.language - the query language.namespaces - the locally re-mapped namespace which may be used in
                    the query statement.InvalidQueryException - if the query statement is invalid or the
                               language is not supported.RepositoryException - if an error occurs while checking the
                               statement.QueryManager.createQuery(String, String)public QueryInfo executeQuery(SessionInfo sessionInfo, String statement, String language, Map<String,String> namespaces, long limit, long offset, Map<String,QValue> values) throws RepositoryException
RepositoryServicenamespaces parameter provides a mapping of prefix
 to namespace uri in order to be able to properly resolve prefix:localname
 patterns present within the query statement.executeQuery in interface RepositoryServicesessionInfo - 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
                    Query.bindValue(String,
                    javax.jcr.Value).RepositoryException - if an error occurs.Query.execute()public EventFilter createEventFilter(SessionInfo sessionInfo, int eventTypes, Path absPath, boolean isDeep, String[] uuid, Name[] qnodeTypeName, boolean noLocal) throws RepositoryException
RepositoryServiceObservationManager.addEventListener(javax.jcr.observation.EventListener, int, java.lang.String, boolean, java.lang.String[], java.lang.String[], boolean).
 
 Note, that an SPI implementation may support observation even if
 the corresponding repository descriptor
 does not return 'true'.
createEventFilter in interface RepositoryServicesessionInfo - the session info which requests an event filter.eventTypes - A combination of one or more event type constants
 encoded as a bitmask.absPath - An absolute path.isDeep - A boolean.uuid - Array of jcr:uuid properties.qnodeTypeName - 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.ObservationManager.addEventListener(javax.jcr.observation.EventListener, int, String, boolean, String[], String[], boolean)public Subscription createSubscription(SessionInfo sessionInfo, EventFilter[] filters) throws RepositoryException
RepositoryServiceSubscription for events with an initial set of
 EventFilters. The returned subscription must provide events from
 the time when the subscription was created. If an empty array of filters
 is passed no events will be available through the created subscription
 unless the filters are later updated by calling
 RepositoryService.updateEventFilters(Subscription, EventFilter[]).createSubscription in interface RepositoryServicesessionInfo - the session info.filters - the initial event filters for the subscription.UnsupportedRepositoryOperationException - if this SPI implementation does not support
                             observation.RepositoryException - if an error occurs while creating the
                             Subscription.public EventBundle[] getEvents(Subscription subscription, long timeout) throws RepositoryException, InterruptedException
RepositoryService
 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.
getEvents in interface RepositoryServicesubscription - a subscription.timeout - a timeout in milliseconds to wait at most for an
                     event bundle. If timeout is up and no
                     event occurred meanwhile an empty array is returned.EventBundles representing the events
         that occurred.RepositoryException - if an error occurs while retrieving the
                              event bundles.InterruptedException - if the calling thread is interrupted while
                              waiting for events within the specified
                              timeout.public EventBundle getEvents(SessionInfo sessionInfo, EventFilter filter, long after) throws RepositoryException, UnsupportedRepositoryOperationException
RepositoryServiceEventJournal 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.getEvents in interface RepositoryServicesessionInfo - 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.public void updateEventFilters(Subscription subscription, EventFilter[] eventFilters) throws RepositoryException
RepositoryServicefilters.
 
 An implementation is required to accept at least event filter instances
 created by RepositoryService.createEventFilter(org.apache.jackrabbit.spi.SessionInfo, int, org.apache.jackrabbit.spi.Path, boolean, java.lang.String[], org.apache.jackrabbit.spi.Name[], boolean). Optionally an
 implementation may also support event filters instanciated by the client
 itself. An implementation may require special deployment in that case,
 e.g. to make the event filter implementation class available to the
 repository server.
 
 Note on thread-safety: it is permissible to call this methods
 while another thread is blocked in calling RepositoryService.getEvents(Subscription, long) using the same
 subscription instance as a parameter.
updateEventFilters in interface RepositoryServicesubscription - the subscription where the event filters are
                     applied.eventFilters - the filters that are applied to the events as they
                occurred on the repository. An event is included in an
                event bundle if it is accepted by at least one of the supplied
                filters. If an empty array is passed none of the potential
                events are include in an event bundle. This allows a
                client to skip or ignore events for a certain period of
                time.RepositoryException - if an error occurs while updating the event
                              filters.public void dispose(Subscription subscription) throws RepositoryException
RepositoryService
 Note on thread-safety: it is permissible to call this methods
 while another thread is blocked in calling RepositoryService.getEvents(Subscription, long) using the same
 subscription instance as a parameter.
dispose in interface RepositoryServiceRepositoryException - if an error occurs while the subscription is
                             disposed.public Map<String,String> getRegisteredNamespaces(SessionInfo sessionInfo) throws RepositoryException
RepositoryServicegetRegisteredNamespaces in interface RepositoryServiceRepositoryExceptionWorkspace.getNamespaceRegistry(), 
NamespaceRegistry.getPrefixes(), 
NamespaceRegistry.getURIs()public String getNamespaceURI(SessionInfo sessionInfo, String prefix) throws RepositoryException
RepositoryServiceprefix.getNamespaceURI in interface RepositoryServicesessionInfo - 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.NamespaceRegistry.getURI(String)public String getNamespacePrefix(SessionInfo sessionInfo, String uri) throws RepositoryException
RepositoryServiceuri.getNamespacePrefix in interface RepositoryServicesessionInfo - the session info.uri - the namespace URI.NamespaceException - if the URI unknown.RepositoryException - if another error occurs.NamespaceRegistry.getPrefix(String)public void registerNamespace(SessionInfo sessionInfo, String prefix, String uri) throws RepositoryException
RepositoryServiceregisterNamespace in interface RepositoryServiceprefix - Prefix of the namespace to be registered.uri - Namespace URI to be registered.NamespaceExceptionUnsupportedRepositoryOperationExceptionAccessDeniedExceptionRepositoryExceptionNamespaceRegistry.registerNamespace(String, String)public void unregisterNamespace(SessionInfo sessionInfo, String uri) throws RepositoryException
RepositoryServiceunregisterNamespace in interface RepositoryServiceuri - Namespace URI to be unregistered.NamespaceExceptionUnsupportedRepositoryOperationExceptionAccessDeniedExceptionRepositoryExceptionNamespaceRegistry.unregisterNamespace(String)public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo) throws RepositoryException
RepositoryServiceQNodeTypeDefinitions of all registered nodetypes.getQNodeTypeDefinitions in interface RepositoryServiceQNodeTypeDefinitions.RepositoryExceptionWorkspace.getNodeTypeManager(), 
NodeTypeManager.getAllNodeTypes(), 
NodeTypeManager.getMixinNodeTypes(), 
NodeTypeManager.getPrimaryNodeTypes(), 
NodeTypeManager.getNodeType(String)public Iterator<QNodeTypeDefinition> getQNodeTypeDefinitions(SessionInfo sessionInfo, Name[] nodetypeNames) throws RepositoryException
RepositoryServiceQNodeTypeDefinitions for the given names. The
 implementation is free to return additional definitions which will (probably)
 be needed by the caller due to node type inheritance. The caller must be
 able to deal with any kind of additional QNodeTypeDefinitions
 present in the Iterator irrespective whether they have been
 loaded before or not.getQNodeTypeDefinitions in interface RepositoryServicenodetypeNames - names of node types to retrieveQNodeTypeDefinitionNoSuchNodeTypeException - if for any of the given
 names no QNodeTypeDefinition exists.RepositoryExceptionWorkspace.getNodeTypeManager(), 
NodeTypeManager.getAllNodeTypes(), 
NodeTypeManager.getMixinNodeTypes(), 
NodeTypeManager.getPrimaryNodeTypes(), 
NodeTypeManager.getNodeType(String)public void registerNodeTypes(SessionInfo sessionInfo, QNodeTypeDefinition[] nodeTypeDefinitions, boolean allowUpdate) throws InvalidNodeTypeDefinitionException, NodeTypeExistsException, UnsupportedRepositoryOperationException, RepositoryException
RepositoryServiceQNodeTypeDefinitions.
 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.registerNodeTypes in interface RepositoryServiceInvalidNodeTypeDefinitionException - 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.NodeTypeManager.registerNodeTypes(javax.jcr.nodetype.NodeTypeDefinition[], boolean)public void unregisterNodeTypes(SessionInfo sessionInfo, Name[] nodeTypeNames) throws UnsupportedRepositoryOperationException, NoSuchNodeTypeException, RepositoryException
RepositoryServicenames.unregisterNodeTypes in interface RepositoryServiceUnsupportedRepositoryOperationException - 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.NodeTypeManager.unregisterNodeTypes(String[])public void createWorkspace(SessionInfo sessionInfo, String name, String srcWorkspaceName) throws RepositoryException
RepositoryServicename. 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.createWorkspace in interface RepositoryServicename - The name of the new workspace.srcWorkspaceName - The name of the workspace from which the initial
 content of the new workspace will be 'cloned'.AccessDeniedExceptionUnsupportedRepositoryOperationExceptionNoSuchWorkspaceExceptionRepositoryExceptionWorkspace.createWorkspace(String), 
Workspace.createWorkspace(String, String)public void deleteWorkspace(SessionInfo sessionInfo, String name) throws RepositoryException
RepositoryServicename.deleteWorkspace in interface RepositoryServicename - The name of the workspace to be deleted.AccessDeniedExceptionUnsupportedRepositoryOperationExceptionNoSuchWorkspaceExceptionRepositoryExceptionWorkspace.deleteWorkspace(String)Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.