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 versions for a product. 20 */ 21 public interface AddVersionCommand extends Command<AddVersionCommand> 22 { 23 // ********************************* Fields ********************************* 24 25 // --- constants ------------------------------------------------------------ 26 27 // ****************************** Initializer ******************************* 28 29 // ****************************** Inner Classes ***************************** 30 31 /** 32 * Defines parameters for the {@link AddVersionCommand}. 33 */ 34 public static enum Parameter implements CommandParameter<AddVersionCommand> 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 version to be added. 50 */ 51 VERSION("version"), 52 53 /** 54 * The token generated for the previous command. 55 */ 56 TOKEN("token"); 57 58 // ******************************** Fields ******************************** 59 60 // --- constants ---------------------------------------------------------- 61 62 // --- members ------------------------------------------------------------ 63 64 /** 65 * The name of the parameter. 66 * <p> 67 * The value of this constant is {@value}. 68 */ 69 private final String name; 70 71 // ***************************** Constructors ***************************** 72 73 /** 74 * Default constructor. 75 * 76 * @param name the name of the parameter. 77 */ 78 private Parameter(final String name) 79 { 80 this.name = name; 81 } 82 83 // ******************************** Methods ******************************* 84 85 // --- init --------------------------------------------------------------- 86 87 // --- get&set ------------------------------------------------------------ 88 89 /** 90 * Returns the name of the parameter. 91 * 92 * @return the name of the parameter. 93 */ 94 public String getName() 95 { 96 return name; 97 } 98 99 // --- business ----------------------------------------------------------- 100 101 // --- object basics ------------------------------------------------------ 102 103 /** 104 * {@inheritDoc} 105 * 106 * @see java.lang.Enum#toString() 107 */ 108 @Override 109 public String toString() 110 { 111 return name; 112 } 113 } 114 115 // ********************************* Methods ******************************** 116 117 // --- get&set -------------------------------------------------------------- 118 119 // --- business ------------------------------------------------------------- 120 121 // --- object basics -------------------------------------------------------- 122 123 }