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