JBpmActionLogic.java

// license-header java merge-point
//
// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
//
package org.andromda.cartridges.jbpm.metafacades;

import java.util.Collection;
import org.andromda.core.common.Introspector;
import org.andromda.core.metafacade.MetafacadeBase;
import org.andromda.core.metafacade.MetafacadeFactory;
import org.andromda.core.metafacade.ModelValidationMessage;
import org.andromda.metafacades.uml.CallEventFacade;
import org.andromda.metafacades.uml.ConstraintFacade;
import org.andromda.metafacades.uml.DependencyFacade;
import org.andromda.metafacades.uml.ModelElementFacade;
import org.andromda.metafacades.uml.ModelFacade;
import org.andromda.metafacades.uml.OperationFacade;
import org.andromda.metafacades.uml.PackageFacade;
import org.andromda.metafacades.uml.ParameterFacade;
import org.andromda.metafacades.uml.StateFacade;
import org.andromda.metafacades.uml.StateMachineFacade;
import org.andromda.metafacades.uml.StereotypeFacade;
import org.andromda.metafacades.uml.TaggedValueFacade;
import org.andromda.metafacades.uml.TemplateParameterFacade;
import org.andromda.metafacades.uml.TransitionFacade;
import org.andromda.metafacades.uml.TypeMappings;
import org.andromda.translation.ocl.validation.OCLCollections;
import org.andromda.translation.ocl.validation.OCLExpressions;
import org.andromda.translation.ocl.validation.OCLIntrospector;
import org.andromda.translation.ocl.validation.OCLResultEnsurer;
import org.apache.commons.collections.Predicate;
import org.apache.log4j.Logger;

/**
 * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmAction
 * MetafacadeLogic for JBpmAction
 *
 * @see JBpmAction
 */
public abstract class JBpmActionLogic
    extends MetafacadeBase
    implements JBpmAction
{
    /**
     * The underlying UML object
     * @see Object
     */
    protected Object metaObject;

    /** Create Metafacade implementation instance using the MetafacadeFactory from the context
     * @param metaObjectIn
     * @param context
     */
    protected JBpmActionLogic(Object metaObjectIn, String context)
    {
        super(metaObjectIn, getContext(context));
        this.superCallEventFacade =
           (CallEventFacade)
            MetafacadeFactory.getInstance().createFacadeImpl(
                    "org.andromda.metafacades.uml.CallEventFacade",
                    metaObjectIn,
                    getContext(context));
        this.metaObject = metaObjectIn;
    }

    /**
     * The logger instance.
     */
    private static final Logger logger = Logger.getLogger(JBpmActionLogic.class);

    /**
     * Gets the context for this metafacade logic instance.
     * @param context String. Set to JBpmAction if null
     * @return context String
     */
    private static String getContext(String context)
    {
        if (context == null)
        {
            context = "org.andromda.cartridges.jbpm.metafacades.JBpmAction";
        }
        return context;
    }

    private CallEventFacade superCallEventFacade;
    private boolean superCallEventFacadeInitialized = false;

    /**
     * Gets the CallEventFacade parent instance.
     * @return this.superCallEventFacade CallEventFacade
     */
    private CallEventFacade getSuperCallEventFacade()
    {
        if (!this.superCallEventFacadeInitialized)
        {
            ((MetafacadeBase)this.superCallEventFacade).setMetafacadeContext(this.getMetafacadeContext());
            this.superCallEventFacadeInitialized = true;
        }
        return this.superCallEventFacade;
    }

    /** Reset context only for non-root metafacades
     * @param context
     * @see MetafacadeBase#resetMetafacadeContext(String context)
     */
    @Override
    public void resetMetafacadeContext(String context)
    {
        if (!this.contextRoot) // reset context only for non-root metafacades
        {
            context = getContext(context);  // to have same value as in original constructor call
            setMetafacadeContext (context);
            if (this.superCallEventFacadeInitialized)
            {
                ((MetafacadeBase)this.superCallEventFacade).resetMetafacadeContext(context);
            }
        }
    }

    /**
     * @return boolean true always
     * @see JBpmAction
     */
    public boolean isJBpmActionMetaType()
    {
        return true;
    }

    // --------------- attributes ---------------------

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#isBeforeSignal()
    * @return boolean
    */
    protected abstract boolean handleIsBeforeSignal();

    private boolean __beforeSignal1a;
    private boolean __beforeSignal1aSet = false;

    /**
     * TODO: Model Documentation for
     * org.andromda.cartridges.jbpm.metafacades.JBpmAction.beforeSignal
     * @return (boolean)handleIsBeforeSignal()
     */
    public final boolean isBeforeSignal()
    {
        boolean beforeSignal1a = this.__beforeSignal1a;
        if (!this.__beforeSignal1aSet)
        {
            // beforeSignal has no pre constraints
            beforeSignal1a = handleIsBeforeSignal();
            // beforeSignal has no post constraints
            this.__beforeSignal1a = beforeSignal1a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__beforeSignal1aSet = true;
            }
        }
        return beforeSignal1a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#isAfterSignal()
    * @return boolean
    */
    protected abstract boolean handleIsAfterSignal();

    private boolean __afterSignal2a;
    private boolean __afterSignal2aSet = false;

    /**
     * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmAction.afterSignal
     * @return (boolean)handleIsAfterSignal()
     */
    public final boolean isAfterSignal()
    {
        boolean afterSignal2a = this.__afterSignal2a;
        if (!this.__afterSignal2aSet)
        {
            // afterSignal has no pre constraints
            afterSignal2a = handleIsAfterSignal();
            // afterSignal has no post constraints
            this.__afterSignal2a = afterSignal2a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__afterSignal2aSet = true;
            }
        }
        return afterSignal2a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#isNodeEnter()
    * @return boolean
    */
    protected abstract boolean handleIsNodeEnter();

    private boolean __nodeEnter3a;
    private boolean __nodeEnter3aSet = false;

    /**
     * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmAction.nodeEnter
     * @return (boolean)handleIsNodeEnter()
     */
    public final boolean isNodeEnter()
    {
        boolean nodeEnter3a = this.__nodeEnter3a;
        if (!this.__nodeEnter3aSet)
        {
            // nodeEnter has no pre constraints
            nodeEnter3a = handleIsNodeEnter();
            // nodeEnter has no post constraints
            this.__nodeEnter3a = nodeEnter3a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__nodeEnter3aSet = true;
            }
        }
        return nodeEnter3a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#isNodeLeave()
    * @return boolean
    */
    protected abstract boolean handleIsNodeLeave();

    private boolean __nodeLeave4a;
    private boolean __nodeLeave4aSet = false;

    /**
     * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmAction.nodeLeave
     * @return (boolean)handleIsNodeLeave()
     */
    public final boolean isNodeLeave()
    {
        boolean nodeLeave4a = this.__nodeLeave4a;
        if (!this.__nodeLeave4aSet)
        {
            // nodeLeave has no pre constraints
            nodeLeave4a = handleIsNodeLeave();
            // nodeLeave has no post constraints
            this.__nodeLeave4a = nodeLeave4a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__nodeLeave4aSet = true;
            }
        }
        return nodeLeave4a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#isTask()
    * @return boolean
    */
    protected abstract boolean handleIsTask();

    private boolean __task5a;
    private boolean __task5aSet = false;

    /**
     * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmAction.task
     * @return (boolean)handleIsTask()
     */
    public final boolean isTask()
    {
        boolean task5a = this.__task5a;
        if (!this.__task5aSet)
        {
            // task has no pre constraints
            task5a = handleIsTask();
            // task has no post constraints
            this.__task5a = task5a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__task5aSet = true;
            }
        }
        return task5a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#isBlocking()
    * @return boolean
    */
    protected abstract boolean handleIsBlocking();

    private boolean __blocking6a;
    private boolean __blocking6aSet = false;

    /**
     * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmAction.blocking
     * @return (boolean)handleIsBlocking()
     */
    public final boolean isBlocking()
    {
        boolean blocking6a = this.__blocking6a;
        if (!this.__blocking6aSet)
        {
            // blocking has no pre constraints
            blocking6a = handleIsBlocking();
            // blocking has no post constraints
            this.__blocking6a = blocking6a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__blocking6aSet = true;
            }
        }
        return blocking6a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#getDueDate()
    * @return String
    */
    protected abstract String handleGetDueDate();

    private String __dueDate7a;
    private boolean __dueDate7aSet = false;

    /**
     * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmAction.dueDate
     * @return (String)handleGetDueDate()
     */
    public final String getDueDate()
    {
        String dueDate7a = this.__dueDate7a;
        if (!this.__dueDate7aSet)
        {
            // dueDate has no pre constraints
            dueDate7a = handleGetDueDate();
            // dueDate has no post constraints
            this.__dueDate7a = dueDate7a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__dueDate7aSet = true;
            }
        }
        return dueDate7a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#getClazz()
    * @return String
    */
    protected abstract String handleGetClazz();

    private String __clazz8a;
    private boolean __clazz8aSet = false;

    /**
     * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmAction.clazz
     * @return (String)handleGetClazz()
     */
    public final String getClazz()
    {
        String clazz8a = this.__clazz8a;
        if (!this.__clazz8aSet)
        {
            // clazz has no pre constraints
            clazz8a = handleGetClazz();
            // clazz has no post constraints
            this.__clazz8a = clazz8a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__clazz8aSet = true;
            }
        }
        return clazz8a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#getConfigType()
    * @return String
    */
    protected abstract String handleGetConfigType();

    private String __configType9a;
    private boolean __configType9aSet = false;

    /**
     * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmAction.configType
     * @return (String)handleGetConfigType()
     */
    public final String getConfigType()
    {
        String configType9a = this.__configType9a;
        if (!this.__configType9aSet)
        {
            // configType has no pre constraints
            configType9a = handleGetConfigType();
            // configType has no post constraints
            this.__configType9a = configType9a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__configType9aSet = true;
            }
        }
        return configType9a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#isAssignment()
    * @return boolean
    */
    protected abstract boolean handleIsAssignment();

    private boolean __assignment10a;
    private boolean __assignment10aSet = false;

    /**
     * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmAction.assignment
     * @return (boolean)handleIsAssignment()
     */
    public final boolean isAssignment()
    {
        boolean assignment10a = this.__assignment10a;
        if (!this.__assignment10aSet)
        {
            // assignment has no pre constraints
            assignment10a = handleIsAssignment();
            // assignment has no post constraints
            this.__assignment10a = assignment10a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__assignment10aSet = true;
            }
        }
        return assignment10a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#isTimer()
    * @return boolean
    */
    protected abstract boolean handleIsTimer();

    private boolean __timer11a;
    private boolean __timer11aSet = false;

    /**
     * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmAction.timer
     * @return (boolean)handleIsTimer()
     */
    public final boolean isTimer()
    {
        boolean timer11a = this.__timer11a;
        if (!this.__timer11aSet)
        {
            // timer has no pre constraints
            timer11a = handleIsTimer();
            // timer has no post constraints
            this.__timer11a = timer11a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__timer11aSet = true;
            }
        }
        return timer11a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#isContainedInBusinessProcess()
    * @return boolean
    */
    protected abstract boolean handleIsContainedInBusinessProcess();

    private boolean __containedInBusinessProcess12a;
    private boolean __containedInBusinessProcess12aSet = false;

    /**
     * True if this element is part of a business process usecase.
     * @return (boolean)handleIsContainedInBusinessProcess()
     */
    public final boolean isContainedInBusinessProcess()
    {
        boolean containedInBusinessProcess12a = this.__containedInBusinessProcess12a;
        if (!this.__containedInBusinessProcess12aSet)
        {
            // containedInBusinessProcess has no pre constraints
            containedInBusinessProcess12a = handleIsContainedInBusinessProcess();
            // containedInBusinessProcess has no post constraints
            this.__containedInBusinessProcess12a = containedInBusinessProcess12a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__containedInBusinessProcess12aSet = true;
            }
        }
        return containedInBusinessProcess12a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#getTimerRepeat()
    * @return String
    */
    protected abstract String handleGetTimerRepeat();

    private String __timerRepeat13a;
    private boolean __timerRepeat13aSet = false;

    /**
     * TODO: Model Documentation for org.andromda.cartridges.jbpm.metafacades.JBpmAction.timerRepeat
     * @return (String)handleGetTimerRepeat()
     */
    public final String getTimerRepeat()
    {
        String timerRepeat13a = this.__timerRepeat13a;
        if (!this.__timerRepeat13aSet)
        {
            // timerRepeat has no pre constraints
            timerRepeat13a = handleGetTimerRepeat();
            // timerRepeat has no post constraints
            this.__timerRepeat13a = timerRepeat13a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__timerRepeat13aSet = true;
            }
        }
        return timerRepeat13a;
    }

   /**
    * @see org.andromda.cartridges.jbpm.metafacades.JBpmAction#getTimerTransition()
    * @return String
    */
    protected abstract String handleGetTimerTransition();

    private String __timerTransition14a;
    private boolean __timerTransition14aSet = false;

    /**
     * TODO: Model Documentation for
     * org.andromda.cartridges.jbpm.metafacades.JBpmAction.timerTransition
     * @return (String)handleGetTimerTransition()
     */
    public final String getTimerTransition()
    {
        String timerTransition14a = this.__timerTransition14a;
        if (!this.__timerTransition14aSet)
        {
            // timerTransition has no pre constraints
            timerTransition14a = handleGetTimerTransition();
            // timerTransition has no post constraints
            this.__timerTransition14a = timerTransition14a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__timerTransition14aSet = true;
            }
        }
        return timerTransition14a;
    }

    // ------------- associations ------------------

    /**
     * @return true
     * @see CallEventFacade
     */
    public boolean isCallEventFacadeMetaType()
    {
        return true;
    }

    /**
     * @return true
     * @see org.andromda.metafacades.uml.EventFacade
     */
    public boolean isEventFacadeMetaType()
    {
        return true;
    }

    /**
     * @return true
     * @see ModelElementFacade
     */
    public boolean isModelElementFacadeMetaType()
    {
        return true;
    }

    // ----------- delegates to CallEventFacade ------------
    /**
     * The operation called by this event.
     * @see CallEventFacade#getOperation()
     */
    public OperationFacade getOperation()
    {
        return this.getSuperCallEventFacade().getOperation();
    }

    /**
     * The operations of this call event facade.  For UML 1.4 only one operation will be present,
     * for UML2, there can be more than one present.
     * @see CallEventFacade#getOperations()
     */
    public Collection<OperationFacade> getOperations()
    {
        return this.getSuperCallEventFacade().getOperations();
    }

    /**
     * The parameters to this event.
     * @see org.andromda.metafacades.uml.EventFacade#getParameters()
     */
    public Collection<ParameterFacade> getParameters()
    {
        return this.getSuperCallEventFacade().getParameters();
    }

    /**
     * If this event is located on an action state, this will represent that state.
     * @see org.andromda.metafacades.uml.EventFacade#getState()
     */
    public StateFacade getState()
    {
        return this.getSuperCallEventFacade().getState();
    }

    /**
     * If this event is located on a transition, this represents that transition.
     * @see org.andromda.metafacades.uml.EventFacade#getTransition()
     */
    public TransitionFacade getTransition()
    {
        return this.getSuperCallEventFacade().getTransition();
    }

    /**
     * Copies all tagged values from the given ModelElementFacade to this model element facade.
     * @see ModelElementFacade#copyTaggedValues(ModelElementFacade element)
     */
    public void copyTaggedValues(ModelElementFacade element)
    {
        this.getSuperCallEventFacade().copyTaggedValues(element);
    }

    /**
     * Finds the tagged value with the specified 'tagName'. In case there are more values the first
     * one found will be returned.
     * @see ModelElementFacade#findTaggedValue(String tagName)
     */
    public Object findTaggedValue(String tagName)
    {
        return this.getSuperCallEventFacade().findTaggedValue(tagName);
    }

    /**
     * Returns all the values for the tagged value with the specified name. The returned collection
     * will contains only String instances, or will be empty. Never null.
     * @see ModelElementFacade#findTaggedValues(String tagName)
     */
    public Collection<Object> findTaggedValues(String tagName)
    {
        return this.getSuperCallEventFacade().findTaggedValues(tagName);
    }

    /**
     * Returns the fully qualified name of the model element. The fully qualified name includes
     * complete package qualified name of the underlying model element. The templates parameter will
     * be replaced by the correct one given the binding relation of the parameter to this element.
     * @see ModelElementFacade#getBindedFullyQualifiedName(ModelElementFacade bindedElement)
     */
    public String getBindedFullyQualifiedName(ModelElementFacade bindedElement)
    {
        return this.getSuperCallEventFacade().getBindedFullyQualifiedName(bindedElement);
    }

    /**
     * Gets all constraints belonging to the model element.
     * @see ModelElementFacade#getConstraints()
     */
    public Collection<ConstraintFacade> getConstraints()
    {
        return this.getSuperCallEventFacade().getConstraints();
    }

    /**
     * Returns the constraints of the argument kind that have been placed onto this model. Typical
     * kinds are "inv", "pre" and "post". Other kinds are possible.
     * @see ModelElementFacade#getConstraints(String kind)
     */
    public Collection<ConstraintFacade> getConstraints(String kind)
    {
        return this.getSuperCallEventFacade().getConstraints(kind);
    }

    /**
     * Gets the documentation for the model element, The indent argument is prefixed to each line.
     * By default this method wraps lines after 64 characters.
     * This method is equivalent to <code>getDocumentation(indent, 64)</code>.
     * @see ModelElementFacade#getDocumentation(String indent)
     */
    public String getDocumentation(String indent)
    {
        return this.getSuperCallEventFacade().getDocumentation(indent);
    }

    /**
     * This method returns the documentation for this model element, with the lines wrapped after
     * the specified number of characters, values of less than 1 will indicate no line wrapping is
     * required. By default paragraphs are returned as HTML.
     * This method is equivalent to <code>getDocumentation(indent, lineLength, true)</code>.
     * @see ModelElementFacade#getDocumentation(String indent, int lineLength)
     */
    public String getDocumentation(String indent, int lineLength)
    {
        return this.getSuperCallEventFacade().getDocumentation(indent, lineLength);
    }

    /**
     * This method returns the documentation for this model element, with the lines wrapped after
     * the specified number of characters, values of less than 1 will indicate no line wrapping is
     * required. HTML style determines if HTML Escaping is applied.
     * @see ModelElementFacade#getDocumentation(String indent, int lineLength, boolean htmlStyle)
     */
    public String getDocumentation(String indent, int lineLength, boolean htmlStyle)
    {
        return this.getSuperCallEventFacade().getDocumentation(indent, lineLength, htmlStyle);
    }

    /**
     * The fully qualified name of this model element.
     * @see ModelElementFacade#getFullyQualifiedName()
     */
    public String getFullyQualifiedName()
    {
        return this.getSuperCallEventFacade().getFullyQualifiedName();
    }

    /**
     * Returns the fully qualified name of the model element. The fully qualified name includes
     * complete package qualified name of the underlying model element.  If modelName is true, then
     * the original name of the model element (the name contained within the model) will be the name
     * returned, otherwise a name from a language mapping will be returned.
     * @see ModelElementFacade#getFullyQualifiedName(boolean modelName)
     */
    public String getFullyQualifiedName(boolean modelName)
    {
        return this.getSuperCallEventFacade().getFullyQualifiedName(modelName);
    }

    /**
     * Returns the fully qualified name as a path, the returned value always starts with out a slash
     * '/'.
     * @see ModelElementFacade#getFullyQualifiedNamePath()
     */
    public String getFullyQualifiedNamePath()
    {
        return this.getSuperCallEventFacade().getFullyQualifiedNamePath();
    }

    /**
     * Gets the unique identifier of the underlying model element.
     * @see ModelElementFacade#getId()
     */
    public String getId()
    {
        return this.getSuperCallEventFacade().getId();
    }

    /**
     * UML2: Retrieves the keywords for this element. Used to modify implementation properties which
     * are not represented by other properties, i.e. native, transient, volatile, synchronized,
     * (added annotations) override, deprecated. Can also be used to suppress compiler warnings:
     * (added annotations) unchecked, fallthrough, path, serial, finally, all. Annotations require
     * JDK5 compiler level.
     * @see ModelElementFacade#getKeywords()
     */
    public Collection<String> getKeywords()
    {
        return this.getSuperCallEventFacade().getKeywords();
    }

    /**
     * UML2: Retrieves a localized label for this named element.
     * @see ModelElementFacade#getLabel()
     */
    public String getLabel()
    {
        return this.getSuperCallEventFacade().getLabel();
    }

    /**
     * The language mappings that have been set for this model element.
     * @see ModelElementFacade#getLanguageMappings()
     */
    public TypeMappings getLanguageMappings()
    {
        return this.getSuperCallEventFacade().getLanguageMappings();
    }

    /**
     * Return the model containing this model element (multiple models may be loaded and processed
     * at the same time).
     * @see ModelElementFacade#getModel()
     */
    public ModelFacade getModel()
    {
        return this.getSuperCallEventFacade().getModel();
    }

    /**
     * The name of the model element.
     * @see ModelElementFacade#getName()
     */
    public String getName()
    {
        return this.getSuperCallEventFacade().getName();
    }

    /**
     * Gets the package to which this model element belongs.
     * @see ModelElementFacade#getPackage()
     */
    public ModelElementFacade getPackage()
    {
        return this.getSuperCallEventFacade().getPackage();
    }

    /**
     * The name of this model element's package.
     * @see ModelElementFacade#getPackageName()
     */
    public String getPackageName()
    {
        return this.getSuperCallEventFacade().getPackageName();
    }

    /**
     * Gets the package name (optionally providing the ability to retrieve the model name and not
     * the mapped name).
     * @see ModelElementFacade#getPackageName(boolean modelName)
     */
    public String getPackageName(boolean modelName)
    {
        return this.getSuperCallEventFacade().getPackageName(modelName);
    }

    /**
     * Returns the package as a path, the returned value always starts with out a slash '/'.
     * @see ModelElementFacade#getPackagePath()
     */
    public String getPackagePath()
    {
        return this.getSuperCallEventFacade().getPackagePath();
    }

    /**
     * UML2: Returns the value of the 'Qualified Name' attribute. A name which allows the
     * NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from
     * the names of the containing namespaces starting at the root of the hierarchy and ending with
     * the name of the NamedElement itself.
     * @see ModelElementFacade#getQualifiedName()
     */
    public String getQualifiedName()
    {
        return this.getSuperCallEventFacade().getQualifiedName();
    }

    /**
     * Gets the root package for the model element.
     * @see ModelElementFacade#getRootPackage()
     */
    public PackageFacade getRootPackage()
    {
        return this.getSuperCallEventFacade().getRootPackage();
    }

    /**
     * Gets the dependencies for which this model element is the source.
     * @see ModelElementFacade#getSourceDependencies()
     */
    public Collection<DependencyFacade> getSourceDependencies()
    {
        return this.getSuperCallEventFacade().getSourceDependencies();
    }

    /**
     * If this model element is the context of an activity graph, this represents that activity
     * graph.
     * @see ModelElementFacade#getStateMachineContext()
     */
    public StateMachineFacade getStateMachineContext()
    {
        return this.getSuperCallEventFacade().getStateMachineContext();
    }

    /**
     * The collection of ALL stereotype names for this model element.
     * @see ModelElementFacade#getStereotypeNames()
     */
    public Collection<String> getStereotypeNames()
    {
        return this.getSuperCallEventFacade().getStereotypeNames();
    }

    /**
     * Gets all stereotypes for this model element.
     * @see ModelElementFacade#getStereotypes()
     */
    public Collection<StereotypeFacade> getStereotypes()
    {
        return this.getSuperCallEventFacade().getStereotypes();
    }

    /**
     * Return the TaggedValues associated with this model element, under all stereotypes.
     * @see ModelElementFacade#getTaggedValues()
     */
    public Collection<TaggedValueFacade> getTaggedValues()
    {
        return this.getSuperCallEventFacade().getTaggedValues();
    }

    /**
     * Gets the dependencies for which this model element is the target.
     * @see ModelElementFacade#getTargetDependencies()
     */
    public Collection<DependencyFacade> getTargetDependencies()
    {
        return this.getSuperCallEventFacade().getTargetDependencies();
    }

    /**
     * Get the template parameter for this model element having the parameterName
     * @see ModelElementFacade#getTemplateParameter(String parameterName)
     */
    public Object getTemplateParameter(String parameterName)
    {
        return this.getSuperCallEventFacade().getTemplateParameter(parameterName);
    }

    /**
     * Get the template parameters for this model element
     * @see ModelElementFacade#getTemplateParameters()
     */
    public Collection<TemplateParameterFacade> getTemplateParameters()
    {
        return this.getSuperCallEventFacade().getTemplateParameters();
    }

    /**
     * The visibility (i.e. public, private, protected or package) of the model element, will
     * attempt a lookup for these values in the language mappings (if any).
     * @see ModelElementFacade#getVisibility()
     */
    public String getVisibility()
    {
        return this.getSuperCallEventFacade().getVisibility();
    }

    /**
     * Returns true if the model element has the exact stereotype (meaning no stereotype inheritance
     * is taken into account when searching for the stereotype), false otherwise.
     * @see ModelElementFacade#hasExactStereotype(String stereotypeName)
     */
    public boolean hasExactStereotype(String stereotypeName)
    {
        return this.getSuperCallEventFacade().hasExactStereotype(stereotypeName);
    }

    /**
     * Does the UML Element contain the named Keyword? Keywords can be separated by space, comma,
     * pipe, semicolon, or << >>
     * @see ModelElementFacade#hasKeyword(String keywordName)
     */
    public boolean hasKeyword(String keywordName)
    {
        return this.getSuperCallEventFacade().hasKeyword(keywordName);
    }

    /**
     * Returns true if the model element has the specified stereotype.  If the stereotype itself
     * does not match, then a search will be made up the stereotype inheritance hierarchy, and if
     * one of the stereotype's ancestors has a matching name this method will return true, false
     * otherwise.
     * For example, if we have a certain stereotype called <<exception>> and a model element has a
     * stereotype called <<applicationException>> which extends <<exception>>, when calling this
     * method with 'stereotypeName' defined as 'exception' the method would return true since
     * <<applicationException>> inherits from <<exception>>.  If you want to check if the model
     * element has the exact stereotype, then use the method 'hasExactStereotype' instead.
     * @see ModelElementFacade#hasStereotype(String stereotypeName)
     */
    public boolean hasStereotype(String stereotypeName)
    {
        return this.getSuperCallEventFacade().hasStereotype(stereotypeName);
    }

    /**
     * True if there are target dependencies from this element that are instances of BindingFacade.
     * Deprecated in UML2: Use TemplateBinding parameters instead of dependencies.
     * @see ModelElementFacade#isBindingDependenciesPresent()
     */
    public boolean isBindingDependenciesPresent()
    {
        return this.getSuperCallEventFacade().isBindingDependenciesPresent();
    }

    /**
     * Indicates if any constraints are present on this model element.
     * @see ModelElementFacade#isConstraintsPresent()
     */
    public boolean isConstraintsPresent()
    {
        return this.getSuperCallEventFacade().isConstraintsPresent();
    }

    /**
     * Indicates if any documentation is present on this model element.
     * @see ModelElementFacade#isDocumentationPresent()
     */
    public boolean isDocumentationPresent()
    {
        return this.getSuperCallEventFacade().isDocumentationPresent();
    }

    /**
     * True if this element name is a reserved word in Java, C#, ANSI or ISO C, C++, JavaScript.
     * @see ModelElementFacade#isReservedWord()
     */
    public boolean isReservedWord()
    {
        return this.getSuperCallEventFacade().isReservedWord();
    }

    /**
     * True is there are template parameters on this model element. For UML2, applies to Class,
     * Operation, Property, and Parameter.
     * @see ModelElementFacade#isTemplateParametersPresent()
     */
    public boolean isTemplateParametersPresent()
    {
        return this.getSuperCallEventFacade().isTemplateParametersPresent();
    }

    /**
     * True if this element name is a valid identifier name in Java, C#, ANSI or ISO C, C++,
     * JavaScript. Contains no spaces, special characters etc. Constraint always applied on
     * Enumerations and Interfaces, optionally applies on other model elements.
     * @see ModelElementFacade#isValidIdentifierName()
     */
    public boolean isValidIdentifierName()
    {
        return this.getSuperCallEventFacade().isValidIdentifierName();
    }

    /**
     * Searches for the constraint with the specified 'name' on this model element, and if found
     * translates it using the specified 'translation' from a translation library discovered by the
     * framework.
     * @see ModelElementFacade#translateConstraint(String name, String translation)
     */
    public String translateConstraint(String name, String translation)
    {
        return this.getSuperCallEventFacade().translateConstraint(name, translation);
    }

    /**
     * Translates all constraints belonging to this model element with the given 'translation'.
     * @see ModelElementFacade#translateConstraints(String translation)
     */
    public String[] translateConstraints(String translation)
    {
        return this.getSuperCallEventFacade().translateConstraints(translation);
    }

    /**
     * Translates the constraints of the specified 'kind' belonging to this model element.
     * @see ModelElementFacade#translateConstraints(String kind, String translation)
     */
    public String[] translateConstraints(String kind, String translation)
    {
        return this.getSuperCallEventFacade().translateConstraints(kind, translation);
    }

    /**
     * @see MetafacadeBase#initialize()
     */
    @Override
    public void initialize()
    {
        this.getSuperCallEventFacade().initialize();
    }

    /**
     * @return Object getSuperCallEventFacade().getValidationOwner()
     * @see MetafacadeBase#getValidationOwner()
     */
    @Override
    public Object getValidationOwner()
    {
        Object owner = this.getSuperCallEventFacade().getValidationOwner();
        return owner;
    }

    /**
     * @return String getSuperCallEventFacade().getValidationName()
     * @see MetafacadeBase#getValidationName()
     */
    @Override
    public String getValidationName()
    {
        String name = this.getSuperCallEventFacade().getValidationName();
        return name;
    }

    /**
     * <p><b>Constraint:</b> org::andromda::cartridges::jbpm::metafacades::JBpmAction::action needs to be of known type</p>
     * <p><b>Error:</b> This element needs to represent either an 'after signal', 'before signal', 'node enter', 'node leave', 'timer' or 'task'. This is done by attaching the appropriate stereotype to the deferrable event.</p>
     * <p><b>OCL:</b> context JBpmAction inv: nodeEnter or nodeLeave or task or beforeSignal or afterSignal or timer</p>
     * <p><b>Constraint:</b> org::andromda::cartridges::jbpm::metafacades::JBpmAction::timers need a due date</p>
     * <p><b>Error:</b> Timers need to have their due date specified, use the corresponding tagged value to set it.</p>
     * <p><b>OCL:</b> context JBpmAction inv: timer implies dueDate->notEmpty()</p>
     * <p><b>Constraint:</b> org::andromda::cartridges::jbpm::metafacades::JBpmAction::timers sometimes require the transition tag</p>
     * <p><b>Error:</b> If a timer is modeled on a state with two or more outgoing transitions then this timer needs to know which one to take after execution, this is done by means of a tagged value.</p>
     * <p><b>OCL:</b> context JBpmAction inv: let transitionName : String = timerTransition in (timer and state.outgoings->size() > 1) implies (transitionName->notEmpty() and state.outgoings->one(name = transitionName))</p>
     * @param validationMessages Collection<ModelValidationMessage>
     * @see MetafacadeBase#validateInvariants(Collection validationMessages)
     */
    @Override
    public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
    {
        this.getSuperCallEventFacade().validateInvariants(validationMessages);
        try
        {
            final Object contextElement = this.THIS();
            boolean constraintValid = OCLResultEnsurer.ensure(Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"nodeEnter"))).booleanValue()||Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"nodeLeave"))).booleanValue()||Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"task"))).booleanValue()||Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"beforeSignal"))).booleanValue()||Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"afterSignal"))).booleanValue()||Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"timer"))).booleanValue());
            if (!constraintValid)
            {
                validationMessages.add(
                    new ModelValidationMessage(
                        (MetafacadeBase)contextElement ,
                        "org::andromda::cartridges::jbpm::metafacades::JBpmAction::action needs to be of known type",
                        "This element needs to represent either an 'after signal', 'before signal', 'node enter', 'node leave', 'timer' or 'task'. This is done by attaching the appropriate stereotype to the deferrable event."));
            }
        }
        catch (Throwable th)
        {
            Throwable cause = th.getCause();
            int depth = 0; // Some throwables have infinite recursion
            while (cause != null && depth < 7)
            {
                th = cause;
                depth++;
            }
            logger.error("Error validating constraint 'org::andromda::cartridges::jbpm::metafacades::JBpmAction::action needs to be of known type' ON "
                + this.THIS().toString() + ": " + th.getMessage(), th);
        }
        try
        {
            final Object contextElement = this.THIS();
            boolean constraintValid = OCLResultEnsurer.ensure((Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"timer"))).booleanValue()?OCLCollections.notEmpty(OCLIntrospector.invoke(contextElement,"dueDate")):true));
            if (!constraintValid)
            {
                validationMessages.add(
                    new ModelValidationMessage(
                        (MetafacadeBase)contextElement ,
                        "org::andromda::cartridges::jbpm::metafacades::JBpmAction::timers need a due date",
                        "Timers need to have their due date specified, use the corresponding tagged value to set it."));
            }
        }
        catch (Throwable th)
        {
            Throwable cause = th.getCause();
            int depth = 0; // Some throwables have infinite recursion
            while (cause != null && depth < 7)
            {
                th = cause;
                depth++;
            }
            logger.error("Error validating constraint 'org::andromda::cartridges::jbpm::metafacades::JBpmAction::timers need a due date' ON "
                + this.THIS().toString() + ": " + th.getMessage(), th);
        }
        try
        {
            final Object contextElement = this.THIS();
            boolean constraintValid = OCLResultEnsurer.ensure((Boolean.valueOf(String.valueOf((Boolean.valueOf(String.valueOf(OCLIntrospector.invoke(contextElement,"timer"))).booleanValue()&&OCLExpressions.greater(OCLCollections.size(OCLIntrospector.invoke(contextElement,"state.outgoings")),1)))).booleanValue()?(OCLCollections.notEmpty(OCLIntrospector.invoke(contextElement,"timerTransition"))&&OCLCollections.one(OCLIntrospector.invoke(contextElement,"state.outgoings"),new Predicate(){public boolean evaluate(Object object){return Boolean.valueOf(String.valueOf(OCLExpressions.equal(OCLIntrospector.invoke(object,"name"),OCLIntrospector.invoke(contextElement,"timerTransition")))).booleanValue();}})):true));
            if (!constraintValid)
            {
                validationMessages.add(
                    new ModelValidationMessage(
                        (MetafacadeBase)contextElement ,
                        "org::andromda::cartridges::jbpm::metafacades::JBpmAction::timers sometimes require the transition tag",
                        "If a timer is modeled on a state with two or more outgoing transitions then this timer needs to know which one to take after execution, this is done by means of a tagged value."));
            }
        }
        catch (Throwable th)
        {
            Throwable cause = th.getCause();
            int depth = 0; // Some throwables have infinite recursion
            while (cause != null && depth < 7)
            {
                th = cause;
                depth++;
            }
            logger.error("Error validating constraint 'org::andromda::cartridges::jbpm::metafacades::JBpmAction::timers sometimes require the transition tag' ON "
                + this.THIS().toString() + ": " + th.getMessage(), th);
        }
    }

    /**
     * The property that stores the name of the metafacade.
     */
    private static final String NAME_PROPERTY = "name";
    private static final String FQNAME_PROPERTY = "fullyQualifiedName";

    /**
     * @see Object#toString()
     */
    @Override
    public String toString()
    {
        final StringBuilder toString = new StringBuilder(this.getClass().getName());
        toString.append("[");
        try
        {
            toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
        }
        catch (final Throwable tryAgain)
        {
            try
            {
                toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
            }
            catch (final Throwable ignore)
            {
                // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
            }
        }
        toString.append("]");
        return toString.toString();
    }
}