Interface RepositoryService

  • All Known Implementing Classes:
    AbstractReadableRepositoryService, AbstractRepositoryService, RepositoryServiceImpl, RepositoryServiceImpl, RepositoryServiceImpl, RepositoryServiceLogger

    public interface RepositoryService
    The RepositoryService interface defines methods used to retrieve information from the persistent layer of the repository as well as the methods that modify its persistent state. The implementation of this interface is intended to hold only the state of the persistent layer, no session-related state should be held. Consequently, each method that alters persistent state always includes all the information necessary to fully specify and authorize a change.

    For example, consider the method

        void RepositoryService.copy(SessionInfo sessionInfo,
                                    String srcWorkspaceName,
                                    NodeId srcNodeId, NodeId destParentNodeId,
                                    Name destName)
    This method performs an immediate persistent copy of the node identified by srcNodeId and that node's subtree to a position as child of the node identified by destParentNodeId and assigns the newly copied node the name destName.
    The SessionInfo object provides user and workspace identification as well as eventual lock tokens required to execute the copy.
    If srcWorkspaceName differs from the workspace name present with the SessionInfo, the copy is corresponds to a copy across workspaces. The source and destination of the copy operation are specified by NodeIds. The Name holds the new name. Taken together, this information is sufficient to completely specify and authorize the copy operations.

    The RepositoryService in addition allows to create and submit Batch objects, that cover lists of operations that have to be applied to the persistent layer at once.