View Javadoc

1   //
2   // Attention: generated code (by MetafacadeLogic.vsl) - do not modify!
3   //
4   package org.andromda.metafacades.uml14;
5   
6   /***
7    * MetafacadeLogic for org.andromda.metafacades.uml.ActivityGraphFacade
8    *
9    * @see org.andromda.metafacades.uml.ActivityGraphFacade
10   */
11  public abstract class ActivityGraphFacadeLogic
12      extends org.andromda.metafacades.uml14.StateMachineFacadeLogicImpl
13      implements org.andromda.metafacades.uml.ActivityGraphFacade
14  {
15  
16      protected org.omg.uml.behavioralelements.activitygraphs.ActivityGraph metaObject;
17  
18      public ActivityGraphFacadeLogic(org.omg.uml.behavioralelements.activitygraphs.ActivityGraph metaObject, String context)
19      {
20          super(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.ActivityGraphFacade";
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) // reset context only for non-root metafacades
42          {
43              context = getContext(context);  // to have same value as in original constructor call
44              setMetafacadeContext (context);
45          }
46      }
47  
48      /***
49       * @see org.andromda.metafacades.uml.ActivityGraphFacade
50       */
51      public boolean isActivityGraphFacadeMetaType()
52      {
53          return true;
54      }
55      
56      // ------------- associations ------------------
57  
58      private void handleGetActionStates1rPreCondition()
59      {
60      }
61  
62      private void handleGetActionStates1rPostCondition()
63      {
64      }
65  
66      public final java.util.Collection getActionStates()
67      {
68          java.util.Collection getActionStates1r = null;
69          handleGetActionStates1rPreCondition();
70          Object result = this.shieldedElements(handleGetActionStates());
71          try
72          {
73              getActionStates1r = (java.util.Collection)result;
74          }
75          catch (ClassCastException ex)
76          {
77              // ignore since the metafacade shouldn't
78              // be set if its not of the correct type
79          }
80          handleGetActionStates1rPostCondition();
81          return getActionStates1r;
82      }
83  
84      protected abstract java.util.Collection handleGetActionStates();
85  
86      private void handleGetObjectFlowStates2rPreCondition()
87      {
88      }
89  
90      private void handleGetObjectFlowStates2rPostCondition()
91      {
92      }
93  
94      public final java.util.Collection getObjectFlowStates()
95      {
96          java.util.Collection getObjectFlowStates2r = null;
97          handleGetObjectFlowStates2rPreCondition();
98          Object result = this.shieldedElements(handleGetObjectFlowStates());
99          try
100         {
101             getObjectFlowStates2r = (java.util.Collection)result;
102         }
103         catch (ClassCastException ex)
104         {
105             // ignore since the metafacade shouldn't
106             // be set if its not of the correct type
107         }
108         handleGetObjectFlowStates2rPostCondition();
109         return getObjectFlowStates2r;
110     }
111 
112     protected abstract java.util.Collection handleGetObjectFlowStates();
113 
114     private void handleGetUseCase3rPreCondition()
115     {
116     }
117 
118     private void handleGetUseCase3rPostCondition()
119     {
120     }
121 
122     public final org.andromda.metafacades.uml.UseCaseFacade getUseCase()
123     {
124         org.andromda.metafacades.uml.UseCaseFacade getUseCase3r = null;
125         handleGetUseCase3rPreCondition();
126         Object result = this.shieldedElement(handleGetUseCase());
127         try
128         {
129             getUseCase3r = (org.andromda.metafacades.uml.UseCaseFacade)result;
130         }
131         catch (ClassCastException ex)
132         {
133             // ignore since the metafacade shouldn't
134             // be set if its not of the correct type
135         }
136         handleGetUseCase3rPostCondition();
137         return getUseCase3r;
138     }
139 
140     protected abstract java.lang.Object handleGetUseCase();
141 
142     private void handleGetPartitions4rPreCondition()
143     {
144     }
145 
146     private void handleGetPartitions4rPostCondition()
147     {
148     }
149 
150     public final java.util.Collection getPartitions()
151     {
152         java.util.Collection getPartitions4r = null;
153         handleGetPartitions4rPreCondition();
154         Object result = this.shieldedElements(handleGetPartitions());
155         try
156         {
157             getPartitions4r = (java.util.Collection)result;
158         }
159         catch (ClassCastException ex)
160         {
161             // ignore since the metafacade shouldn't
162             // be set if its not of the correct type
163         }
164         handleGetPartitions4rPostCondition();
165         return getPartitions4r;
166     }
167 
168     protected abstract java.util.Collection handleGetPartitions();
169 
170     /***
171      * @see org.andromda.core.metafacade.MetafacadeBase#validateInvariants(java.util.Collection)
172      */
173     public void validateInvariants(java.util.Collection validationMessages)
174     {
175         super.validateInvariants(validationMessages);
176     }
177     
178     /***
179      * The property that stores the name of the metafacade.
180      */
181     private static final String NAME_PROPERTY = "name";
182     
183     /***
184      * @see java.lang.Object#toString()
185      */
186     public String toString()
187     {
188         final StringBuffer toString = new StringBuffer(this.getClass().getName());
189         toString.append("[");
190         try
191         {
192             toString.append(org.andromda.core.common.Introspector.instance().getProperty(this, NAME_PROPERTY));
193         }
194         catch (final Throwable throwable)
195         {
196             // - just ignore when the metafacade doesn't have a name property
197         }
198         toString.append("]");
199         return toString.toString();
200     }
201 }