1
2
3
4
5 package org.andromda.metafacades.uml14;
6
7 import java.util.Collection;
8 import java.util.List;
9 import org.andromda.core.metafacade.ModelValidationMessage;
10 import org.andromda.metafacades.uml.FrontEndAction;
11 import org.andromda.metafacades.uml.FrontEndPseudostate;
12 import org.apache.log4j.Logger;
13 import org.omg.uml.behavioralelements.statemachines.Pseudostate;
14
15
16
17
18
19
20
21
22 public abstract class FrontEndPseudostateLogic
23 extends PseudostateFacadeLogicImpl
24 implements FrontEndPseudostate
25 {
26
27
28
29
30 protected Object metaObject;
31
32
33
34
35
36 protected FrontEndPseudostateLogic(Object metaObjectIn, String context)
37 {
38 super((Pseudostate)metaObjectIn, getContext(context));
39 this.metaObject = metaObjectIn;
40 }
41
42
43
44
45 private static final Logger logger = Logger.getLogger(FrontEndPseudostateLogic.class);
46
47
48
49
50
51
52 private static String getContext(String context)
53 {
54 if (context == null)
55 {
56 context = "org.andromda.metafacades.uml.FrontEndPseudostate";
57 }
58 return context;
59 }
60
61
62
63
64 @Override
65 public void resetMetafacadeContext(String context)
66 {
67 if (!this.contextRoot)
68 {
69 context = getContext(context);
70 setMetafacadeContext (context);
71 }
72 }
73
74
75
76
77
78 public boolean isFrontEndPseudostateMetaType()
79 {
80 return true;
81 }
82
83
84
85
86
87
88
89 protected abstract boolean handleIsContainedInFrontEndUseCase();
90
91 private boolean __containedInFrontEndUseCase1a;
92 private boolean __containedInFrontEndUseCase1aSet = false;
93
94
95
96
97
98 public final boolean isContainedInFrontEndUseCase()
99 {
100 boolean containedInFrontEndUseCase1a = this.__containedInFrontEndUseCase1a;
101 if (!this.__containedInFrontEndUseCase1aSet)
102 {
103
104 containedInFrontEndUseCase1a = handleIsContainedInFrontEndUseCase();
105
106 this.__containedInFrontEndUseCase1a = containedInFrontEndUseCase1a;
107 if (isMetafacadePropertyCachingEnabled())
108 {
109 this.__containedInFrontEndUseCase1aSet = true;
110 }
111 }
112 return containedInFrontEndUseCase1a;
113 }
114
115
116
117 private List<FrontEndAction> __getContainerActions1r;
118 private boolean __getContainerActions1rSet = false;
119
120
121
122
123
124
125
126 public final List<FrontEndAction> getContainerActions()
127 {
128 List<FrontEndAction> getContainerActions1r = this.__getContainerActions1r;
129 if (!this.__getContainerActions1rSet)
130 {
131
132 List result = handleGetContainerActions();
133 List shieldedResult = this.shieldedElements(result);
134 try
135 {
136 getContainerActions1r = (List<FrontEndAction>)shieldedResult;
137 }
138 catch (ClassCastException ex)
139 {
140
141 FrontEndPseudostateLogic.logger.warn("incorrect metafacade cast for FrontEndPseudostateLogic.getContainerActions List<FrontEndAction> " + result + ": " + shieldedResult);
142 }
143
144 this.__getContainerActions1r = getContainerActions1r;
145 if (isMetafacadePropertyCachingEnabled())
146 {
147 this.__getContainerActions1rSet = true;
148 }
149 }
150 return getContainerActions1r;
151 }
152
153
154
155
156
157 protected abstract List handleGetContainerActions();
158
159
160
161
162
163 @Override
164 public void validateInvariants(Collection<ModelValidationMessage> validationMessages)
165 {
166 super.validateInvariants(validationMessages);
167 }
168 }