001// license-header java merge-point
002//
003// Attention: generated code (by Metafacade.vsl) - do not modify!
004//
005package org.andromda.cartridges.jsf.metafacades;
006
007import java.util.Collection;
008import org.andromda.metafacades.uml.AttributeFacade;
009import org.andromda.metafacades.uml.FrontEndParameter;
010import org.andromda.metafacades.uml.ParameterFacade;
011
012/**
013 * Represents an attribute on a classifier used by a JSF application.
014 *
015 * Metafacade interface to be used by AndroMDA cartridges.
016 */
017public interface JSFAttribute
018    extends AttributeFacade
019{
020    /**
021     * Indicates the metafacade type (used for metafacade mappings).
022     *
023     * @return boolean always <code>true</code>
024     */
025    public boolean isJSFAttributeMetaType();
026
027    /**
028     * Gets backing list name for this attribute. This is useful if you want to be able to select
029     * the attribute value from a list (i.e. a drop-down select input type).
030     * @param ownerParameter ParameterFacade
031     * @return String
032     */
033    public String getBackingListName(ParameterFacade ownerParameter);
034
035    /**
036     * Constructs and returns the backing value name given the 'ownerParameter'.
037     * @param ownerParameter ParameterFacade
038     * @return String
039     */
040    public String getBackingValueName(ParameterFacade ownerParameter);
041
042    /**
043     * Gets the name of the date formatter for this attribute by constructing the name from the
044     * 'ownerParameter' (if this attribute represents a date).
045     * @param ownerParameter JSFParameter
046     * @return String
047     */
048    public String getDateFormatter(JSFParameter ownerParameter);
049
050    /**
051     * The dummy value to give the attribute when creating a dummy instance of this attribute's
052     * owner.
053     * @return String
054     */
055    public String getDummyValue();
056
057    /**
058     * Gets the unique id of this attribute on the form.
059     * @param ownerParameter ParameterFacade
060     * @return String
061     */
062    public String getFormPropertyId(ParameterFacade ownerParameter);
063
064    /**
065     * Retrieves the name of the form property for this attribute by taking the name of the owner
066     * property.
067     * @param ownerParameter ParameterFacade
068     * @return String
069     */
070    public String getFormPropertyName(ParameterFacade ownerParameter);
071
072    /**
073     * If this attributes represents a date or time this method will return the format in which it
074     * must be represented. In the event this format has not been specified by the any tagged value
075     * the default will be used.
076     * @return String
077     */
078    public String getFormat();
079
080    /**
081     * A comma separated list of the input table identifier columns (these are the columns that
082     * uniquely define a row in an input table).
083     * @return String
084     */
085    public String getInputTableIdentifierColumns();
086
087    /**
088     * Gets the name of the label list for this parameter. The label list name is the name of the
089     * list storing the labels for the possible values of this attribute (typically used for the
090     * labels of a drop-down select lists).
091     * @param ownerParameter ParameterFacade
092     * @return String
093     */
094    public String getLabelListName(ParameterFacade ownerParameter);
095
096    /**
097     * The max length allowed in the input component
098     * @return String
099     */
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}