View Javadoc

1   /*
2    *  LICENSE
3    *
4    * "THE BEER-WARE LICENSE" (Revision 43):
5    * "Sven Strittmatter" <weltraumschaf@googlemail.com> wrote this file.
6    * As long as you retain this notice you can do whatever you want with
7    * this stuff. If we meet some day, and you think this stuff is worth it,
8    * you can buy me a non alcohol-free beer in return.
9    *
10   * Copyright (C) 2012 "Sven Strittmatter" <weltraumschaf@googlemail.com>
11   */
12  package org.jenkinsci.plugins.darcs.cmd;
13  
14  /**
15   * Main entry point.
16   *
17   * This builder creates the concrete sub builders of Darcs commands,
18   * such as pull, get, changes etc.
19   *
20   * @author Sven Strittmatter <weltraumschaf@googlemail.com>
21   */
22  public final class DarcsCommandBuilder extends DarcsBaseCommandBuilder {
23  
24      /**
25       * Not instantiated outside of package.
26       *
27       * @param darcsExe name of Darcs executable, e.g. "darcs" or "/usr/local/bin/darcs"
28       */
29      DarcsCommandBuilder(final String darcsExe) {
30          super(darcsExe);
31      }
32  
33      /**
34       * Create sub builder to build `darcs changes` command.
35       *
36       * @return always new instance
37       */
38      public DarcsChangesBuilder changes() {
39          return new DarcsChangesBuilder(getDarcsExe());
40      }
41  
42      /**
43       * Create sub builder to build `darcs pull` command.
44       *
45       * @return always new instance
46       */
47      public DarcsPullBuilder pull() {
48          return new DarcsPullBuilder(getDarcsExe());
49      }
50  
51      /**
52       * Create sub builder to build `darcs get` command.
53       *
54       * @return always new instance
55       */
56      public DarcsGetBuilder get() {
57          return new DarcsGetBuilder(getDarcsExe());
58      }
59  
60  }