org.apache.maven.scm.provider.perforce.command.checkout
Class PerforceCheckOutCommand

java.lang.Object
  extended by org.apache.maven.scm.command.AbstractCommand
      extended by org.apache.maven.scm.command.checkout.AbstractCheckOutCommand
          extended by org.apache.maven.scm.provider.perforce.command.checkout.PerforceCheckOutCommand
All Implemented Interfaces:
Command, PerforceCommand

public class PerforceCheckOutCommand
extends AbstractCheckOutCommand
implements PerforceCommand

Version:
$Id: PerforceCheckOutCommand.java 1306867 2012-03-29 13:45:10Z olamy $
Author:
Mike Perham

Field Summary
 
Fields inherited from interface org.apache.maven.scm.command.Command
ROLE
 
Constructor Summary
PerforceCheckOutCommand()
           
 
Method Summary
static Commandline createCommandLine(PerforceScmProviderRepository repo, File workingDirectory, ScmVersion version, String specname)
           
protected  CheckOutScmResult executeCheckOutCommand(ScmProviderRepository repo, ScmFileSet files, ScmVersion version, boolean recursive)
          Check out the depot code at repo.getPath() into the target directory at files.getBasedir.
 
Methods inherited from class org.apache.maven.scm.command.checkout.AbstractCheckOutCommand
executeCheckOutCommand, executeCommand
 
Methods inherited from class org.apache.maven.scm.command.AbstractCommand
execute, getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerforceCheckOutCommand

public PerforceCheckOutCommand()
Method Detail

executeCheckOutCommand

protected CheckOutScmResult executeCheckOutCommand(ScmProviderRepository repo,
                                                   ScmFileSet files,
                                                   ScmVersion version,
                                                   boolean recursive)
                                            throws ScmException
Check out the depot code at repo.getPath() into the target directory at files.getBasedir. Perforce does not support arbitrary checkout of versioned source so we need to set up a well-known clientspec which will hold the required info.

1) A clientspec will be created or updated which holds a temporary mapping from the repo path to the target directory. 2) This clientspec is sync'd to pull all the files onto the client

Execute Check out command line.

Specified by:
executeCheckOutCommand in class AbstractCheckOutCommand
Parameters:
repo - not null
files - not null
version - not null
recursive - true if recursive check out is wanted, false otherwise.
Returns:
the checkout result
Throws:
ScmException - if any

createCommandLine

public static Commandline createCommandLine(PerforceScmProviderRepository repo,
                                            File workingDirectory,
                                            ScmVersion version,
                                            String specname)


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.