1 28 29 package org.objectweb.util.explorer.parser.lib; 30 31 import java.util.Iterator ; 32 import java.util.List ; 33 34 import org.objectweb.fractal.api.NoSuchInterfaceException; 35 import org.objectweb.util.explorer.core.common.lib.BindingFeature; 36 import org.objectweb.util.explorer.explorerConfig.Include; 37 import org.objectweb.util.explorer.explorerConfig.beans.ExplorerBean; 38 import org.objectweb.util.explorer.parser.api.ExplorerParser; 39 import org.objectweb.util.explorer.parser.api.ParserConfiguration; 40 41 49 public class IncludeManager 50 extends BindingFeature 51 implements ExplorerParser 52 { 53 54 60 66 72 73 protected ParserConfiguration getParserConfiguration(){ 74 try { 75 return (ParserConfiguration)lookupFc(ParserConfiguration.PARSER_CONFIGURATION); 76 } catch (NoSuchInterfaceException e) { 77 return null; 78 } 79 } 80 81 87 90 public String [] clientFc() { 91 return new String []{ParserConfiguration.PARSER_CONFIGURATION}; 92 } 93 94 100 103 public void parseExplorer(ExplorerBean explorer) { 104 List theIncludes = explorer.getIncludeList(); 105 Iterator it = theIncludes.iterator(); 106 while (it.hasNext()) { 107 Include element = (Include) it.next(); 108 getParserConfiguration().addPropertyFile(element.getUrl()); 109 } 110 } 111 112 } | Popular Tags |