/** * Begins the indexing * * @exception BuildException If an error occurs indexing the fileset */ @Override public void execute() throws BuildException { // construct handler and analyzer dynamically try { handler = Class.forName(handlerClassName).asSubclass(DocumentHandler.class).newInstance(); analyzer = IndexTask.createAnalyzer(analyzerClassName); } catch (Exception e) { throw new BuildException(e); } log("Document handler = " + handler.getClass(), Project.MSG_VERBOSE); log("Analyzer = " + analyzer.getClass(), Project.MSG_VERBOSE); if (handler instanceof ConfigurableDocumentHandler) { ((ConfigurableDocumentHandler) handler).configure(handlerConfig.getProperties()); } try { indexDocs(); } catch (IOException e) { throw new BuildException(e); } }
private static void dumpHandler(StringBuffer sb, HandlerConfig h, String prefix) { sb.append(prefix + "\t{name=" + h.getName()); if (h.getClassName() != null) { sb.append(",class=" + h.getClassName()); } if (h.getPresence() != null) { sb.append(",presence=" + h.getPresence().toString()); } if (h.isContinueOnError() != null) { sb.append(",continue=" + h.isContinueOnError().toString()); } if (h.isRunOnError() != null) { sb.append(",run=" + h.isRunOnError().toString()); } sb.append("}" + NL); ConfigUtils.dumpOptionList(sb, h.getOptions(), prefix); }
/** Adds the resources to preload for this global into the provided set. */ public void getPreloads(ConfigManager cfgmgr, PreloadableSet preloads) { for (HandlerConfig handler : handlers) { handler.getPreloads(cfgmgr, preloads); } }
@Override public void invalidate() { for (HandlerConfig handler : handlers) { handler.invalidate(); } }