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 component to a product. 20 */ 21 public interface AddComponentCommand extends Command<AddComponentCommand> 22 { 23 // ********************************* Fields ********************************* 24 25 // --- constants ------------------------------------------------------------ 26 27 // http://tasks.smartics.de/editcomponents.cgi?product=X 28 // http://tasks.smartics.de/editcomponents.cgi?action=add&product=X 29 30 // ****************************** Initializer ******************************* 31 32 // ****************************** Inner Classes ***************************** 33 34 /** 35 * Defines parameters for the {@link AddComponentCommand}. 36 */ 37 public static enum Parameter implements CommandParameter<AddComponentCommand> 38 { 39 // ***************************** Enumeration ****************************** 40 41 /** 42 * The action identifier by the service on the target server. 43 */ 44 ACTION("action"), 45 46 /** 47 * The product to add the version to. 48 */ 49 PRODUCT("product"), 50 51 /** 52 * The classification for the product. 53 */ 54 COMPONENT("component"), 55 56 /** 57 * The description to the product. 58 */ 59 DESCRIPTION("description"), 60 61 /** 62 * The initial owner of new issues. 63 */ 64 INITIAL_OWNER("initialowner"), 65 66 /** 67 * The token generated for the previous command. 68 */ 69 TOKEN("token"); 70 71 // ******************************** Fields ******************************** 72 73 // --- constants ---------------------------------------------------------- 74 75 // --- members ------------------------------------------------------------ 76 77 /** 78 * The name of the parameter. 79 * <p> 80 * The value of this constant is {@value}. 81 */ 82 private final String name; 83 84 // ***************************** Constructors ***************************** 85 86 /** 87 * Default constructor. 88 * 89 * @param name the name of the parameter. 90 */ 91 private Parameter(final String name) 92 { 93 this.name = name; 94 } 95 96 // ******************************** Methods ******************************* 97 98 // --- init --------------------------------------------------------------- 99 100 // --- get&set ------------------------------------------------------------ 101 102 /** 103 * Returns the name of the parameter. 104 * 105 * @return the name of the parameter. 106 */ 107 public String getName() 108 { 109 return name; 110 } 111 112 // --- business ----------------------------------------------------------- 113 114 // --- object basics ------------------------------------------------------ 115 116 /** 117 * {@inheritDoc} 118 * 119 * @see java.lang.Enum#toString() 120 */ 121 @Override 122 public String toString() 123 { 124 return name; 125 } 126 } 127 128 // ********************************* Methods ******************************** 129 130 // --- get&set -------------------------------------------------------------- 131 132 // --- business ------------------------------------------------------------- 133 134 // --- object basics -------------------------------------------------------- 135 136 }