001: package org.andromda.cartridges.jsf;
002:
003: /**
004: * Stores globals for the JSF cartridge metafacades.
005: *
006: * @author Chad Brandon
007: */
008: public class JSFGlobals {
009:
010: /**
011: * Denotes the way application resource messages ought to be generated.
012: * When messages are normalized it means that elements with the same name
013: * will reuse the same label, even if they are located in entirely different
014: * use-cases or pages.
015: * <p/>
016: * This results in resource bundles that are not only smaller in size but
017: * also more straightforward to translate. The downside is that it will be
018: * less evident to customize labels for certain fields (which is rarely the
019: * case anyway).
020: * <p/>
021: */
022: public static final String NORMALIZE_MESSAGES = "normalizeMessages";
023:
024: /**
025: * The pattern for constructing the form name.
026: */
027: public static final String FORM_PATTERN = "formPattern";
028:
029: /**
030: * Contains the default value for whether or not all forwards should perform a HTTP redirect or not.
031: */
032: public static final String DEFAULT_ACTION_REDIRECT = "defaultActionRedirect";
033:
034: /**
035: * The pattern for constructing the form implementation name.
036: */
037: public static final String FORM_IMPLEMENTATION_PATTERN = "formImplementationPattern";
038:
039: /**
040: * The pattern for constructing the bean name under which the form is stored.
041: */
042: public static final String FORM_BEAN_PATTERN = "formBeanPattern";
043:
044: /**
045: * Stores the default form scope which can be overriden with a tagged value.
046: */
047: public static final String FORM_SCOPE = "formScope";
048:
049: /**
050: * Stores the pattern used for constructing the controller implementation name.
051: */
052: public static final String CONTROLLER_IMPLEMENTATION_PATTERN = "controllerImplementationPattern";
053:
054: /**
055: * The suffix given to title message keys.
056: */
057: public static final String TITLE_MESSAGE_KEY_SUFFIX = "title";
058:
059: /**
060: * The suffix given to the documentation message keys.
061: */
062: public static final String DOCUMENTATION_MESSAGE_KEY_SUFFIX = "documentation";
063:
064: /**
065: * The namespace property used to identify the pattern used to construct the backend service's accessor.
066: */
067: public static final String SERVICE_ACCESSOR_PATTERN = "serviceAccessorPattern";
068:
069: /**
070: * The namespace property used to identify the pattern used to construct the backend service's package name.
071: */
072: public static final String SERVICE_PACKAGE_NAME_PATTERN = "servicePackageNamePattern";
073:
074: /**
075: * Represents a hyperlink action type.
076: */
077: public static final String ACTION_TYPE_HYPERLINK = "hyperlink";
078:
079: /**
080: * Represents a popup action type.
081: */
082: public static final String VIEW_TYPE_POPUP = "popup";
083:
084: /**
085: * Represents a form action type.
086: */
087: public static final String ACTION_TYPE_FORM = "form";
088:
089: /**
090: * Represents a table action type.
091: */
092: public static final String ACTION_TYPE_TABLE = "table";
093:
094: /**
095: * Represents an image action type.
096: */
097: public static final String ACTION_TYPE_IMAGE = "image";
098:
099: /**
100: * Stores the default date format when dates are formatted.
101: */
102: public static final String PROPERTY_DEFAULT_DATEFORMAT = "defaultDateFormat";
103:
104: /**
105: * Stores the default time format when times are formatted.
106: */
107: public static final String PROPERTY_DEFAULT_TIMEFORMAT = "defaultTimeFormat";
108:
109: /**
110: * The default key under which the action form is stored.
111: */
112: public static final String ACTION_FORM_KEY = "actionFormKey";
113:
114: /**
115: * The pattern used for constructing the name of the filter that performs view form population.
116: */
117: public static final String VIEW_POPULATOR_PATTERN = "viewPopulatorPattern";
118:
119: /**
120: * The pattern used for constructing a parameter's backing list name. A backing list
121: * is used when you want to select the value of the parameter from a list (typically
122: * used for drop-down select input types).
123: */
124: public static final String BACKING_LIST_PATTERN = "backingListPattern";
125:
126: /**
127: * The pattern used for constructing a parameter's backing value name. A backing value
128: * is used when you want to select and submit values from a regular table (works well when
129: * you have a list of complex items with values you need to submit).
130: */
131: public static final String BACKING_VALUE_PATTERN = "backingValuePattern";
132:
133: /**
134: * The pattern used for constructing the label list name (stores the list
135: * of possible parameter value labels).
136: */
137: public static final String LABEL_LIST_PATTERN = "labelListPattern";
138:
139: /**
140: * The pattern used for constructing the values list name (stores the list of
141: * possible parameter values when selecting from a list).
142: */
143: public static final String VALUE_LIST_PATTERN = "valueListPattern";
144:
145: /**
146: * The item count for dummy arrays.
147: */
148: public static final int DUMMY_ARRAY_COUNT = 5;
149:
150: /**
151: * The pattern used for constructing the name of JSF converter classes (i.e.
152: * the enumeration converter).
153: */
154: public static final String CONVERTER_PATTERN = "converterPattern";
155:
156: /**
157: * The "textarea" form input type.
158: */
159: public static final String INPUT_TEXTAREA = "textarea";
160:
161: /**
162: * The "select" form input type.
163: */
164: public static final String INPUT_SELECT = "select";
165:
166: /**
167: * The "password" form input type.
168: */
169: public static final String INPUT_PASSWORD = "password";
170:
171: /**
172: * The "hidden" form input type.
173: */
174: public static final String INPUT_HIDDEN = "hidden";
175:
176: /**
177: * The "radio" form input type.
178: */
179: public static final String INPUT_RADIO = "radio";
180:
181: /**
182: * The "text" form input type.
183: */
184: public static final String INPUT_TEXT = "text";
185:
186: /**
187: * The "multibox" form input type.
188: */
189: public static final String INPUT_MULTIBOX = "multibox";
190:
191: /**
192: * The "table" form input type.
193: */
194: public static final String INPUT_TABLE = "table";
195:
196: /**
197: * The "checkbox" form input type.
198: */
199: public static final String INPUT_CHECKBOX = "checkbox";
200:
201: /**
202: * The "plain text" type.
203: */
204: public static final String PLAIN_TEXT = "plaintext";
205:
206: /**
207: * The suffix to append to the forward name.
208: */
209: public static final String USECASE_FORWARD_NAME_SUFFIX = "-usecase";
210: }
|