001package org.andromda.cartridges.spring;
002
003import org.andromda.core.profile.Profile;
004import org.andromda.metafacades.uml.UMLProfile;
005
006
007/**
008 * The Spring profile. Contains the profile information (tagged values, and stereotypes) for the Spring cartridge.
009 *
010 * @author Chad Brandon
011 * @author Peter Friese
012 */
013public class SpringProfile
014    extends UMLProfile
015{
016    /**
017     * The Profile instance from which we retrieve the mapped profile names.
018     */
019    private static final Profile PROFILE = Profile.instance();
020
021    /* ----------------- Stereotypes -------------------- */
022    /**
023     * Stores the service init-method stereotype.
024     */
025    public static final String STEREOTYPE_POST_CONSTRUCT_METHOD = PROFILE.get("POST_CONSTRUCT");
026
027    /**
028     * Stores the service destroy-method stereotype.
029     */
030    public static final String STEREOTYPE_PRE_DESTROY_METHOD = PROFILE.get("PRE_DESTROY");
031
032    /**
033     * 'PrePersist' Specifies the entity business operation as a pre-persist callback
034     */
035    public static final String STEREOTYPE_PRE_PERSIST = PROFILE.get("PRE_PERSIST");
036
037    /**
038     * 'PostPersist' Specifies the entity operation as a post-persist operation
039     */
040    public static final String STEREOTYPE_POST_PERSIST = PROFILE.get("POST_PERSIST");
041
042    /**
043     * 'PreRemove' Specifies the entity business operati operationre-remove operation
044     */
045    public static final String STEREOTYPE_PRE_REMOVE = PROFILE.get("PRE_REMOVE");
046
047    /**
048     * 'PostRemove' Specifies the entity business operation as a post-remove operation
049     */
050    public static final String STEREOTYPE_POST_REMOVE = PROFILE.get("POST_REMOVE");
051
052    /**
053     * 'PreUpdate' Specifies the entity business operation as a pre-update operation
054     */
055    public static final String STEREOTYPE_PRE_UPDATE = PROFILE.get("PRE_UPDATE");
056
057    /**
058     * 'PostUpdate' Specifies the entity business operation as a post-update operation
059     */
060    public static final String STEREOTYPE_POST_UPDATE = PROFILE.get("POST_UPDATE");
061
062    /* ----------------- Tagged Values -------------------- */
063
064    /**
065     * Stores the EJB service transaction type.
066     */
067    public static final String TAGGEDVALUE_EJB_TRANSACTION_TYPE = PROFILE.get("EJB_TRANSACTION_TYPE");
068
069    /**
070     * Stores the EJB service view type (local/remote).
071     */
072    public static final String TAGGEDVALUE_EJB_VIEW_TYPE = PROFILE.get("EJB_VIEW_TYPE");
073
074    /**
075     * Stores the Spring service transaction type.
076     */
077    public static final String TAGGEDVALUE_TRANSACTION_TYPE = PROFILE.get("TRANSACTION_TYPE");
078
079    /**
080     * Stores whether a criteria search attribute may be nullable.
081     */
082    public static final String TAGGEDVALUE_HIBERNATE_CRITERIA_NULLABLE = PROFILE.get("HIBERNATE_CRITERIA_NULLABLE");
083
084    /**
085     * Stores a criteria search attribute path.
086     */
087    public static final String TAGGEDVALUE_HIBERNATE_CRITERIA_ATTRIBUTE = PROFILE.get("HIBERNATE_CRITERIA_ATTRIBUTE");
088
089    /**
090     * Stores a criteria search comparator.
091     */
092    public static final String TAGGEDVALUE_HIBERNATE_CRITERIA_COMPARATOR = PROFILE.get("HIBERNATE_CRITERIA_COMPARATOR");
093
094    /**
095     * Stores a hibernate matchmode.
096     */
097    public static final String TAGGEDVALUE_HIBERNATE_CRITERIA_MATCHMODE = PROFILE.get("HIBERNATE_CRITERIA_MATCHMODE");
098
099    /**
100     * Stores the criteria search order direction.
101     */
102    public static final String TAGGEDVALUE_HIBERNATE_CRITERIA_ORDER_DIRECTION =
103        PROFILE.get("HIBERNATE_CRITERIA_ORDER_DIRECTION");
104
105    /**
106     * Stores the criteria search order relevance.
107     */
108    public static final String TAGGEDVALUE_HIBERNATE_CRITERIA_ORDER_RELEVANCE =
109        PROFILE.get("HIBERNATE_CRITERIA_ORDER_RELEVANCE");
110
111    /**
112     * Stores whether or not criteria like comparator's should ignore case.
113     */
114    public static final String TAGGEDVALUE_HIBERNATE_CRITERIA_COMPARATOR_IGNORE_CASE =
115        PROFILE.get("HIBERNATE_CRITERIA_COMPARATOR_IGNORE_CASE");
116
117    /**
118     * Stores a hibernate query.
119     */
120    public static final String TAGGEDVALUE_HIBERNATE_QUERY = PROFILE.get("HIBERNATE_QUERY");
121
122    /**
123     * Stores the hibernate inheritance use for entities.
124     */
125    public static final String TAGGEDVALUE_HIBERNATE_INHERITANCE = PROFILE.get("HIBERNATE_INHERITANCE");
126
127    /**
128     * Define whether the marked finder will use named parameters or positional parameters.
129     */
130    public static final String TAGGEDVALUE_HIBERNATE_USE_NAMED_PARAMETERS = PROFILE
131            .get("HIBERNATE_USE_NAMED_PARAMETERS");
132
133    /**
134     * Defines the remoting type for spring services.
135     */
136    public static final String TAGGEDVALUE_SPRING_SERVICE_REMOTING_TYPE = PROFILE.get("SPRING_SERVICE_REMOTING_TYPE");
137
138    /**
139     * Defines the remote port for spring services.
140     */
141    public static final String TAGGEDVALUE_SPRING_SERVICE_REMOTE_PORT = PROFILE.get("SPRING_SERVICE_REMOTE_PORT");
142
143    /**
144     * Define additional spring interceptors
145     */
146    public static final String TAGGEDVALUE_SPRING_SERVICE_INTERCEPTORS = PROFILE.get("SPRING_SERVICE_INTERCEPTORS");
147
148    /**
149     * Define whether we will render only the configuration, but not the service itself.
150     */
151    public static final String TAGGEDVALUE_SERVICE_CONFIG_ONLY = PROFILE.get("SPRING_SERVICE_CONFIG_ONLY");
152
153    /**
154    * Define whether the service is private.
155    */
156    public static final String TAGGEDVALUE_SERVICE_PRIVATE = PROFILE.get("SPRING_SERVICE_PRIVATE");
157
158    /**
159     * Optimize acknowledge flag for ActiveMQ connections.
160     */
161    public static final String TAGGEDVALUEVALUE_ACTIVEMQ_OPTIMIZE_ACKNOWLEDGE = PROFILE.get("ACTIVEMQ_OPTIMIZE_ACKNOWLEDGE");
162
163    /**
164     * Session acknowledge mode for messaging (JMS).
165     */
166    public static final String TAGGEDVALUEVALUE_MESSAGING_SESSION_ACKNOWLEDGE_MODE = PROFILE.get("MESSAGING_SESSION_ACKNOWLEDGE_MODE");
167
168    /* ----------------- Tagged Value Values ------------- */
169
170    /**
171     * The "like" comparator.
172     */
173    public static final String TAGGEDVALUEVALUE_COMPARATOR_LIKE = PROFILE.get("LIKE_COMPARATOR");
174
175    /**
176     * The "case insensitive like" comparator.
177     */
178    public static final String TAGGEDVALUEVALUE_INSENSITIVE_LIKE_COMPARATOR =
179        PROFILE.get("INSENSITIVE_LIKE_COMPARATOR");
180
181    /**
182     * The "equals" comparator.
183     */
184    public static final String TAGGEDVALUEVALUE_COMPARATOR_EQUAL = PROFILE.get("EQUAL_COMPARATOR");
185
186    /**
187     * The "greater of even" comparator.
188     */
189    public static final String TAGGEDVALUEVALUE_COMPARATOR_GREATER_OR_EQUAL =
190        PROFILE.get("GREATER_THAN_OR_EQUAL_COMPARATOR");
191
192    /**
193     * The "greater" comparator.
194     */
195    public static final String TAGGEDVALUEVALUE_COMPARATOR_GREATER = PROFILE.get("GREATER_THAN_COMPARATOR");
196
197    /**
198     * The "less of even" comparator.
199     */
200    public static final String TAGGEDVALUEVALUE_COMPARATOR_LESS_OR_EQUAL = PROFILE.get("LESS_THAN_OR_EQUAL_COMPARATOR");
201
202    /**
203     * The "less" comparator.
204     */
205    public static final String TAGGEDVALUEVALUE_COMPARATOR_LESS = PROFILE.get("LESS_THAN_COMPARATOR");
206
207    /**
208     * The "in" comparator.
209     */
210    public static final String TAGGEDVALUEVALUE_COMPARATOR_IN = PROFILE.get("IN_COMPARATOR");
211
212    /**
213     * The "not equal" comparator.
214     */
215    public static final String TAGGEDVALUEVALUE_COMPARATOR_NOT_EQUAL = PROFILE.get("NOT_EQUAL_COMPARATOR");
216
217    /**
218     * PROFILE.get("MATCHMODE_ANYWHERE")
219     * net.sf.hibernate.expression.MatchMode#ANYWHERE match mode.
220     */
221    public static final String TAGGEDVALUEVALUE_MATCHMODE_ANYWHERE = PROFILE.get("MATCHMODE_ANYWHERE");
222
223    /**
224     * PROFILE.get("MATCHMODE_END")
225     * net.sf.hibernate.expression.MatchMode#END match mode.
226     */
227    public static final String TAGGEDVALUEVALUE_MATCHMODE_END = PROFILE.get("MATCHMODE_END");
228
229    /**
230     * PROFILE.get("MATCHMODE_EXACT")
231     * net.sf.hibernate.expression.MatchMode#EXACT match mode.
232     */
233    public static final String TAGGEDVALUEVALUE_MATCHMODE_EXACT = PROFILE.get("MATCHMODE_EXACT");
234
235    /**
236     * PROFILE.get("MATCHMODE_START")
237     * net.sf.hibernate.expression.MatchMode#START match mode.
238     */
239    public static final String TAGGEDVALUEVALUE_MATCHMODE_START = PROFILE.get("MATCHMODE_START");
240
241    /**
242     * Ascending sort order.
243     */
244    public static final String TAGGEDVALUEVALUE_ORDER_ASCENDING = PROFILE.get("ORDER_ASCENDING");
245
246    /**
247     * Descending sort order.
248     */
249    public static final String TAGGEDVALUEVALUE_ORDER_DESCENDING = PROFILE.get("ORDER_DESCENDING");
250}