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 add a new product.
20   */
21  public interface AddProductCommand extends Command<AddProductCommand>
22  {
23    // ********************************* Fields *********************************
24  
25    // --- constants ------------------------------------------------------------
26  
27    // ****************************** Initializer *******************************
28  
29    // ****************************** Inner Classes *****************************
30  
31    /**
32     * Defines parameters for the {@link AddProductCommand}.
33     */
34    public static enum Parameter implements CommandParameter<AddProductCommand>
35    {
36      // ***************************** Enumeration ******************************
37  
38      /**
39       * The action identifier by the service on the target server.
40       */
41      ACTION("action"),
42  
43      /**
44       * The classification for the product.
45       */
46      CLASSIFICATION("classification"),
47  
48      /**
49       * The product to add the version to.
50       */
51      PRODUCT("product"),
52  
53      /**
54       * The description to the product.
55       */
56      DESCRIPTION("description"),
57  
58      /**
59       * The initial default milestone of the product.
60       */
61      DEFAULT_MILESTONE("defaultmilestone"),
62  
63      /**
64       * The version to be added.
65       */
66      VERSION("version"),
67  
68      /**
69       * The activation status of the product. If set to <code>true</code> issues
70       * may be added, otherwise not.
71       */
72      IS_ACTIVE("is_active"),
73  
74      /**
75       * The token generated for the previous command.
76       */
77      TOKEN("token"),
78  
79      /**
80       * The mandatory component for the product.
81       */
82      COMPONENT("component"),
83  
84      /**
85       * The description to component.
86       */
87      COMPONENT_DESCRIPTION("comp_desc"),
88  
89      /**
90       * The initial owner of new issues for the component.
91       */
92      COMPONENT_INITIAL_OWNER("initialowner");
93  
94      // ******************************** Fields ********************************
95  
96      // --- constants ----------------------------------------------------------
97  
98      // --- members ------------------------------------------------------------
99  
100     /**
101      * The name of the parameter.
102      * <p>
103      * The value of this constant is {@value}.
104      */
105     private final String name;
106 
107     // ***************************** Constructors *****************************
108 
109     /**
110      * Default constructor.
111      *
112      * @param name the name of the parameter.
113      */
114     private Parameter(final String name)
115     {
116       this.name = name;
117     }
118 
119     // ******************************** Methods *******************************
120 
121     // --- init ---------------------------------------------------------------
122 
123     // --- get&set ------------------------------------------------------------
124 
125     /**
126      * Returns the name of the parameter.
127      *
128      * @return the name of the parameter.
129      */
130     public String getName()
131     {
132       return name;
133     }
134 
135     // --- business -----------------------------------------------------------
136 
137     // --- object basics ------------------------------------------------------
138 
139     /**
140      * {@inheritDoc}
141      *
142      * @see java.lang.Enum#toString()
143      */
144     @Override
145     public String toString()
146     {
147       return name;
148     }
149   }
150 
151   // ********************************* Methods ********************************
152 
153   // --- get&set --------------------------------------------------------------
154 
155   // --- business -------------------------------------------------------------
156 
157   // --- object basics --------------------------------------------------------
158 
159 }