View Javadoc

1   /*
2    * Copyright 2012-2013 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package de.smartics.maven.issue.command;
17  
18  /**
19   * Defines a command to administrate milestones for a product.
20   */
21  public interface AddMilestoneCommand extends Command<AddMilestoneCommand>
22  {
23    // ********************************* Fields *********************************
24  
25    // --- constants ------------------------------------------------------------
26  
27    // ****************************** Initializer *******************************
28  
29    // ****************************** Inner Classes *****************************
30  
31    /**
32     * Defines parameters for the {@link AddMilestoneCommand}.
33     */
34    public static enum Parameter implements CommandParameter<AddMilestoneCommand>
35    {
36      // ***************************** Enumeration ******************************
37  
38      /**
39       * The action identifier by the service on the target server.
40       */
41      ACTION("action"),
42  
43      /**
44       * The product to add the version to.
45       */
46      PRODUCT("product"),
47  
48      /**
49       * The milestone to be added.
50       */
51      MILESTONE("milestone"),
52  
53      /**
54       * The sortkey of the milestone.
55       */
56      SORTKEY("sortkey"),
57  
58      /**
59       * The token generated for the previous command.
60       */
61      TOKEN("token");
62  
63      // ******************************** Fields ********************************
64  
65      // --- constants ----------------------------------------------------------
66  
67      // --- members ------------------------------------------------------------
68  
69      /**
70       * The name of the parameter.
71       * <p>
72       * The value of this constant is {@value}.
73       */
74      private final String name;
75  
76      // ***************************** Constructors *****************************
77  
78      /**
79       * Default constructor.
80       *
81       * @param name the name of the parameter.
82       */
83      private Parameter(final String name)
84      {
85        this.name = name;
86      }
87  
88      // ******************************** Methods *******************************
89  
90      // --- init ---------------------------------------------------------------
91  
92      // --- get&set ------------------------------------------------------------
93  
94      /**
95       * Returns the name of the parameter.
96       *
97       * @return the name of the parameter.
98       */
99      public String getName()
100     {
101       return name;
102     }
103 
104     // --- business -----------------------------------------------------------
105 
106     // --- object basics ------------------------------------------------------
107 
108     /**
109      * {@inheritDoc}
110      *
111      * @see java.lang.Enum#toString()
112      */
113     @Override
114     public String toString()
115     {
116       return name;
117     }
118   }
119 
120   // ********************************* Methods ********************************
121 
122   // --- get&set --------------------------------------------------------------
123 
124   // --- business -------------------------------------------------------------
125 
126   // --- object basics --------------------------------------------------------
127 
128 }