1 /* 2 * Copyright 2012 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 // ******************************** Fields ******************************** 80 81 // --- constants ---------------------------------------------------------- 82 83 // --- members ------------------------------------------------------------ 84 85 /** 86 * The name of the parameter. 87 * <p> 88 * The value of this constant is {@value}. 89 */ 90 private final String name; 91 92 // ***************************** Constructors ***************************** 93 94 /** 95 * Default constructor. 96 * 97 * @param name the name of the parameter. 98 */ 99 private Parameter(final String name) 100 { 101 this.name = name; 102 } 103 104 // ******************************** Methods ******************************* 105 106 // --- init --------------------------------------------------------------- 107 108 // --- get&set ------------------------------------------------------------ 109 110 /** 111 * Returns the name of the parameter. 112 * 113 * @return the name of the parameter. 114 */ 115 public String getName() 116 { 117 return name; 118 } 119 120 // --- business ----------------------------------------------------------- 121 122 // --- object basics ------------------------------------------------------ 123 124 /** 125 * {@inheritDoc} 126 * 127 * @see java.lang.Enum#toString() 128 */ 129 @Override 130 public String toString() 131 { 132 return name; 133 } 134 } 135 136 // ********************************* Methods ******************************** 137 138 // --- get&set -------------------------------------------------------------- 139 140 // --- business ------------------------------------------------------------- 141 142 // --- object basics -------------------------------------------------------- 143 144 }