View Javadoc
1   // license-header java merge-point
2   //
3   // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
4   //
5   package org.andromda.cartridges.ejb3.metafacades;
6   
7   import java.util.Collection;
8   import org.andromda.core.metafacade.ModelValidationMessage;
9   
10  /**
11   * TODO: Model Documentation for
12   * org.andromda.cartridges.ejb3.metafacades.EJB3WebServiceOperationFacade
13   * MetafacadeLogic for EJB3WebServiceOperationFacade
14   *
15   * @see EJB3WebServiceOperationFacade
16   */
17  public abstract class EJB3WebServiceOperationFacadeLogic
18      extends EJB3SessionOperationFacadeLogicImpl
19      implements EJB3WebServiceOperationFacade
20  {
21      /**
22       * The underlying UML object
23       * @see Object
24       */
25      protected Object metaObject;
26  
27      /** Create Metafacade implementation instance using the MetafacadeFactory from the context
28       * @param metaObjectIn
29       * @param context
30       */
31      protected EJB3WebServiceOperationFacadeLogic(Object metaObjectIn, String context)
32      {
33          super(metaObjectIn, getContext(context));
34          this.metaObject = metaObjectIn;
35      }
36  
37      /**
38       * Gets the context for this metafacade logic instance.
39       * @param context String. Set to EJB3WebServiceOperationFacade if null
40       * @return context String
41       */
42      private static String getContext(String context)
43      {
44          if (context == null)
45          {
46              context = "org.andromda.cartridges.ejb3.metafacades.EJB3WebServiceOperationFacade";
47          }
48          return context;
49      }
50  
51      /** Reset context only for non-root metafacades
52       * @param context
53       */
54      @Override
55      public void resetMetafacadeContext(String context)
56      {
57          if (!this.contextRoot) // reset context only for non-root metafacades
58          {
59              context = getContext(context);  // to have same value as in original constructor call
60              setMetafacadeContext (context);
61          }
62      }
63  
64      /**
65       * @return boolean true always
66       * @see EJB3WebServiceOperationFacade
67       */
68      public boolean isEJB3WebServiceOperationFacadeMetaType()
69      {
70          return true;
71      }
72  
73      // --------------- attributes ---------------------
74  
75     /**
76      * @see org.andromda.cartridges.ejb3.metafacades.EJB3WebServiceOperationFacade#isExposed()
77      * @return boolean
78      */
79      protected abstract boolean handleIsExposed();
80  
81      private boolean __exposed1a;
82      private boolean __exposed1aSet = false;
83  
84      /**
85       * Returns true/false depending on whether or not this web service operation is exposed.
86       * @return (boolean)handleIsExposed()
87       */
88      public final boolean isExposed()
89      {
90          boolean exposed1a = this.__exposed1a;
91          if (!this.__exposed1aSet)
92          {
93              // exposed has no pre constraints
94              exposed1a = handleIsExposed();
95              // exposed has no post constraints
96              this.__exposed1a = exposed1a;
97              if (isMetafacadePropertyCachingEnabled())
98              {
99                  this.__exposed1aSet = true;
100             }
101         }
102         return exposed1a;
103     }
104 
105    /**
106     * @see org.andromda.cartridges.ejb3.metafacades.EJB3WebServiceOperationFacade#isOneway()
107     * @return boolean
108     */
109     protected abstract boolean handleIsOneway();
110 
111     private boolean __oneway2a;
112     private boolean __oneway2aSet = false;
113 
114     /**
115      * Specifies that this webservice operation has only an input message and no output. Typically,
116      * a oneway method returns the thread of control to the calling application prior to executing
117      * the actual business method.
118      * You should not model the andromda_webservice_operation_oneway tagged value on operations that
119      * have a return value or holder parameters, or declare any checked exceptions.
120      * @return (boolean)handleIsOneway()
121      */
122     public final boolean isOneway()
123     {
124         boolean oneway2a = this.__oneway2a;
125         if (!this.__oneway2aSet)
126         {
127             // oneway has no pre constraints
128             oneway2a = handleIsOneway();
129             // oneway has no post constraints
130             this.__oneway2a = oneway2a;
131             if (isMetafacadePropertyCachingEnabled())
132             {
133                 this.__oneway2aSet = true;
134             }
135         }
136         return oneway2a;
137     }
138 
139    /**
140     * @see org.andromda.cartridges.ejb3.metafacades.EJB3WebServiceOperationFacade#getMethodName()
141     * @return String
142     */
143     protected abstract String handleGetMethodName();
144 
145     private String __methodName3a;
146     private boolean __methodName3aSet = false;
147 
148     /**
149      * Returns the webMethod operation name.
150      * @return (String)handleGetMethodName()
151      */
152     public final String getMethodName()
153     {
154         String methodName3a = this.__methodName3a;
155         if (!this.__methodName3aSet)
156         {
157             // methodName has no pre constraints
158             methodName3a = handleGetMethodName();
159             // methodName has no post constraints
160             this.__methodName3a = methodName3a;
161             if (isMetafacadePropertyCachingEnabled())
162             {
163                 this.__methodName3aSet = true;
164             }
165         }
166         return methodName3a;
167     }
168 
169    /**
170     * @see org.andromda.cartridges.ejb3.metafacades.EJB3WebServiceOperationFacade#getResultName()
171     * @return String
172     */
173     protected abstract String handleGetResultName();
174 
175     private String __resultName4a;
176     private boolean __resultName4aSet = false;
177 
178     /**
179      * Returns the webResult name.
180      * @return (String)handleGetResultName()
181      */
182     public final String getResultName()
183     {
184         String resultName4a = this.__resultName4a;
185         if (!this.__resultName4aSet)
186         {
187             // resultName has no pre constraints
188             resultName4a = handleGetResultName();
189             // resultName has no post constraints
190             this.__resultName4a = resultName4a;
191             if (isMetafacadePropertyCachingEnabled())
192             {
193                 this.__resultName4aSet = true;
194             }
195         }
196         return resultName4a;
197     }
198 
199     // ---------------- business methods ----------------------
200 
201     /**
202      * Method to be implemented in descendants
203      * Returns the web service operation signature having @WebParam annotations for each parameter.
204      * @return String
205      */
206     protected abstract String handleGetAnnotatedSignature();
207 
208     /**
209      * Returns the web service operation signature having @WebParam annotations for each parameter.
210      * @return handleGetAnnotatedSignature()
211      */
212     public String getAnnotatedSignature()
213     {
214         // getAnnotatedSignature has no pre constraints
215         String returnValue = handleGetAnnotatedSignature();
216         // getAnnotatedSignature has no post constraints
217         return returnValue;
218     }
219 
220     /**
221      * @param validationMessages Collection<ModelValidationMessage>
222      * @see EJB3SessionOperationFacadeLogicImpl#validateInvariants(Collection validationMessages)
223      */
224     @Override
225     public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
226     {
227         super.validateInvariants(validationMessages);
228     }
229 }