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.FinalStateFacade;
10 import org.omg.uml.behavioralelements.statemachines.FinalState;
11
12 /**
13 * A special kind of state signifying that the enclosing region is completed. If the enclosing
14 * region is directly contained in a state machine and all other regions in the state machine also
15 * are completed, then it means that the entire state machine is completed.
16 * MetafacadeLogic for FinalStateFacade
17 *
18 * @see FinalStateFacade
19 */
20 public abstract class FinalStateFacadeLogic
21 extends StateFacadeLogicImpl
22 implements FinalStateFacade
23 {
24 /**
25 * The underlying UML object
26 * @see FinalState
27 */
28 protected FinalState metaObject;
29
30 /** Create Metafacade implementation instance using the MetafacadeFactory from the context
31 * @param metaObjectIn
32 * @param context
33 */
34 protected FinalStateFacadeLogic(FinalState metaObjectIn, String context)
35 {
36 super(metaObjectIn, getContext(context));
37 this.metaObject = metaObjectIn;
38 }
39
40 /**
41 * Gets the context for this metafacade logic instance.
42 * @param context String. Set to FinalStateFacade if null
43 * @return context String
44 */
45 private static String getContext(String context)
46 {
47 if (context == null)
48 {
49 context = "org.andromda.metafacades.uml.FinalStateFacade";
50 }
51 return context;
52 }
53
54 /** Reset context only for non-root metafacades
55 * @param context
56 */
57 @Override
58 public void resetMetafacadeContext(String context)
59 {
60 if (!this.contextRoot) // reset context only for non-root metafacades
61 {
62 context = getContext(context); // to have same value as in original constructor call
63 setMetafacadeContext (context);
64 }
65 }
66
67 /**
68 * @return boolean true always
69 * @see FinalStateFacade
70 */
71 public boolean isFinalStateFacadeMetaType()
72 {
73 return true;
74 }
75
76 // ------------- associations ------------------
77
78 /**
79 * @param validationMessages Collection<ModelValidationMessage>
80 * @see StateFacadeLogicImpl#validateInvariants(Collection validationMessages)
81 */
82 @Override
83 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
84 {
85 super.validateInvariants(validationMessages);
86 }
87 }