View Javadoc
1   package org.andromda.metafacades.uml14;
2   
3   import org.omg.uml.behavioralelements.statemachines.Guard;
4   import org.omg.uml.behavioralelements.statemachines.Transition;
5   import org.omg.uml.foundation.datatypes.BooleanExpression;
6   
7   /**
8    * MetafacadeLogic implementation.
9    *
10   * @see org.andromda.metafacades.uml.GuardFacade
11   * @author Bob Fields
12   */
13  public class GuardFacadeLogicImpl
14          extends GuardFacadeLogic
15  {
16      private static final long serialVersionUID = -6392947981148041940L;
17  
18      /**
19       * @param metaObject
20       * @param context
21       */
22      public GuardFacadeLogicImpl(Guard metaObject,
23                                  String context)
24      {
25          super(metaObject, context);
26      }
27  
28      /**
29       * @see org.andromda.metafacades.uml14.GuardFacadeLogic#handleGetTransition()
30       */
31      protected Transition handleGetTransition()
32      {
33          return metaObject.getTransition();
34      }
35  
36      /**
37       * @see org.andromda.metafacades.uml14.GuardFacadeLogic#handleGetBody()
38       */
39      protected String handleGetBody()
40      {
41          final BooleanExpression expression = metaObject.getExpression();
42          return (expression == null) ? null : expression.getBody();
43      }
44  
45      /**
46       * @see org.andromda.core.metafacade.MetafacadeBase#getValidationOwner()
47       */
48      public Object getValidationOwner()
49      {
50          return getTransition();
51      }
52  }