1 28 29 package org.objectweb.util.browser.plugins.fractal.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.browser.api.Context; 36 import org.objectweb.util.browser.api.Entry; 37 import org.objectweb.util.browser.core.api.ContextContainer; 38 import org.objectweb.util.browser.core.naming.DefaultContextContainer; 39 import org.objectweb.util.browser.core.naming.DefaultEntry; 40 import org.objectweb.util.browser.core.naming.DefaultName; 41 import org.objectweb.util.browser.core.naming.InitialEntry; 42 43 49 public class ArchitectRootContext 50 implements Context 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 Entry[] getEntries(){ 98 Vector values = new Vector (); 99 try { 100 values.add(new DefaultEntry(new FactoryWrapper(FactoryFactory.getFactory(FactoryFactory.FRACTAL_BACKEND)), 101 new DefaultName("Fractal-factory"))); 102 } catch (ADLException e) { 103 System.out.println("[" + getClass().getName() + "] Exception: " + e.getMessage()); 104 } 105 values.add(new InitialEntry("Fractal-container",cc_,1)); 106 return (Entry[])values.toArray(new Entry[0]); 107 } 108 109 } | Popular Tags |