org.jenkinsci.plugins.darcs.cmd
Class DarcsPullBuilder

java.lang.Object
  extended by org.jenkinsci.plugins.darcs.cmd.DarcsBaseCommandBuilder
      extended by org.jenkinsci.plugins.darcs.cmd.DarcsPullBuilder
All Implemented Interfaces:
DarcsCommandCreator

public class DarcsPullBuilder
extends DarcsBaseCommandBuilder
implements DarcsCommandCreator

Builder for `darcs pull` command. Example: `darcs pull FROM [--repo=REPDIR] [--all] [--verbose]`

Author:
Sven Strittmatter

Field Summary
private  boolean all
          Whether to pull all patches.
private static String COMMAND
          Darcs subcommand.
private  String from
          From where to get.
private  String repoDir
          Where to pull in.
private  boolean verbose
          Whether to use verbose output.
 
Constructor Summary
DarcsPullBuilder(String darcsExe)
          Initializes the DarcsBaseCommandBuilder.command with "pull".
 
Method Summary
 DarcsPullBuilder all()
          Pull all patches.
 DarcsCommand create()
          Create the parameterized command object.
 DarcsPullBuilder from(String location)
          From where to pull into the repository.
 DarcsPullBuilder repoDir(String directory)
          Directory of repository to pull in.
 DarcsPullBuilder verbose()
          Use verbose output.
 
Methods inherited from class org.jenkinsci.plugins.darcs.cmd.DarcsBaseCommandBuilder
createArgumentList, getDarcsExe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMAND

private static final String COMMAND
Darcs subcommand.

See Also:
Constant Field Values

from

private String from
From where to get.


repoDir

private String repoDir
Where to pull in.


all

private boolean all
Whether to pull all patches.


verbose

private boolean verbose
Whether to use verbose output.

Constructor Detail

DarcsPullBuilder

DarcsPullBuilder(String darcsExe)
Initializes the DarcsBaseCommandBuilder.command with "pull".

Parameters:
darcsExe - name of Darcs executable, e.g. "darcs" or "/usr/local/bin/darcs"
Method Detail

from

public DarcsPullBuilder from(String location)
From where to pull into the repository.

Parameters:
location - file or URI
Returns:
the builder itself CHECKSTYLE:OFF
Throws:
IllegalArgumentException - if location is null or empty CHECKSTYLE:ON

repoDir

public DarcsPullBuilder repoDir(String directory)
Directory of repository to pull in.

Parameters:
directory - path to repository
Returns:
the builder itself CHECKSTYLE:OFF
Throws:
IllegalArgumentException - if location is null or empty CHECKSTYLE:ON

all

public DarcsPullBuilder all()
Pull all patches.

Returns:
the builder itself

verbose

public DarcsPullBuilder verbose()
Use verbose output.

Returns:
the builder itself

create

public DarcsCommand create()
Description copied from interface: DarcsCommandCreator
Create the parameterized command object.

Specified by:
create in interface DarcsCommandCreator
Returns:
creates always new instance


Copyright © 2004-2013 weltraumschaf.de. All Rights Reserved.