View Javadoc

1   package org.andromda.metafacades.uml;
2   
3   import org.andromda.core.profile.Profile;
4   
5   /***
6    * Contains the common UML AndroMDA profile. That is, it contains elements "common" to all AndroMDA components (tagged
7    * values, stereotypes, and datatypes).
8    *
9    * @author Chad Brandon
10   */
11  public class UMLProfile
12  {
13      /* ----------------- Stereotypes -------------------- */
14  
15      /***
16       * The Profile instance from which we retrieve the mapped profile names.
17       */
18      private static final Profile profile = Profile.instance();
19  
20      /***
21       * Represents a criteria search.
22       */
23      public static final String STEREOTYPE_CRITERIA = profile.get("CRITERIA");
24  
25      /***
26       * Represents a persistent entity.
27       */
28      public static final String STEREOTYPE_ENTITY = profile.get("ENTITY");
29  
30      /***
31       * Represents an embedded value (typically embedded with an entity as an attribute).
32       */
33      public static final String STEREOTYPE_EMBEDDED_VALUE = profile.get("EMBEDDED_VALUE");
34  
35      /***
36       * Represents a finder method on an entity.
37       */
38      public static final String STEREOTYPE_FINDER_METHOD = profile.get("FINDER_METHOD");
39  
40      /***
41       * Represents the primary key of an entity.
42       */
43      public static final String STEREOTYPE_IDENTIFIER = profile.get("IDENTIFIER");
44  
45      /***
46       * If an attribute has this stereotype, it is considered unique.
47       */
48      public static final String STEREOTYPE_UNIQUE = profile.get("UNIQUE");
49  
50      /***
51       * Represents a service.
52       */
53      public static final String STEREOTYPE_SERVICE = profile.get("SERVICE");
54  
55      /***
56       * Represents a value object.
57       */
58      public static final String STEREOTYPE_VALUE_OBJECT = profile.get("VALUE_OBJECT");
59  
60      /***
61       * <p/>
62       * Represents a web service. Stereotype a class with this stereotype when you want everything on the class to be
63       * exposed as a web service. </p>
64       */
65      public static final java.lang.String STEREOTYPE_WEBSERVICE = profile.get("WEBSERVICE");
66  
67      /***
68       * <p/>
69       * Stereotype an operation on a <code>service</code> if you wish to expose the operation. </p>
70       */
71      public static final java.lang.String STEREOTYPE_WEBSERVICE_OPERATION = profile.get("WEBSERVICE_OPERATION");
72  
73      /***
74       * The base exception stereotype. If a model element is stereotyped with this (or one of its specializations), then
75       * the exception can be generated by a cartridge and a dependency to it from an operation will add a throws clause.
76       */
77      public static final String STEREOTYPE_EXCEPTION = profile.get("EXCEPTION");
78  
79      /***
80       * Represents an enumeration type.
81       */
82      public static final String STEREOTYPE_ENUMERATION = profile.get("ENUMERATION");
83  
84      /***
85       * Represents exceptions thrown during normal application processing (such as business exceptions). It extends the
86       * base exception stereotype.
87       */
88      public static final String STEREOTYPE_APPLICATION_EXCEPTION = profile.get("APPLICATION_EXCEPTION");
89  
90      /***
91       * Represents unexpected exceptions that can occur during application processing. This that a caller isn't expected
92       * to handle.
93       */
94      public static final String STEREOTYPE_UNEXPECTED_EXCEPTION = profile.get("UNEXPECTED_EXCEPTION");
95  
96      /***
97       * Represents a reference to an exception model element. Model dependencies to unstereotyped exception model
98       * elements can be stereotyped with this. This allows the user to create a custom exception class since the
99       * exception itself will not be generated but the references to it will be (i.e. the throws clause within an
100      * operation).
101      */
102     public static final String STEREOTYPE_EXCEPTION_REF = profile.get("EXCEPTION_REF");
103 
104     /***
105      * Used to indicate whether or not a parameter is nullable (since parameters do <strong>NOT </strong> allow
106      * specification of multiplicity.
107      */
108     public static final String STEREOTYPE_NULLABLE = profile.get("NULLABLE");
109 
110     /***
111      * Represents a manageable entity.
112      */
113     public static final String STEREOTYPE_MANAGEABLE = profile.get("MANAGEABLE");
114 
115     /***
116      * Indicates if a persistence type's property is transient.
117      */
118     public static final String STEREOTYPE_TRANSIENT = profile.get("TRANSIENT");
119 
120     /***
121      * Represents a "front end" use case (that is a use case used to model a presentation tier or "front end").
122      */
123     public static final String STEREOTYPE_FRONT_END_USECASE = profile.get("FRONT_END_USE_CASE");
124 
125     /***
126      * Represents a "front end" use case that is the entry point to the presentation tier.
127      */
128     public static final String STEREOTYPE_FRONT_END_APPLICATION = profile.get("FRONT_END_APPLICATION");
129 
130     /***
131      * Represents a "front end" view (that is it can represent a JSP page, etc).
132      */
133     public static final String STEREOTYPE_FRONT_END_VIEW = profile.get("FRONT_END_VIEW");
134 
135     /***
136      * Represents an exception on a "front-end" view.
137      */
138     public static final String STEREOTYPE_FRONT_END_EXCEPTION = profile.get("FRONT_END_EXCEPTION");
139 
140     /* ----------------- Tagged Values -------------------- */
141 
142     /***
143      * Represents documentation stored as a tagged value
144      */
145     public static final String TAGGEDVALUE_DOCUMENTATION = profile.get("DOCUMENTATION");
146 
147     /***
148      * Represents a model hyperlink stored as a tagged value.
149      */
150     public static final String TAGGEDVALUE_MODEL_HYPERLINK = profile.get("MODEL_HYPERLINK");
151 
152     /***
153      * Represents an external hyperlink (a website outside of a model).
154      */
155     public static final String TAGGEDVALUE_EXTERNAL_HYPERLINK = profile.get("EXTERNAL_HYPERLINK");
156 
157     /***
158      * Represents the name of the schema for entity persistence.
159      */
160     public static final String TAGGEDVALUE_PERSISTENCE_SCHEMA = profile.get("PERSISTENCE_SCHEMA");
161 
162     /***
163      * Represents a relational table name for entity persistence.
164      */
165     public static final String TAGGEDVALUE_PERSISTENCE_TABLE = profile.get("PERSISTENCE_TABLE");
166 
167     /***
168      * Represents a relational table column name for entity persistence.
169      */
170     public static final String TAGGEDVALUE_PERSISTENCE_COLUMN = profile.get("PERSISTENCE_COLUMN");
171 
172     /***
173      * Represents a relational table column length
174      */
175     public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_LENGTH = profile.get("PERSISTENCE_COLUMN_LENGTH");
176 
177     /***
178      * Represents a relational table column index name.
179      */
180     public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_INDEX = profile.get("PERSISTENCE_COLUMN_INDEX");
181 
182     /***
183      * Indicates if a persistence type is immutable.
184      */
185     public static final String TAGGEDVALUE_PERSISTENCE_IMMUTABLE = profile.get("PERSISTENCE_IMMUTABLE");
186 
187     /***
188      * Used on an association end to indicate whether its owning entity should have its identifier also be the foreign
189      * key to the related entity.
190      */
191     public static final String TAGGEDVALUE_PERSISTENCE_FOREIGN_IDENTIFIER = profile.get(
192         "PERSISTENCE_FOREIGN_IDENTIFIER");
193 
194     /***
195      * Used on an identifier to indicate whether or not the identifier is <em>assigned</em> (meaning
196      * that the identifier is manually assigned instead of generated.
197      */
198     public static final String TAGGEDVALUE_PERSISTENCE_ASSIGNED_IDENTIFIER = profile.get(
199         "PERSISTENCE_ASSIGNED_IDENTIFIER");
200 
201     /***
202      * Used on an association end to denote to name of the foreign key constraint to use in the database.
203      */
204     public static final String TAGGEDVALUE_PERSISTENCE_FOREIGN_KEY_CONSTRAINT_NAME = profile.get(
205         "PERSISTENCE_FOREIGN_KEY_CONSTRAINT_NAME");
206 
207     /***
208      * Used to assign an enumeration attribute as a member variable rather than a literal.
209      */
210     public static final String TAGGEDVALUE_PERSISTENCE_ENUMERATION_MEMBER_VARIABLE = profile.get(
211         "PERSISTENCE_ENUMERATION_MEMBER_VARIABLE");
212     
213     /***
214      * Used on an enumeration literal to define the enumeration literal parameters.
215      */
216     public static final String TAGGEDVALUE_PERSISTENCE_ENUMERATION_LITERAL_PARAMETERS = profile.get(
217         "PERSISTENCE_ENUMERATION_LITERAL_PARAMETERS");
218     
219     /***
220      * Used to assign the controller to the activity (when it can not be assigned explicity).
221      */
222     public static final String TAGGEDVALUE_PRESENTATION_CONTROLLER_USECASE = profile.get("PRESENTATION_CONTROLLER_USECASE");
223 
224     /***
225      * Used to assign the table columns to a collection/array type parameter representing a table.
226      */
227     public static final String TAGGEDVALUE_PRESENTATION_TABLE_COLUMNS = profile.get("PRESENTATION_TABLE_COLUMNS");
228 
229     /***
230      * Used to indicate whether or not a parameter should be considered a table (used when no
231      * table columns are specified).
232      */
233     public static final String TAGGEDVALUE_PRESENTATION_IS_TABLE = profile.get("PRESENTATION_IS_TABLE");
234 
235     /***
236      * Used to associate an activity to a use case (when it can not be assigned explicitly).
237      */
238     public static final String TAGGEDVALUE_PRESENTATION_USECASE_ACTIVITY = profile.get("PRESENTATION_USECASE_ACTIVITY");
239 
240     /***
241      * Stores the style of a web service (document, wrapped, rpc).
242      */
243     public static final String TAGGEDVALUE_WEBSERVICE_STYLE = profile.get("WEBSERVICE_STYLE");
244 
245     /***
246      * Stores the use of a web service (literal, encoded).
247      */
248     public static final String TAGGEDVALUE_WEBSERVICE_USE = profile.get("WEBSERVICE_USE");
249 
250     /***
251      * Stores the provider of the web service (RPC, EJB).
252      */
253     public static final String TAGGEDVALUE_WEBSERVICE_PROVIDER = profile.get("WEBSERVICE_PROVIDER");
254 
255     /***
256      * Stores the name of the role (if it's different than the name of the actor stereotyped as role)
257      */
258     public static final String TAGGEDVALUE_ROLE_NAME = profile.get("ROLE_NAME");
259 
260     /***
261      * Stores the serial version UID to be used for a class. If not specified, it will be calculated
262      * based on the class signature.
263      *
264      * @see org.andromda.metafacades.uml14.ClassifierFacadeLogicImpl#handleGetSerialVersionUID()
265      */
266     public static final String TAGGEDVALUE_SERIALVERSION_UID = profile.get("SERIALVERSION_UID");
267 
268     /***
269      * The attribute to use when referencing this table from another one.
270      */
271     public static final String TAGGEDVALUE_MANAGEABLE_DISPLAY_NAME = profile.get("MANAGEABLE_DISPLAY_NAME");
272 
273     /***
274      * The maximum number of records to load from the DB at the same time.
275      */
276     public static final String TAGGEDVALUE_MANAGEABLE_MAXIMUM_LIST_SIZE = profile.get("MANAGEABLE_MAXIMUM_LIST_SIZE");
277 
278     /***
279      * The maximum number of records to show at the same time.
280      */
281     public static final String TAGGEDVALUE_MANAGEABLE_PAGE_SIZE = profile.get("MANAGEABLE_PAGE_SIZE");
282 
283     /***
284      * Indicates whether or not the underlying entity keys should be resolved when referencing it.
285      */
286     public static final String TAGGEDVALUE_MANAGEABLE_RESOLVEABLE = profile.get("MANAGEABLE_RESOLVEABLE");
287 
288     /***
289      * Indicates whether or not the underlying entity keys should be resolved when referencing it.
290      */
291     public static final String TAGGEDVALUE_PERSISTENCE_COLUMN_UNIQUE_GROUP = profile.get("COLUMN_UNIQUE_GROUP");
292 
293     /* ----------------- Data Types -------------------- */
294 
295     /***
296      * Used to identify object types in the model, any other type that will be identified as an object must
297      * specialize this type.
298      */
299     public static final String OBJECT_TYPE_NAME = profile.get("OBJECT_TYPE");
300 
301     /***
302      * Used to identify collection types in the model, any other type that will be identified as a collection must
303      * specialize this type.
304      */
305     public static final String COLLECTION_TYPE_NAME = profile.get("COLLECTION_TYPE");
306 
307     /***
308      * Used to identify a list type in the model, any other type that will be identified as a list must specialize this
309      * type.
310      */
311     public static final String LIST_TYPE_NAME = profile.get("LIST_TYPE");
312 
313     /***
314      * Used to identify a set type in the model, any other type that will be identified as a set must specialize this
315      * type.
316      */
317     public static final String SET_TYPE_NAME = profile.get("SET_TYPE");
318 
319     /***
320      * Used to identify date types in the model, any other type that will be identified as a date must specialize this
321      * type.
322      */
323     public static final String DATE_TYPE_NAME = profile.get("DATE_TYPE");
324 
325     /***
326      * Used to identify time types in the model, any other type that will be identified as a time must specialize this
327      * type.
328      */
329     public static final String TIME_TYPE_NAME = profile.get("TIME_TYPE");
330 
331     /***
332      * Used to identify datetime types in the model.
333      */
334     public static final String DATETIME_TYPE_NAME = profile.get("DATETIME_TYPE");
335 
336     /***
337      * Used to identify a boolean type in the model, any other type that will be identified as a boolean type must
338      * specialize this type.
339      */
340     public static final String BOOLEAN_TYPE_NAME = profile.get("BOOLEAN_TYPE");
341 
342     /***
343      * Used to identify a file type in the model, any other type that will be identified as a file type must specialize
344      * this type.
345      */
346     public static final String FILE_TYPE_NAME = profile.get("FILE_TYPE");
347 
348     /***
349      * Used to identify a Blob type in the model, any other type that will be identified as a Blob type must specialize
350      * this type.
351      */
352     public static final String BLOB_TYPE_NAME = profile.get("BLOB_TYPE");
353 
354     /***
355      * Used to identify a Clob type in the model, any other type that will be identified as a Clob type must specialize
356      * this type.
357      */
358     public static final String CLOB_TYPE_NAME = profile.get("CLOB_TYPE");
359     
360     /***
361      * Used to identify a map type in the model, any other type that will be identified as a map type must specialize
362      * this type.
363      */
364     public static final String MAP_TYPE_NAME = profile.get("MAP_TYPE");
365 
366     /***
367      * Used to identify a string type in the model, any other type that will be identified as a string type must
368      * specialize this type.
369      */
370     public static final String STRING_TYPE_NAME = profile.get("STRING_TYPE");
371 
372     /***
373      * Used to identify a void type in the model, any other type that will be identified as a void type must
374      * specialize this type.
375      */
376     public static final String VOID_TYPE_NAME = profile.get("VOID_TYPE");
377 }