org.jenkinsci.plugins.darcs.cmd
Class DarcsChangesBuilder

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

public class DarcsChangesBuilder
extends DarcsBaseCommandBuilder
implements DarcsCommandCreator

Builder for `darcs changes` command. Examples:

 `darcs changes --repo=REPDIR --xml-output [--summary] [--last=N]`
 `darcs changes --repo=REPDIR --count`
 

Author:
Sven Strittmatter

Field Summary
private static String COMMAND
          Darcs subcommand.
private  boolean count
          Whether to count patches.
private  int last
          How many last changes.
private  String repoDir
          Where to pull in.
private  boolean summary
          Whether to print summary.
private  boolean xmlOutput
          Whether to create XML output.
 
Constructor Summary
DarcsChangesBuilder(String darcsExe)
          Initializes the DarcsBaseCommandBuilder.command with "changes".
 
Method Summary
 DarcsChangesBuilder count()
          Switch patch count on.
 DarcsCommand create()
          Create the parameterized command object.
 DarcsChangesBuilder last(int amount)
          How many last patches to show changes for.
 DarcsChangesBuilder repoDir(String directory)
          Directory of repository to pull in.
 DarcsChangesBuilder summary()
          Switch summary output on.
 DarcsChangesBuilder xmlOutput()
          Switch XML output on.
 
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

repoDir

private String repoDir
Where to pull in.


xmlOutput

private boolean xmlOutput
Whether to create XML output.


summary

private boolean summary
Whether to print summary.


count

private boolean count
Whether to count patches.


last

private int last
How many last changes.

Constructor Detail

DarcsChangesBuilder

DarcsChangesBuilder(String darcsExe)
Initializes the DarcsBaseCommandBuilder.command with "changes".

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

repoDir

public DarcsChangesBuilder 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

xmlOutput

public DarcsChangesBuilder xmlOutput()
Switch XML output on.

Returns:
the builder itself

summary

public DarcsChangesBuilder summary()
Switch summary output on.

Returns:
the builder itself

count

public DarcsChangesBuilder count()
Switch patch count on. If count is on all other options except repoDir will be ignored.

Returns:
the builder itself

last

public DarcsChangesBuilder last(int amount)
How many last patches to show changes for.

Parameters:
amount - amount of last patches
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.