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.Destination;
10 import org.omg.uml.foundation.core.Node;
11
12 /**
13 * Represents a UML Destination for incoming/outgoing messages.
14 * MetafacadeLogic for Destination
15 *
16 * @see Destination
17 */
18 public abstract class DestinationLogic
19 extends NodeFacadeLogicImpl
20 implements Destination
21 {
22 /**
23 * The underlying UML object
24 * @see Object
25 */
26 protected Object metaObject;
27
28 /** Create Metafacade implementation instance using the MetafacadeFactory from the context
29 * @param metaObjectIn
30 * @param context
31 */
32 protected DestinationLogic(Object metaObjectIn, String context)
33 {
34 super((Node)metaObjectIn, getContext(context));
35 this.metaObject = metaObjectIn;
36 }
37
38 /**
39 * Gets the context for this metafacade logic instance.
40 * @param context String. Set to Destination if null
41 * @return context String
42 */
43 private static String getContext(String context)
44 {
45 if (context == null)
46 {
47 context = "org.andromda.metafacades.uml.Destination";
48 }
49 return context;
50 }
51
52 /** Reset context only for non-root metafacades
53 * @param context
54 */
55 @Override
56 public void resetMetafacadeContext(String context)
57 {
58 if (!this.contextRoot) // reset context only for non-root metafacades
59 {
60 context = getContext(context); // to have same value as in original constructor call
61 setMetafacadeContext (context);
62 }
63 }
64
65 /**
66 * @return boolean true always
67 * @see Destination
68 */
69 public boolean isDestinationMetaType()
70 {
71 return true;
72 }
73
74 // ------------- associations ------------------
75
76 /**
77 * @param validationMessages Collection<ModelValidationMessage>
78 * @see NodeFacadeLogicImpl#validateInvariants(Collection validationMessages)
79 */
80 @Override
81 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
82 {
83 super.validateInvariants(validationMessages);
84 }
85 }