1
2
3
4 package org.andromda.metafacades.uml14;
5
6 /***
7 * MetafacadeLogic for org.andromda.metafacades.uml.FrontEndActivityGraph
8 *
9 * @see org.andromda.metafacades.uml.FrontEndActivityGraph
10 */
11 public abstract class FrontEndActivityGraphLogic
12 extends org.andromda.metafacades.uml14.ActivityGraphFacadeLogicImpl
13 implements org.andromda.metafacades.uml.FrontEndActivityGraph
14 {
15
16 protected Object metaObject;
17
18 public FrontEndActivityGraphLogic(Object metaObject, String context)
19 {
20 super((org.omg.uml.behavioralelements.activitygraphs.ActivityGraph)metaObject, getContext(context));
21 this.metaObject = metaObject;
22 }
23
24 /***
25 * Gets the context for this metafacade logic instance.
26 */
27 private static String getContext(String context)
28 {
29 if (context == null)
30 {
31 context = "org.andromda.metafacades.uml.FrontEndActivityGraph";
32 }
33 return context;
34 }
35
36 /***
37 * @see org.andromda.core.metafacade.MetafacadeBase
38 */
39 public void resetMetafacadeContext(String context)
40 {
41 if (!this.contextRoot)
42 {
43 context = getContext(context);
44 setMetafacadeContext (context);
45 }
46 }
47
48 /***
49 * @see org.andromda.metafacades.uml.FrontEndActivityGraph
50 */
51 public boolean isFrontEndActivityGraphMetaType()
52 {
53 return true;
54 }
55
56
57
58 /***
59 * @see org.andromda.metafacades.uml.FrontEndActivityGraph#isContainedInFrontEndUseCase()
60 */
61 protected abstract boolean handleIsContainedInFrontEndUseCase();
62
63 private void handleIsContainedInFrontEndUseCase1aPreCondition()
64 {
65 }
66
67 private void handleIsContainedInFrontEndUseCase1aPostCondition()
68 {
69 }
70
71 private boolean __containedInFrontEndUseCase1a;
72 private boolean __containedInFrontEndUseCase1aSet = false;
73
74 public final boolean isContainedInFrontEndUseCase()
75 {
76 boolean containedInFrontEndUseCase1a = this.__containedInFrontEndUseCase1a;
77 if (!this.__containedInFrontEndUseCase1aSet)
78 {
79 handleIsContainedInFrontEndUseCase1aPreCondition();
80 containedInFrontEndUseCase1a = handleIsContainedInFrontEndUseCase();
81 handleIsContainedInFrontEndUseCase1aPostCondition();
82 this.__containedInFrontEndUseCase1a = containedInFrontEndUseCase1a;
83 if (isMetafacadePropertyCachingEnabled())
84 {
85 this.__containedInFrontEndUseCase1aSet = true;
86 }
87 }
88 return containedInFrontEndUseCase1a;
89 }
90
91
92
93 private void handleGetController2rPreCondition()
94 {
95 }
96
97 private void handleGetController2rPostCondition()
98 {
99 }
100
101 private org.andromda.metafacades.uml.FrontEndController __getController2r;
102 private boolean __getController2rSet = false;
103
104 public final org.andromda.metafacades.uml.FrontEndController getController()
105 {
106 org.andromda.metafacades.uml.FrontEndController getController2r = this.__getController2r;
107 if (!this.__getController2rSet)
108 {
109 handleGetController2rPreCondition();
110 Object result = this.shieldedElement(handleGetController());
111 try
112 {
113 getController2r = (org.andromda.metafacades.uml.FrontEndController)result;
114 }
115 catch (ClassCastException ex)
116 {
117
118
119 }
120 handleGetController2rPostCondition();
121 this.__getController2r = getController2r;
122 if (isMetafacadePropertyCachingEnabled())
123 {
124 this.__getController2rSet = true;
125 }
126 }
127 return getController2r;
128 }
129
130 protected abstract java.lang.Object handleGetController();
131
132 private void handleGetInitialAction5rPreCondition()
133 {
134 }
135
136 private void handleGetInitialAction5rPostCondition()
137 {
138 }
139
140 private org.andromda.metafacades.uml.FrontEndAction __getInitialAction5r;
141 private boolean __getInitialAction5rSet = false;
142
143 public final org.andromda.metafacades.uml.FrontEndAction getInitialAction()
144 {
145 org.andromda.metafacades.uml.FrontEndAction getInitialAction5r = this.__getInitialAction5r;
146 if (!this.__getInitialAction5rSet)
147 {
148 handleGetInitialAction5rPreCondition();
149 Object result = this.shieldedElement(handleGetInitialAction());
150 try
151 {
152 getInitialAction5r = (org.andromda.metafacades.uml.FrontEndAction)result;
153 }
154 catch (ClassCastException ex)
155 {
156
157
158 }
159 handleGetInitialAction5rPostCondition();
160 this.__getInitialAction5r = getInitialAction5r;
161 if (isMetafacadePropertyCachingEnabled())
162 {
163 this.__getInitialAction5rSet = true;
164 }
165 }
166 return getInitialAction5r;
167 }
168
169 protected abstract java.lang.Object handleGetInitialAction();
170
171 /***
172 * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
173 */
174 public void validateInvariants(java.util.Collection validationMessages)
175 {
176 super.validateInvariants(validationMessages);
177 }
178
179 /***
180 * The property that stores the name of the metafacade.
181 */
182 private static final String NAME_PROPERTY = "name";
183
184 /***
185 * @see java.lang.Object#toString()
186 */
187 public String toString()
188 {
189 final StringBuffer toString = new StringBuffer(this.getClass().getName());
190 toString.append("[");
191 try
192 {
193 toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
194 }
195 catch (final Throwable throwable)
196 {
197
198 }
199 toString.append("]");
200 return toString.toString();
201 }
202 }