/** * {@inheritDoc} */ public void register(File toolXmlFile) { String path = toolXmlFile.getAbsolutePath(); if (!path.endsWith(".xml")) { log.info("register: skipping non .xml file: " + path); return; } log.info("register: file: " + path); Document doc = Xml.readDocument(path); register(doc); }
/** * @inheritDoc */ public void register(File toolXmlFile, ServletContext context) { String path = toolXmlFile.getAbsolutePath(); if (!path.endsWith(".xml")) { log.info("register: skiping non .xml file: " + path); return; } log.info("register: file: " + path); Document doc = Xml.readDocument(path); register(doc, context); }
/** * @inheritDoc */ public List<Tool> parseTools(File toolXmlFile) { if ( ! toolXmlFile.canRead() ) return null; String path = toolXmlFile.getAbsolutePath(); if (!path.endsWith(".xml")) { log.info("register: skiping non .xml file: " + path); return null; } log.info("parse-file: " + path); Document doc = Xml.readDocument(path); if ( doc == null ) return null; return parseTools(doc); }
Document doc = Xml.readDocument(fileName); if (doc == null)
Document doc = Xml.readDocument(fileName); if (doc == null)