View Javadoc
1   // license-header java merge-point
2   //
3   // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
4   //
5   package org.andromda.metafacades.uml14;
6   
7   import java.util.Collection;
8   import org.andromda.core.metafacade.ModelValidationMessage;
9   import org.andromda.metafacades.uml.InteractionFacade;
10  import org.omg.uml.foundation.core.ModelElement;
11  
12  /**
13   * An interaction is a unit of behavior that focuses on the observable exchange of information
14   * between connectable elements.
15   * MetafacadeLogic for InteractionFacade
16   *
17   * @see InteractionFacade
18   */
19  public abstract class InteractionFacadeLogic
20      extends ModelElementFacadeLogicImpl
21      implements InteractionFacade
22  {
23      /**
24       * The underlying UML object
25       * @see Object
26       */
27      protected Object metaObject;
28  
29      /** Create Metafacade implementation instance using the MetafacadeFactory from the context
30       * @param metaObjectIn
31       * @param context
32       */
33      protected InteractionFacadeLogic(Object metaObjectIn, String context)
34      {
35          super((ModelElement)metaObjectIn, getContext(context));
36          this.metaObject = metaObjectIn;
37      }
38  
39      /**
40       * Gets the context for this metafacade logic instance.
41       * @param context String. Set to InteractionFacade if null
42       * @return context String
43       */
44      private static String getContext(String context)
45      {
46          if (context == null)
47          {
48              context = "org.andromda.metafacades.uml.InteractionFacade";
49          }
50          return context;
51      }
52  
53      /** Reset context only for non-root metafacades
54       * @param context
55       */
56      @Override
57      public void resetMetafacadeContext(String context)
58      {
59          if (!this.contextRoot) // reset context only for non-root metafacades
60          {
61              context = getContext(context);  // to have same value as in original constructor call
62              setMetafacadeContext (context);
63          }
64      }
65  
66      /**
67       * @return boolean true always
68       * @see InteractionFacade
69       */
70      public boolean isInteractionFacadeMetaType()
71      {
72          return true;
73      }
74  
75      /**
76       * @param validationMessages Collection<ModelValidationMessage>
77       * @see ModelElementFacadeLogicImpl#validateInvariants(Collection validationMessages)
78       */
79      @Override
80      public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
81      {
82          super.validateInvariants(validationMessages);
83      }
84  }