1 // license-header java merge-point 2 // 3 // Attention: generated code (by Metafacade.vsl) - do not modify! 4 // 5 package org.andromda.cartridges.jsf.metafacades; 6 7 import java.util.Collection; 8 import org.andromda.metafacades.uml.AttributeFacade; 9 import org.andromda.metafacades.uml.FrontEndParameter; 10 import org.andromda.metafacades.uml.ParameterFacade; 11 12 /** 13 * Represents an attribute on a classifier used by a JSF application. 14 * 15 * Metafacade interface to be used by AndroMDA cartridges. 16 */ 17 public interface JSFAttribute 18 extends AttributeFacade 19 { 20 /** 21 * Indicates the metafacade type (used for metafacade mappings). 22 * 23 * @return boolean always <code>true</code> 24 */ 25 public boolean isJSFAttributeMetaType(); 26 27 /** 28 * Gets backing list name for this attribute. This is useful if you want to be able to select 29 * the attribute value from a list (i.e. a drop-down select input type). 30 * @param ownerParameter ParameterFacade 31 * @return String 32 */ 33 public String getBackingListName(ParameterFacade ownerParameter); 34 35 /** 36 * Constructs and returns the backing value name given the 'ownerParameter'. 37 * @param ownerParameter ParameterFacade 38 * @return String 39 */ 40 public String getBackingValueName(ParameterFacade ownerParameter); 41 42 /** 43 * Gets the name of the date formatter for this attribute by constructing the name from the 44 * 'ownerParameter' (if this attribute represents a date). 45 * @param ownerParameter JSFParameter 46 * @return String 47 */ 48 public String getDateFormatter(JSFParameter ownerParameter); 49 50 /** 51 * The dummy value to give the attribute when creating a dummy instance of this attribute's 52 * owner. 53 * @return String 54 */ 55 public String getDummyValue(); 56 57 /** 58 * Gets the unique id of this attribute on the form. 59 * @param ownerParameter ParameterFacade 60 * @return String 61 */ 62 public String getFormPropertyId(ParameterFacade ownerParameter); 63 64 /** 65 * Retrieves the name of the form property for this attribute by taking the name of the owner 66 * property. 67 * @param ownerParameter ParameterFacade 68 * @return String 69 */ 70 public String getFormPropertyName(ParameterFacade ownerParameter); 71 72 /** 73 * If this attributes represents a date or time this method will return the format in which it 74 * must be represented. In the event this format has not been specified by the any tagged value 75 * the default will be used. 76 * @return String 77 */ 78 public String getFormat(); 79 80 /** 81 * A comma separated list of the input table identifier columns (these are the columns that 82 * uniquely define a row in an input table). 83 * @return String 84 */ 85 public String getInputTableIdentifierColumns(); 86 87 /** 88 * Gets the name of the label list for this parameter. The label list name is the name of the 89 * list storing the labels for the possible values of this attribute (typically used for the 90 * labels of a drop-down select lists). 91 * @param ownerParameter ParameterFacade 92 * @return String 93 */ 94 public String getLabelListName(ParameterFacade ownerParameter); 95 96 /** 97 * The max length allowed in the input component 98 * @return String 99 */ 100 public String getMaxLength(); 101 102 /** 103 * The message key for this attribute. 104 * @return String 105 */ 106 public String getMessageKey(); 107 108 /** 109 * The default value for the message key. 110 * @return String 111 */ 112 public String getMessageValue(); 113 114 /** 115 * Gets the name of the time formatter (if this parameter represents a time). 116 * @param ownerParameter JSFParameter 117 * @return String 118 */ 119 public String getTimeFormatter(JSFParameter ownerParameter); 120 121 /** 122 * The validator's 'validwhen' value, this is useful when the validation of a parameter depends 123 * on the validation of others. See the apache commons-validator documentation for more 124 * information. 125 * @return String 126 */ 127 public String getValidWhen(); 128 129 /** 130 * Gets the arguments for this parameter's validators. 131 * @param validatorType String 132 * @return Collection 133 */ 134 public Collection getValidatorArgs(String validatorType); 135 136 /** 137 * All validator types for this attribute. 138 * @return Collection 139 */ 140 public Collection getValidatorTypes(); 141 142 /** 143 * Gets the validator args for this attribute 144 * @param ownerParameter JSFParameter 145 * @return Collection 146 */ 147 public Collection getValidatorVars(JSFParameter ownerParameter); 148 149 /** 150 * The dummy value for a value list. 151 * @return String 152 */ 153 public String getValueListDummyValue(); 154 155 /** 156 * Gets the name of the value list for this parameter; this list stores the possible values that 157 * this attribute may be (typically used for the values of a drop-down select list). 158 * @param ownerParameter ParameterFacade 159 * @return String 160 */ 161 public String getValueListName(ParameterFacade ownerParameter); 162 163 /** 164 * Indicates whether or not the backing value is required for this attribute (depending on the 165 * 'ownerParameter'). 166 * @param ownerParameter FrontEndParameter 167 * @return boolean 168 */ 169 public boolean isBackingValueRequired(FrontEndParameter ownerParameter); 170 171 /** 172 * Indicates whether or not this parameter uses the equal validator. 173 * @return boolean 174 */ 175 public boolean isEqualValidator(); 176 177 /** 178 * Indicates if this parameter represents a checkbox widget. 179 * @return boolean 180 */ 181 public boolean isInputCheckbox(); 182 183 /** 184 * Indicates whether or not this is a file input type. 185 * @return boolean 186 */ 187 public boolean isInputFile(); 188 189 /** 190 * Indicates whether or not this parameter represents a hidden input widget. 191 * @return boolean 192 */ 193 public boolean isInputHidden(); 194 195 /** 196 * Indicates whether or not this type represents an input multibox. 197 * @return boolean 198 */ 199 public boolean isInputMultibox(); 200 201 /** 202 * Indicates whether or not this parameter should be rendered as an input radio widget. 203 * @return boolean 204 */ 205 public boolean isInputRadio(); 206 207 /** 208 * Indicates whether or not this parameter represents an input "secret" widget (i.e. password). 209 * @return boolean 210 */ 211 public boolean isInputSecret(); 212 213 /** 214 * Indicates whether or not this parameter represents an input select widget. 215 * @return boolean 216 */ 217 public boolean isInputSelect(); 218 219 /** 220 * Indicates whether or not this is an table input type. 221 * @return boolean 222 */ 223 public boolean isInputTable(); 224 225 /** 226 * Indicates whether or not this parameter should be rendered as a text input widget. 227 * @return boolean 228 */ 229 public boolean isInputText(); 230 231 /** 232 * Indicates if this parameter represents as an input text area widget. 233 * @return boolean 234 */ 235 public boolean isInputTextarea(); 236 237 /** 238 * Indicates whether or not there is an input type defined for this attribute. 239 * @return boolean 240 */ 241 public boolean isInputTypePresent(); 242 243 /** 244 * Indicates whether or not this attribute's value should be rendered as plain text (not as a 245 * widget). 246 * @return boolean 247 */ 248 public boolean isPlaintext(); 249 250 /** 251 * Indicates whether or not this attribute is selectable according to its 'ownerParameter'. 252 * @param ownerParameter FrontEndParameter 253 * @return boolean 254 */ 255 public boolean isSelectable(FrontEndParameter ownerParameter); 256 257 /** 258 * Indicates where or not the date format is to be strictly respected. Otherwise the date 259 * formatter used for the representation of this date is to be set to lenient. 260 * @return boolean 261 */ 262 public boolean isStrictDateFormat(); 263 264 /** 265 * Indicates whether or not this attribute requires some kind of validation (the collection of 266 * validator types is not empty). 267 * @return boolean 268 */ 269 public boolean isValidationRequired(); 270 }