org.jboss.dna.connector.svn
Class SVNRepositoryRequestProcessor

java.lang.Object
  extended by org.jboss.dna.graph.request.processor.RequestProcessor
      extended by org.jboss.dna.connector.svn.SVNRepositoryRequestProcessor
All Implemented Interfaces:
ScmActionFactory

public class SVNRepositoryRequestProcessor
extends RequestProcessor
implements ScmActionFactory

The RequestProcessor implementation for the file subversion repository connector. This is the class that does the bulk of the work in the subversion repository connector, since it processes all requests.


Nested Class Summary
static class SVNRepositoryRequestProcessor.AddDirectory
          root should be the last, previously created, parent folder.
static class SVNRepositoryRequestProcessor.AddFile
           
 
Method Summary
 ScmAction addDirectory(String root, String path)
          
 ScmAction addFile(String path, String file, byte[] content)
          
 ScmAction copyDirectory(String path, String newPath, long revision)
          
 ScmAction deleteDirectory(String path)
          
 ScmAction deleteFile(String path, String file)
          
 org.tmatesoft.svn.core.io.SVNRepository getDefaultWorkspace()
          Get the repository driver.
 long getLatestRevision(org.tmatesoft.svn.core.io.SVNRepository repos)
          Get the last revision.
 void process(CloneBranchRequest request)
          Process a request to clone a branch into a new workspace.
 void process(CloneWorkspaceRequest request)
          Process a request to clone an existing workspace as a new workspace.
 void process(CopyBranchRequest request)
          Process a request to copy a branch into another location.
 void process(CreateNodeRequest request)
          Process a request to create a node at a specified location.
 void process(CreateWorkspaceRequest request)
          Process a request to create a new workspace.
 void process(DeleteBranchRequest request)
          Process a request to delete a branch at a specified location.
 void process(DestroyWorkspaceRequest request)
          Process a request to permanently destroy a workspace.
 void process(GetWorkspacesRequest request)
          Process a request to get the information about the available workspaces.
 void process(MoveBranchRequest request)
          Process a request to move a branch at a specified location into a different location.
 void process(ReadAllChildrenRequest request)
          Process a request to read all of the children of a node.
 void process(ReadAllPropertiesRequest request)
          Process a request to read the properties of a node at the supplied location.
 void process(ReadNodeRequest request)
          Process a request to read the properties and children of a node at the supplied location.
 void process(RenameNodeRequest request)
          Process a request to rename a node specified location into a different location.
 void process(UpdatePropertiesRequest request)
          Process a request to remove the specified properties from a node.
 void process(VerifyWorkspaceRequest request)
          Process a request to verify a named workspace.
 
Methods inherited from class org.jboss.dna.graph.request.processor.RequestProcessor
close, getExecutionContext, getSourceName, process, process, process, process, process, process, process, process, process, process, process
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

process

public void process(ReadNodeRequest request)
Process a request to read the properties and children of a node at the supplied location.

This method does nothing if the request is null. Unless overridden, this method converts the single request into a ReadAllChildrenRequest and a ReadAllPropertiesRequest.

Overrides:
process in class RequestProcessor
Parameters:
request - the read request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.ReadNodeRequest)

process

public void process(ReadAllChildrenRequest request)
Process a request to read all of the children of a node.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the read request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.ReadAllChildrenRequest)

process

public void process(ReadAllPropertiesRequest request)
Process a request to read the properties of a node at the supplied location.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the read request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.ReadAllPropertiesRequest)

process

public void process(CreateNodeRequest request)
Process a request to create a node at a specified location.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the create request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.CreateNodeRequest)

process

public void process(UpdatePropertiesRequest request)
Process a request to remove the specified properties from a node.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the remove request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.UpdatePropertiesRequest)

process

public void process(CopyBranchRequest request)
Process a request to copy a branch into another location.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the copy request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.CopyBranchRequest)

process

public void process(CloneBranchRequest request)
Process a request to clone a branch into a new workspace.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.CloneBranchRequest)

process

public void process(DeleteBranchRequest request)
Process a request to delete a branch at a specified location.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the delete request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.DeleteBranchRequest)

process

public void process(MoveBranchRequest request)
Process a request to move a branch at a specified location into a different location.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the move request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.MoveBranchRequest)

process

public void process(RenameNodeRequest request)
Process a request to rename a node specified location into a different location.

This method does nothing if the request is null. Unless overridden, this method converts the rename into a move. However, this only works if the request has a path for its location. (If not, this method throws an UnsupportedOperationException and must be overridden.)

Overrides:
process in class RequestProcessor
Parameters:
request - the rename request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.RenameNodeRequest)

process

public void process(VerifyWorkspaceRequest request)
Process a request to verify a named workspace.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.VerifyWorkspaceRequest)

process

public void process(GetWorkspacesRequest request)
Process a request to get the information about the available workspaces.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.GetWorkspacesRequest)

process

public void process(CloneWorkspaceRequest request)
Process a request to clone an existing workspace as a new workspace.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.CloneWorkspaceRequest)

process

public void process(CreateWorkspaceRequest request)
Process a request to create a new workspace.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.CreateWorkspaceRequest)

process

public void process(DestroyWorkspaceRequest request)
Process a request to permanently destroy a workspace.

This method does nothing if the request is null.

Specified by:
process in class RequestProcessor
Parameters:
request - the request
See Also:
RequestProcessor.process(org.jboss.dna.graph.request.DestroyWorkspaceRequest)

getDefaultWorkspace

public org.tmatesoft.svn.core.io.SVNRepository getDefaultWorkspace()
Get the repository driver.

Returns:
repository

getLatestRevision

public long getLatestRevision(org.tmatesoft.svn.core.io.SVNRepository repos)
                       throws Exception
Get the last revision.

Parameters:
repos -
Returns:
the last revision number.
Throws:
Exception

addDirectory

public ScmAction addDirectory(String root,
                              String path)

Specified by:
addDirectory in interface ScmActionFactory
See Also:
ScmActionFactory.addDirectory(java.lang.String, java.lang.String)

addFile

public ScmAction addFile(String path,
                         String file,
                         byte[] content)

Specified by:
addFile in interface ScmActionFactory
See Also:
ScmActionFactory.addFile(java.lang.String, java.lang.String, byte[])

copyDirectory

public ScmAction copyDirectory(String path,
                               String newPath,
                               long revision)

Specified by:
copyDirectory in interface ScmActionFactory
See Also:
ScmActionFactory.copyDirectory(java.lang.String, java.lang.String, long)

deleteDirectory

public ScmAction deleteDirectory(String path)

Specified by:
deleteDirectory in interface ScmActionFactory
See Also:
ScmActionFactory.deleteDirectory(java.lang.String)

deleteFile

public ScmAction deleteFile(String path,
                            String file)

Specified by:
deleteFile in interface ScmActionFactory
See Also:
ScmActionFactory.deleteFile(java.lang.String, java.lang.String)


Copyright © 2008-2009 JBoss, a division of Red Hat. All Rights Reserved.