001// license-header java merge-point
002//
003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
004//
005package org.andromda.cartridges.ejb3.metafacades;
006
007import java.util.Collection;
008import org.andromda.core.metafacade.ModelValidationMessage;
009
010/**
011 * TODO: Model Documentation for
012 * org.andromda.cartridges.ejb3.metafacades.EJB3WebServiceOperationFacade
013 * MetafacadeLogic for EJB3WebServiceOperationFacade
014 *
015 * @see EJB3WebServiceOperationFacade
016 */
017public abstract class EJB3WebServiceOperationFacadeLogic
018    extends EJB3SessionOperationFacadeLogicImpl
019    implements EJB3WebServiceOperationFacade
020{
021    /**
022     * The underlying UML object
023     * @see Object
024     */
025    protected Object metaObject;
026
027    /** Create Metafacade implementation instance using the MetafacadeFactory from the context
028     * @param metaObjectIn
029     * @param context
030     */
031    protected EJB3WebServiceOperationFacadeLogic(Object metaObjectIn, String context)
032    {
033        super(metaObjectIn, getContext(context));
034        this.metaObject = metaObjectIn;
035    }
036
037    /**
038     * Gets the context for this metafacade logic instance.
039     * @param context String. Set to EJB3WebServiceOperationFacade if null
040     * @return context String
041     */
042    private static String getContext(String context)
043    {
044        if (context == null)
045        {
046            context = "org.andromda.cartridges.ejb3.metafacades.EJB3WebServiceOperationFacade";
047        }
048        return context;
049    }
050
051    /** Reset context only for non-root metafacades
052     * @param context
053     */
054    @Override
055    public void resetMetafacadeContext(String context)
056    {
057        if (!this.contextRoot) // reset context only for non-root metafacades
058        {
059            context = getContext(context);  // to have same value as in original constructor call
060            setMetafacadeContext (context);
061        }
062    }
063
064    /**
065     * @return boolean true always
066     * @see EJB3WebServiceOperationFacade
067     */
068    public boolean isEJB3WebServiceOperationFacadeMetaType()
069    {
070        return true;
071    }
072
073    // --------------- attributes ---------------------
074
075   /**
076    * @see org.andromda.cartridges.ejb3.metafacades.EJB3WebServiceOperationFacade#isExposed()
077    * @return boolean
078    */
079    protected abstract boolean handleIsExposed();
080
081    private boolean __exposed1a;
082    private boolean __exposed1aSet = false;
083
084    /**
085     * Returns true/false depending on whether or not this web service operation is exposed.
086     * @return (boolean)handleIsExposed()
087     */
088    public final boolean isExposed()
089    {
090        boolean exposed1a = this.__exposed1a;
091        if (!this.__exposed1aSet)
092        {
093            // exposed has no pre constraints
094            exposed1a = handleIsExposed();
095            // exposed has no post constraints
096            this.__exposed1a = exposed1a;
097            if (isMetafacadePropertyCachingEnabled())
098            {
099                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}