All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.andromda.metafacades.emf.uml22.ActionFacadeLogicImpl Maven / Gradle / Ivy

Go to download

The Eclipse EMF UML2 v2.X metafacades. This is the set of EMF UML2 2.X metafacades implementations. These implement the common UML metafacades for .uml model files.

The newest version!
package org.andromda.metafacades.emf.uml22;

import org.andromda.metafacades.uml.TransitionFacade;
import org.eclipse.uml2.uml.Action;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.State;
import org.eclipse.uml2.uml.Transition;

/**
 * MetafacadeLogic implementation for org.andromda.metafacades.uml.ActionFacade.
 *
 * @see org.andromda.metafacades.uml.ActionFacade
 */
public class ActionFacadeLogicImpl
    extends ActionFacadeLogic
{
    private static final long serialVersionUID = 9314317024410067L;

    /**
     * @param metaObjectIn
     * @param context
     */
    public ActionFacadeLogicImpl(
        final Action metaObjectIn,
        final String context)
    {
        super(metaObjectIn, context);
    }

    /**
     * @see org.andromda.metafacades.uml.ActionFacade#getTransition()
     */
    @Override
    protected Transition handleGetTransition()
    {
        final Element owner = this.metaObject.getActivity().getOwner();
        return (Transition)(owner instanceof Transition ? owner : null);
    }

    /**
     * @see org.andromda.metafacades.uml.ActionFacade#getActionState()
     */
    @Override
    protected State handleGetActionState()
    {
        final Element owner = this.metaObject.getActivity().getOwner();
        return (State)(owner instanceof State ? owner : null);
    }

    /**
     * @return validationOwner = getActionState()
     */
    //@Override
    public TransitionFacade handleGetValidationOwner()
    {
        Object validationOwner = getTransition();

        if (validationOwner == null)
        {
            validationOwner = getActionState();
        }

        return (TransitionFacade)validationOwner;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy