1 28 29 package org.objectweb.fractal.explorer.context; 30 31 import java.util.Vector ; 32 33 import org.objectweb.fractal.adl.ADLException; 34 import org.objectweb.fractal.adl.FactoryFactory; 35 import org.objectweb.util.explorer.api.RootContext; 36 import org.objectweb.util.explorer.api.RootEntry; 37 import org.objectweb.util.explorer.core.common.api.ContextContainer; 38 import org.objectweb.util.explorer.core.common.lib.DefaultContextContainer; 39 import org.objectweb.util.explorer.core.root.lib.DefaultRootEntry; 40 41 49 public class ArchitectRootContext 50 implements RootContext 51 { 52 53 59 60 protected static ContextContainer cc_ = null; 61 62 68 static { 70 cc_ = new DefaultContextContainer(); 71 cc_.addEntry("type-factory", new TypeContainer()); 72 cc_.addEntry("component-factory", new TemplateContainer()); 73 } 74 75 81 87 93 97 public RootEntry[] getEntries(){ 98 Vector values = new Vector (); 99 try { 100 values.add(new DefaultRootEntry("Fractal-factory", new FactoryWrapper(FactoryFactory.getFactory(FactoryFactory.FRACTAL_BACKEND)),0)); 101 } catch (ADLException e) { 102 System.out.println("[" + getClass().getName() + "] Exception: " + e.getMessage()); 103 } 104 values.add(new DefaultRootEntry("Fractal-container",cc_,1)); 105 return (RootEntry[])values.toArray(new RootEntry[0]); 106 } 107 108 } | Popular Tags |