1 24 25 package org.objectweb.dream.adl.legacy; 26 27 import org.objectweb.fractal.adl.components.FractalComponentBuilder; 28 import org.objectweb.fractal.api.Component; 29 import org.objectweb.fractal.api.NoSuchInterfaceException; 30 import org.objectweb.fractal.api.control.ContentController; 31 import org.objectweb.fractal.util.Fractal; 32 33 41 public class FractalLegacyComponentBuilder extends FractalComponentBuilder 42 implements 43 LegacyComponentBuilder 44 { 45 46 49 public void stopComponent(Object component, Object context) throws Exception 50 { 51 56 } 57 58 62 public void addComponent(Object superComponent, Object subComponent, 63 String name, Object context) throws Exception 64 { 65 ContentController cc = Fractal 66 .getContentController((Component) superComponent); 67 Component subComponents[] = cc.getFcSubComponents(); 68 for (int i = 0; i < subComponents.length; i++) 69 { 70 if (subComponents[i] == subComponent) 71 { 72 return; 74 } 75 } 76 cc.addFcSubComponent((Component) subComponent); 77 try 78 { 79 Fractal.getNameController((Component) subComponent).setFcName(name); 80 } 81 catch (NoSuchInterfaceException ignored) 82 { 83 } 84 } 85 } | Popular Tags |