View Javadoc
1   package org.andromda.cartridges.spring.metafacades;
2   
3   /**
4    * Stores Globals specific to the Spring cartridge.
5    *
6    * @author Chad Brandon
7    * @author Wouter Zoons
8    */
9   public class SpringGlobals
10  {
11      /**
12       * Denotes whether or not subclasses require their own mapping file.
13       */
14      static public final String HIBERNATE_MAPPING_STRATEGY = "hibernateMappingStrategy";
15  
16      /**
17       * A mapping file per subclass.
18       */
19      static public final String HIBERNATE_MAPPING_STRATEGY_SUBCLASS = "subclass";
20  
21      /**
22       * A mapping file per hierarchy.
23       */
24      static public final String HIBERNATE_MAPPING_STRATEGY_HIERARCHY = "hierarchy";
25  
26      /**
27       * POJO implementation class suffix.
28       */
29      static final String IMPLEMENTATION_SUFFIX = "Impl";
30  
31      /**
32       * EJB implementation class suffix.
33       */
34      static final String EJB_IMPLEMENTATION_SUFFIX = "Bean";
35  
36      /**
37       * The service base class suffix.
38       */
39      static final String SERVICE_BASE_SUFFIX = "Base";
40  
41      /**
42       * The name prefix for all spring bean ids.
43       */
44      static final String BEAN_NAME_PREFIX = "beanNamePrefix";
45  
46      /**
47       * The bean name target suffix
48       */
49      static final String BEAN_NAME_TARGET_SUFFIX = "Target";
50  
51      /**
52       * The service web service delegator.
53       */
54      static final String WEB_SERVICE_DELEGATOR_SUFFIX = "WSDelegator";
55  
56      /**
57       * The prefix given to transformation method names.
58       */
59      static final String TRANSFORMATION_METHOD_PREFIX = "to";
60  
61      /**
62       * The suffix given to collection transformation method names.
63       */
64      static final String TRANSFORMATION_TO_COLLECTION_METHOD_SUFFIX = "Collection";
65  
66      /**
67       * The suffix given to array method names.
68       */
69      static final String TRANSFORMATION_TO_ARRAY_METHOD_SUFFIX = "Array";
70  
71      /**
72       * Defines the prefix given to the transformation constants.
73       */
74      static final String TRANSFORMATION_CONSTANT_PREFIX = "TRANSFORM_";
75  
76      /**
77       * The property used to specify the implementation operation name pattern (on both services and DAOs).
78       */
79      static final String IMPLEMENTATION_OPERATION_NAME_PATTERN = "implementationOperationNamePattern";
80  
81      /**
82       * The name pattern for service implementation class packages
83       */
84      static final String IMPLEMENTATION_PACKAGE_NAME_PATTERN = "implementationPackageNamePattern";
85  
86      /**
87       * The pattern used to construct the DAO base name.
88       */
89      static final String DAO_BASE_PATTERN = "daoBaseNamePattern";
90  
91      /**
92       * The pattern used to construct the DAO name.
93       */
94      static final String DAO_PATTERN = "daoNamePattern";
95  
96      /**
97       * The pattern used to construct the DAO implementation name.
98       */
99      static final String DAO_IMPLEMENTATION_PATTERN = "daoImplementationNamePattern";
100 
101     /**
102      * The pattern used to indicate whether or not ejb transactions are enabled.
103      */
104     static final String EJB_TRANSACTIONS_ENABLED = "ejbTransactionsEnabled";
105 
106     /**
107      * The pattern used to construct the web service outgoing attachment handler call.
108      */
109     static final String WEBSERVICE_OUTGOING_ATTACHMENT_HANDLER_CALL_PATTERN = "webServiceOutgoingAttachmentHandlerCallPattern";
110 
111     /**
112      * The pattern used to construct the web service incoming attachment handler call.
113      */
114     static final String WEBSERVICE_INCOMING_ATTACHMENT_HANDLER_CALL_PATTERN = "webServiceIncomingAttachmentHandlerCallPattern";
115 
116     /**
117      * RMI protocol for remote services
118      */
119     static final String REMOTING_PROTOCOL_RMI = "rmi";
120 
121     /**
122      * Hessian protocol for remote services
123      */
124     static final String REMOTING_PROTOCOL_HESSIAN = "hessian";
125 
126     /**
127      * HttpInvoker protocol for remote services
128      */
129     static final String REMOTING_PROTOCOL_HTTPINVOKER = "httpinvoker";
130 
131     /**
132      * Lingo protocol for remote services
133      */
134     static final String REMOTING_PROTOCOL_LINGO = "lingo";
135 
136     /**
137      * Disable remoting
138      */
139     static final String REMOTING_PROTOCOL_NONE = "none";
140 
141     /**
142      * Burlap protocol for remote services
143      */
144     static final String REMOTING_PROTOCOL_BURLAP = "burlap";
145 
146     /**
147      * The suffix to append to the class names of CRUD value objects.
148      */
149     static final String CRUD_VALUE_OBJECT_SUFFIX = "crudValueObjectSuffix";
150 
151     /**
152      * Prefix for configuration properties related to remoting.
153      */
154     public static final String CONFIG_PROPERTY_PREFIX = "configPropertyPrefix";
155 
156     /**
157      * Default service exceptino name pattern
158      */
159     static final String DEFAULT_SERVICE_EXCEPTION_NAME_PATTERN = "defaultServiceExceptionNamePattern";
160 
161     /**
162      * Default service exceptions
163      */
164     static final String DEFAULT_SERVICE_EXCEPTIONS = "defaultServiceExceptions";
165 
166     /**
167      * Property for configuring the JMS destination template accessor name.
168      */
169     static final String JMS_DESTINATION_TEMPLATE_PATTERN = "jmsDestinationTemplatePattern";
170 
171     /**
172      * Enable rich-client code generation ?
173      */
174     static final String RICH_CLIENT = "richClient";
175 
176     /**
177      * The name pattern for EJB packages
178      */
179     static final String EJB_PACKAGE_NAME_PATTERN = "ejbPackageNamePattern";
180 
181     /**
182      * The prefix to use when constructing ejb JNDI names
183      */
184     static final String EJB_JNDI_NAME_PREFIX = "ejbJndiNamePrefix";
185 
186     /**
187      * Service interceptors
188      */
189     static final String SERVICE_INTERCEPTORS = "serviceInterceptors";
190 
191     /**
192      * The remoting type to be used for services
193      */
194     static final String SERVICE_REMOTING_TYPE = "serviceRemotingType";
195 
196     /**
197      * The server on which remote services are to be deployed
198      */
199     static final String SERVICE_REMOTE_SERVER = "serviceRemoteServer";
200 
201     /**
202      * The remote port via which services are accessible
203      */
204     static final String SERVICE_REMOTE_PORT = "serviceRemotePort";
205 
206     /**
207      * The remote context to which services are to be deployed
208      */
209     static final String SERVICE_REMOTE_CONTEXT = "serviceRemoteContext";
210 
211     /**
212      * Indicates if "XML Persistence" code generation is enabled. Requires Hibernate 3.
213      */
214     static public final String HIBERNATE_XML_PERSISTENCE = "hibernateXMLPersistence";
215 
216     /**
217      * Determines if the identifier attribute on an entity is generated as an attribute
218      * or as a separate element.
219      */
220     static final String HIBERNATE_XML_PERSISTENCE_ID_AS_ATTRIBUTE = "hibernateXMLPersistIDAsAttribute";
221 
222     /**
223      * Hibernate version to use.
224      */
225     static public final String HIBERNATE_VERSION = "hibernateVersion";
226 
227     /**
228      * The version for Hibernate 2.
229      */
230     public static final String HIBERNATE_VERSION_2 = "2";
231 
232     /**
233      * The version for Hibernate 3.
234      */
235     public static final String HIBERNATE_VERSION_3 = "3";
236 
237     /**
238      * The version for Hibernate 4.
239      */
240     public static final String HIBERNATE_VERSION_4 = "4";
241 
242     /**
243      * JMS Message types.
244      */
245     public static String[] jmsMessageTypes = new String[] {
246         "javax.jms.Message",
247         "javax.jms.MapMessage",
248         "javax.jms.TextMessage",
249         "javax.jms.StreamMessage",
250         "javax.jms.BytesMessage",
251         "javax.jms.ObjectMessage"
252         };
253 }