View Javadoc
1   // license-header java merge-point
2   //
3   // Attention: generated code (by Metafacade.vsl) - do not modify!
4   //
5   package org.andromda.cartridges.ejb3.metafacades;
6   
7   import java.util.Collection;
8   import java.util.List;
9   import org.andromda.metafacades.uml.Role;
10  import org.andromda.metafacades.uml.Service;
11  
12  /**
13   * Represents a Session EJB.
14   *
15   * Metafacade interface to be used by AndroMDA cartridges.
16   */
17  public interface EJB3SessionFacade
18      extends Service
19  {
20      /**
21       * Indicates the metafacade type (used for metafacade mappings).
22       *
23       * @return boolean always <code>true</code>
24       */
25      public boolean isEJB3SessionFacadeMetaType();
26  
27      /**
28       * Filter out seam component attributes
29       * @param attributes Collection
30       * @return Collection
31       */
32      public Collection filterSeamAttributes(Collection attributes);
33  
34      /**
35       * All instanceAttributes for this session EJB. The list includes the instanceAttributes that
36       * are inherited from super classes. The list contains the inherited instanceAttributes first,
37       * followed by the instanceAttributes defined in this class.
38       * @return List
39       */
40      public List getAllInstanceAttributes();
41  
42      /**
43       * Returns the comma separated list of attributes.<p/>This method can be used to generate
44       * argument lists for constructors and method calls.
45       * @param attributes Collection
46       * @param includeTypes boolean
47       * @param includeNames boolean
48       * @return String
49       */
50      public String getAttributesAsList(Collection attributes, boolean includeTypes, boolean includeNames);
51  
52      /**
53       * All "business" operations for this Session EJB.  These are any operations that are NOT
54       * identified as create methods.
55       * @return Collection
56       */
57      public Collection getBusinessOperations();
58  
59      /**
60       * Gets all constants for this session EJB. Constants are defined as static read-only attributes
61       * which do NOT have the <<EnvEntry>> stereotype.  If 'follow' is true, then the inheritance
62       * hierarchy will be followed and we'll retrieve all constants from any super types as well.
63       * @param follow boolean
64       * @return Collection
65       */
66      public Collection getConstants(boolean follow);
67  
68      /**
69       * Gets create methods for this session EJB.  If 'follow' is set to true, it will follow the
70       * inheritance hierarchy and retrieve those defined on any super types.
71       * @param follow boolean
72       * @return Collection
73       */
74      public Collection getCreateMethods(boolean follow);
75  
76      /**
77       * The name of the default exception to be generated for this service.
78       * @return String
79       */
80      public String getDefaultExceptionName();
81  
82      /**
83       * Gets all env-entries for the specified session EJB. Env-entries are stored as static
84       * attributes on the entity and stereotyped as <<EnvEntry>>.  If 'follow' is true, then the
85       * inheritance hierarchy will be followed and we'll retrieve all env-entries from any super
86       * types as well.
87       * @param follow boolean
88       * @return Collection
89       */
90      public Collection getEnvironmentEntries(boolean follow);
91  
92      /**
93       * The fully qualified class name of the default exception.
94       * @return String
95       */
96      public String getFullyQualifiedDefaultExceptionName();
97  
98      /**
99       * Returns the fully qualified service base name.
100      * @return String
101      */
102     public String getFullyQualifiedServiceBaseName();
103 
104     /**
105      * Returns the fully qualified service bean delegate class name.
106      * @return String
107      */
108     public String getFullyQualifiedServiceDelegateName();
109 
110     /**
111      * Returns the fully qualified service bean implementation name.
112      * @return String
113      */
114     public String getFullyQualifiedServiceImplementationName();
115 
116     /**
117      * The fully qualified parent business interface name for this session bean.
118      * @return String
119      */
120     public String getFullyQualifiedServiceInterfaceName();
121 
122     /**
123      * Returns the fully qualified service bean listener name.
124      * @return String
125      */
126     public String getFullyQualifiedServiceListenerName();
127 
128     /**
129      * Returns the fully qualified service bean local interface name.
130      * @return String
131      */
132     public String getFullyQualifiedServiceLocalInterfaceName();
133 
134     /**
135      * Returns the fully qualified service bean name.
136      * @return String
137      */
138     public String getFullyQualifiedServiceName();
139 
140     /**
141      * Returns the fully qualified service bean remote interface name.
142      * @return String
143      */
144     public String getFullyQualifiedServiceRemoteInterfaceName();
145 
146     /**
147      * Returns the fully qualified service test class name
148      * @return String
149      */
150     public String getFullyQualifiedServiceTestName();
151 
152     /**
153      * A String representing the name of a home interface for this entity EJB.
154      * @return String
155      */
156     public String getHomeInterfaceName();
157 
158     /**
159      * Alll inherited instanceAttributes this session EJB.  The instanceAttributes are grouped by
160      * the class that defines the instanceAttributes, with instanceAttributes from the most removed
161      * super class first.
162      * @return List
163      */
164     public List getInheritedInstanceAttributes();
165 
166     /**
167      * Returns the Collection of target elements from the service bean class where  the target class
168      * has a stereotype of Interceptor.
169      * @return Collection
170      */
171     public Collection getInterceptorReferences();
172 
173     /**
174      * The JNDI name to which this session EJB local interface is bound.
175      * @return String
176      */
177     public String getJndiNameLocal();
178 
179     /**
180      * Returns the JNDI name prefix for this session bean.  This is set using the jndiNamePrefix
181      * namespace property and is commonly the ear file name excluding the extension for the EJB3
182      * cartridge.  This prefix is applied whether the JNDI name is specified or not.
183      * If no manual JNDI name is specified, then the prefix is applied like so:
184      * jndiPrefix/EJBName/Remote
185      * If a manual JNDI name is specified, then the prefix is applied:
186      * jndiPrefix/ManualEJBJNDIName
187      * @return String
188      */
189     public String getJndiNamePrefix();
190 
191     /**
192      * The JNDI name to which this session EJB remote interface is bound.
193      * @return String
194      */
195     public String getJndiNameRemote();
196 
197     /**
198      * Returns the Collection of dependencies from the service bean class where the target class has
199      * a stereotype of MessageDriven.
200      * @return Collection
201      */
202     public Collection getMessageDrivenReferences();
203 
204     /**
205      * Return only the Role object that do not have a Dependency stereotype of RunAs specified.
206      * @return Collection<Role>
207      */
208     public Collection<Role> getNonRunAsRoles();
209 
210     /**
211      * Returns the EJB3 container engine (jboss, weblogic).
212      * @return String
213      */
214     public String getPersistenceContainer();
215 
216     /**
217      * Returns the Collection of target objects from the service bean class that have a stereotype
218      * of PersistenceContext.
219      * @return Collection
220      */
221     public Collection getPersistenceContextReferences();
222 
223     /**
224      * Specifies whether the persistence context for this EntityManager is transaction scoped or
225      * extended.
226      * @return String
227      */
228     public String getPersistenceContextType();
229 
230     /**
231      * Returns the persistence context unit name for the injected EntityManger.  This is only
232      * required if multiple persistence units exists.
233      * @return String
234      */
235     public String getPersistenceContextUnitName();
236 
237     /**
238      * Returns the Collection of dependencies from the service bean that have stereotype of
239      * ResourceRef and the target has a stereotype of DataSource.
240      * @return Collection
241      */
242     public Collection getResourceDataSourceReferences();
243 
244     /**
245      * Returns the Collection of dependencies from the service bean that have stereotype of
246      * ResourceRef and the target has a stereotype of UserTransaction.
247      * @return Collection
248      */
249     public Collection getResourceUserTransactionReferences();
250 
251     /**
252      * Returns the comma separated list of roles allowd to execute all operations in this session
253      * bean.  This is defined by actor dependencies on the session bean.
254      * @return String
255      */
256     public String getRolesAllowed();
257 
258     /**
259      * Returns the run-as identity for the session bean which is used to establish the identity the
260      * bean will use when making calls.  It does not affect the identity of the callers.
261      * @return String
262      */
263     public String getRunAs();
264 
265     /**
266      * Tagged value andromda.seam.component.conversional.ifnotbegunoutcome. Specifies that a
267      * conversation scope component is conversational, meaning that no method of the component can
268      * be called unless a long-running conversation started by this component is active (unless the
269      * method would begin a new long-running conversation).
270      * @return String
271      */
272     public String getSeamComponentConversionalIfNotBegunOutcome();
273 
274     /**
275      * Tagged value andromda.seam.component.intercept. Determines when Seam interceptors are active.
276      * The possible values are defined by the InterceptionType enumeration: ALWAYS,
277      * AFTER_RESTORE_VIEW, AFTER_UPDATE_MODEL_VALUES, INVOKE_APPLICATION, NEVER.
278      * When no interception type is explicitly specified, the default depends upon the component
279      * type. For entity beans, the default is NEVER. For session beans, message driven beans and
280      * JavaBeans, the default is ALWAYS.
281      * @return String
282      */
283     public String getSeamComponentIntercept();
284 
285     /**
286      * Tagged value andromda.seam.component.jndiname. Specifies the JNDI name that Seam will use to
287      * look up the EJB component. If no JNDI name is explicitly specified, Seam will use the JNDI
288      * pattern specified by org.jboss.seam.core.init.jndiPattern.
289      * @return String
290      */
291     public String getSeamComponentJndiName();
292 
293     /**
294      * Returns the Seam component name for the class.
295      * @return String
296      */
297     public String getSeamComponentName();
298 
299     /**
300      * Tagged value andromda.seam.component.role.name. Allows a Seam component to be bound to
301      * multiple contexts variables. The Name/Scope annotations define a "default role". Each Role
302      * annotation defines an additional role.
303      * This tagged value specifies the context variable name.
304      * @return Collection
305      */
306     public Collection getSeamComponentRoleNames();
307 
308     /**
309      * If multiple roles are specified (since a seam component can be bound to multiple context
310      * variables), then multiple roles are specified in the order the role names are specified. 
311      * This is done by modelling the andromda.seam.component.role.scope tag with a comma separated
312      * list of scopes.
313      * @return Collection
314      */
315     public Collection getSeamComponentRoleScopeTypes();
316 
317     /**
318      * Tagged value andromda.seam.component.scope. Defines the default context of the component. 
319      * Possible values are
320      * EVENT
321      * PAGE
322      * CONVERSATION
323      * SESSION
324      * BUSINESS_PROCESS
325      * APPLICATION
326      * STATELESS
327      * If no scope specified, default depends on component type.
328      * @return String
329      */
330     public String getSeamComponentScopeType();
331 
332     /**
333      * Returns a string with parameters for the Startup annotation. Supported parameters:
334      * depends — specifies that the named components must be started first, if they are installed.
335      * Specified by tagged value andromda.seam.component.startup.depends
336      * @return String
337      */
338     public String getSeamComponentStartupParameters();
339 
340     /**
341      * Tagged value andromda.seam.component.synchronized.timeout. Specifies that a component is
342      * accessed concurrently by multiple clients, and that Seam should serialize requests. If a
343      * request is not able to obtain its lock on the component in the given timeout period, an
344      * exception will be raised.
345      * @return String
346      */
347     public String getSeamComponentSynchronizedTimeout();
348 
349     /**
350      * Returns the security domain value.  Specified using the securityRealm namespace property or
351      * overridden in the andromda.ejb.security.realm tagged value.
352      * @return String
353      */
354     public String getSecurityRealm();
355 
356     /**
357      * Returns the service bean base name.
358      * @return String
359      */
360     public String getServiceBaseName();
361 
362     /**
363      * Return the service bean delegate class name.
364      * @return String
365      */
366     public String getServiceDelegateName();
367 
368     /**
369      * Returns the service bean implementation name.
370      * @return String
371      */
372     public String getServiceImplementationName();
373 
374     /**
375      * The parent business interface name for this session bean.
376      * @return String
377      */
378     public String getServiceInterfaceName();
379 
380     /**
381      * Returns the service bean callback listener name.
382      * @return String
383      */
384     public String getServiceListenerName();
385 
386     /**
387      * Returns the service bean local interface name.
388      * @return String
389      */
390     public String getServiceLocalInterfaceName();
391 
392     /**
393      * Returns service bean name.
394      * @return String
395      */
396     public String getServiceName();
397 
398     /**
399      * Returns the service bean remote interface name.
400      * @return String
401      */
402     public String getServiceRemoteInterfaceName();
403 
404     /**
405      * Returns the service bean test class name
406      * @return String
407      */
408     public String getServiceTestName();
409 
410     /**
411      * Returns the service test package name. This simply appends .test to the existing service
412      * class package.
413      * @return String
414      */
415     public String getTestPackageName();
416 
417     /**
418      * Returns the transaction demarcation strategy for this bean.  Typically, this will return BEAN
419      * for non default CONTAINER managed beans.  Unless specified, this will return null indicating
420      * CONTAINER transaction demarcation.
421      * @return String
422      */
423     public String getTransactionManagement();
424 
425     /**
426      * Gets the transaction type for this service (i.e. REQUIRED, etc)
427      * @return String
428      */
429     public String getTransactionType();
430 
431     /**
432      * Returns the name of the type of this Session EJB, either Stateless or Stateful.
433      * @return String
434      */
435     public String getType();
436 
437     /**
438      * A string indicating whether the Bean is a local or remotely accessable bean.
439      * @return String
440      */
441     public String getViewType();
442 
443     /**
444      * Indicates whether or not a default service exception should be allowed.
445      * @return boolean
446      */
447     public boolean isAllowDefaultServiceException();
448 
449     /**
450      * Determine whether clustering has been enabled.  Either set application wide using
451      * enableClustering namespace property or via the andromda_service_clustered tagged value.
452      * @return boolean
453      */
454     public boolean isClusteringEnabled();
455 
456     /**
457      * Returns true if NO roles are permitted to execute operations in this bean.  This is specified
458      * in the andromda.ejb.security.denyAll tagged value. Typically, it will be overridden at the
459      * method level using the andromda.ejb.security.rolesAllowed tagged value.
460      * @return boolean
461      */
462     public boolean isDenyAll();
463 
464     /**
465      * Determines whether to exclude the invocation of the default interceptors for all business
466      * method in the bean.
467      * @return boolean
468      */
469     public boolean isExcludeDefaultInterceptors();
470 
471     /**
472      * Returns true if this session bean has the stereotype Listener.  False otherwise.
473      * @return boolean
474      */
475     public boolean isListenerEnabled();
476 
477     /**
478      * Returns true if all roles are permitted to execute all operations in this session bean.  This
479      * is specified in the andromda.ejb.security.permitAll tagged value.  It will override the
480      * andromda.ejb.security.rolesAllowed tagged value.
481      * @return boolean
482      */
483     public boolean isPermitAll();
484 
485     /**
486      * Returns true if the persistence container is the JBoss engine.
487      * @return boolean
488      */
489     public boolean isPersistenceContainerJboss();
490 
491     /**
492      * Returns true if the persistence container is the Weblogic engine.
493      * @return boolean
494      */
495     public boolean isPersistenceContainerWeblogic();
496 
497     /**
498      * Returns true if this session bean has the <<Seam>> stereotype modelled indicating it is a
499      * Seam session bean component.
500      * @return boolean
501      */
502     public boolean isSeamComponent();
503 
504     /**
505      * Tagged value andromda.seam.component.readonly. Specifies that a JavaBean component or
506      * component method does not require state replication at the end of the invocation.
507      * @return boolean
508      */
509     public boolean isSeamComponentReadonly();
510 
511     /**
512      * Returns true if stereotype <<Startup>> is set. Specifies that an application scope component
513      * is started immediately at initialization time. This is mainly used for certain built-in
514      * components that bootstrap critical infrastructure such as JNDI, datasources, etc.
515      * @return boolean
516      */
517     public boolean isSeamComponentStartup();
518 
519     /**
520      * Returns true if stereotype <<Transactional>> is set. Specifies that a JavaBean component
521      * should have a similar transactional behavior to the default behavior of a session bean
522      * component. ie. method invocations should take place in a transaction, and if no transaction
523      * exists when the method is called, a transaction will be started just for that method. This
524      * annotation may be applied at either class or method level.
525      * @return boolean
526      */
527     public boolean isSeamComponentTransactional();
528 
529     /**
530      * Returns true if the security realm is specified indicating to generate the security
531      * infrastructure files.
532      * @return boolean
533      */
534     public boolean isSecurityEnabled();
535 
536     /**
537      * True/false depending on whether or not this Session EJB is stateful or not.
538      * @return boolean
539      */
540     public boolean isStateful();
541 
542     /**
543      * True/false depending on whether or not this Session EJB is stateless or not.
544      * @return boolean
545      */
546     public boolean isStateless();
547 
548     /**
549      * Whether or not to allow a synthetic (auto generated) create method.
550      * @return boolean
551      */
552     public boolean isSyntheticCreateMethodAllowed();
553 
554     /**
555      * Returns true if the transaction demarcation strategy is bean managedfor this bean.
556      * @return boolean
557      */
558     public boolean isTransactionManagementBean();
559 
560     /**
561      * Return true if the view type accessability for this bean is both.
562      * @return boolean
563      */
564     public boolean isViewTypeBoth();
565 
566     /**
567      * Return true if the view type accessability for this bean is local or both.
568      * Always generate a local interface is this session bean is a Seam component.
569      * @return boolean
570      */
571     public boolean isViewTypeLocal();
572 
573     /**
574      * Return true if the view type accessability for this bean is remote or both.
575      * @return boolean
576      */
577     public boolean isViewTypeRemote();
578 
579     /**
580      * Returns true if the bean view type was explicitly set to both view using tagged value or set
581      * as the app wide default.
582      * @return boolean
583      */
584     public boolean isViewTypeStrictlyBoth();
585 
586     /**
587      * Returns true if the bean view type was explicitly set to local view using tagged value or set
588      * as the app wide default.
589      * @return boolean
590      */
591     public boolean isViewTypeStrictlyLocal();
592 
593     /**
594      * Returns true if the bean view type was explicitly set to remote view using tagged value or
595      * set as the app wide default.
596      * @return boolean
597      */
598     public boolean isViewTypeStrictlyRemote();
599 
600     /**
601      * Returns true if the session bean has either one of the following:
602      * 1. The <<WebService>> stereotype is modelled on the bean class;
603      * 2. The <<WebServiceOperation>> stereotype is modelled on at least one business method.
604      * @return boolean
605      */
606     public boolean isWebServiceEnabled();
607 
608     /**
609      * Returns true if at least one of the session bean operations is marked with the
610      * WebServiceOperation stereotype.
611      * @return boolean
612      */
613     public boolean isWebServiceOperationExists();
614 }