001// license-header java merge-point
002//
003// Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
004//
005package org.andromda.metafacades.uml14;
006
007import java.util.Collection;
008import org.andromda.core.metafacade.ModelValidationMessage;
009import org.andromda.metafacades.uml.Queue;
010
011/**
012 * TODO: Model Documentation for Queue
013 * MetafacadeLogic for Queue
014 *
015 * @see Queue
016 */
017public abstract class QueueLogic
018    extends DestinationLogicImpl
019    implements Queue
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 QueueLogic(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 Queue if null
040     * @return context String
041     */
042    private static String getContext(String context)
043    {
044        if (context == null)
045        {
046            context = "org.andromda.metafacades.uml.Queue";
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 Queue
067     */
068    public boolean isQueueMetaType()
069    {
070        return true;
071    }
072
073    /**
074     * @param validationMessages Collection<ModelValidationMessage>
075     * @see DestinationLogicImpl#validateInvariants(Collection validationMessages)
076     */
077    @Override
078    public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
079    {
080        super.validateInvariants(validationMessages);
081    }
082}