View Javadoc

1   /*
2    * #%L
3    * JavaHg
4    * %%
5    * Copyright (C) 2011 aragost Trifork ag
6    * %%
7    * Permission is hereby granted, free of charge, to any person obtaining a copy
8    * of this software and associated documentation files (the "Software"), to deal
9    * in the Software without restriction, including without limitation the rights
10   * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11   * copies of the Software, and to permit persons to whom the Software is
12   * furnished to do so, subject to the following conditions:
13   * 
14   * The above copyright notice and this permission notice shall be included in
15   * all copies or substantial portions of the Software.
16   * 
17   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23   * THE SOFTWARE.
24   * #L%
25   */
26  
27  /*
28   * Automatically generated based on Mercurial 2.2.1.
29   *
30   * Don't edit this file! Edit scripts/generate-flag-classes.py instead.
31   */
32  package com.aragost.javahg.commands.flags;
33  
34  import com.aragost.javahg.DateTime;
35  
36  import com.aragost.javahg.Repository;
37  import com.aragost.javahg.commands.TagCommand;
38  import com.aragost.javahg.internals.AbstractCommand;
39  
40  public abstract class TagCommandFlags extends AbstractCommand {
41  
42      protected TagCommandFlags(Repository repository) {
43          super(repository);
44      }
45  
46      @Override
47      public final String getCommandName() {
48          return "tag";
49      }
50  
51      public static TagCommand on(Repository repository) {
52          return new TagCommand(repository);
53      }
54  
55      /**
56       * Set the <tt>--force</tt> command line flag.
57       * 
58       * @see <a
59       *      href="http://www.selenic.com/mercurial/hg.1.html#tag">Mercurial
60       *      documentation</a>
61       * @return this instance
62       */
63      public TagCommand force() {
64          cmdAppend("--force");
65          return (TagCommand) this;
66      }
67  
68      /**
69       * Set the <tt>--local</tt> command line flag.
70       * 
71       * @see <a
72       *      href="http://www.selenic.com/mercurial/hg.1.html#tag">Mercurial
73       *      documentation</a>
74       * @return this instance
75       */
76      public TagCommand local() {
77          cmdAppend("--local");
78          return (TagCommand) this;
79      }
80  
81      /**
82       * Set the <tt>--rev</tt> command line flag.
83       * 
84       * @see <a
85       *      href="http://www.selenic.com/mercurial/hg.1.html#tag">Mercurial
86       *      documentation</a>
87       * @return this instance
88       */
89      public TagCommand rev(String rev) {
90          cmdAppend("--rev", rev);
91          return (TagCommand) this;
92      }
93  
94      /**
95       * Set the <tt>--remove</tt> command line flag.
96       * 
97       * @see <a
98       *      href="http://www.selenic.com/mercurial/hg.1.html#tag">Mercurial
99       *      documentation</a>
100      * @return this instance
101      */
102     public TagCommand remove() {
103         cmdAppend("--remove");
104         return (TagCommand) this;
105     }
106 
107     /**
108      * Set the <tt>--message</tt> command line flag.
109      * 
110      * @see <a
111      *      href="http://www.selenic.com/mercurial/hg.1.html#tag">Mercurial
112      *      documentation</a>
113      * @return this instance
114      */
115     public TagCommand message(String text) {
116         cmdAppend("--message", text);
117         return (TagCommand) this;
118     }
119 
120     /**
121      * Set the <tt>--date</tt> command line flag.
122      * 
123      * @see <a
124      *      href="http://www.selenic.com/mercurial/hg.1.html#tag">Mercurial
125      *      documentation</a>
126      * @return this instance
127      */
128     public TagCommand date(DateTime date) {
129         cmdAppend("--date", date);
130         return (TagCommand) this;
131     }
132 
133     /**
134      * Set the <tt>--user</tt> command line flag.
135      * 
136      * @see <a
137      *      href="http://www.selenic.com/mercurial/hg.1.html#tag">Mercurial
138      *      documentation</a>
139      * @return this instance
140      */
141     public TagCommand user(String user) {
142         cmdAppend("--user", user);
143         return (TagCommand) this;
144     }
145 
146 }