1 28 29 package org.objectweb.openccm.uml.transformation.ast; 30 31 import org.objectweb.openccm.uml.transformation.modfact.JmiModfactUML14ModelContext; 32 33 import ispuml.mdaTransformation.RuleContext; 34 import ispuml.mdaTransformation.TransformationException; 35 import ispuml.mdaTransformation.ActionBase; 36 import ispuml.mdaTransformation.rules.xml.CompositeXmlAction; 37 38 39 44 public class CallSetMultipleMethod extends CompositeXmlAction { 45 46 49 public CallSetMultipleMethod() { 50 isSrcPropertyRequired = false; 53 isDstPropertyRequired = false; 54 action = new TransformAction(); 55 } 56 57 60 class TransformAction extends ActionBase { 61 66 public Object execute(Object bean, RuleContext request) throws TransformationException { 67 try { 68 org.objectweb.openccm.ast.api.UsesDecl declaration = null; 69 JmiModfactUML14ModelContext context; 70 context = (JmiModfactUML14ModelContext) request.engineContext.getSrc(); 71 String tag = (String )context.getModelUtil().getStereotypeTaggedValue(bean, "CORBAUses", "multiple"); 72 if (tag != null && tag.equalsIgnoreCase("yes")) { 73 Object obj = request.getAttribute("declaration"); 74 declaration = (org.objectweb.openccm.ast.api.UsesDecl) obj; 75 declaration.setMultiple(); 76 } 77 return declaration; 78 } catch (TransformationException notFoundException) { 79 return null; 81 } 82 } 83 84 } } 86 | Popular Tags |