1 28 29 package org.objectweb.openccm.uml.transformation.ast; 30 31 import ispuml.mdaTransformation.RuleContext; 32 import ispuml.mdaTransformation.TransformationException; 33 import ispuml.mdaTransformation.ActionBase; 34 import ispuml.mdaTransformation.rules.xml.CompositeXmlAction; 35 36 37 40 public class DestroyCidlModule extends CompositeXmlAction { 41 42 45 public DestroyCidlModule() { 46 isSrcPropertyRequired = false; 49 isDstPropertyRequired = false; 50 action = new TransformAction(); 51 } 52 53 54 57 class TransformAction extends ActionBase { 58 63 public Object execute(Object bean, RuleContext request) throws TransformationException { 64 CCMASTModelContext context; 65 context = (CCMASTModelContext) request.engineContext.getModel("ccm-ast"); 66 Object obj = request.getAttribute("declaration"); 67 org.objectweb.openccm.ast.api.CidlModuleDecl cidlModule; 68 cidlModule = (org.objectweb.openccm.ast.api.CidlModuleDecl) obj; 69 String cidlModuleName = cidlModule.getName(); 70 71 org.objectweb.openccm.ir3.api.ComponentRepository interfaceRepository; 73 interfaceRepository = org.objectweb.openccm.ir3.api.ComponentRepositoryHelper.narrow( 74 org.objectweb.openccm.corba.TheInterfaceRepository.getRepository()); 75 interfaceRepository.lookup(cidlModule.getName()).destroy(); 76 77 return cidlModule; 78 } 79 80 } } 82 | Popular Tags |