@Test public void parseCmdbPluginPackageShouldSuccess() { try { validator.validate("/plugin/sample-plugin-config-cmdb.xml"); } catch (WecubeCoreException e) { fail("Validator should succeed here but got error message: " + e.getMessage()); } }
public void validate(StreamSource xmlSource) throws WecubeCoreException { try { validator.validate(xmlSource); } catch (SAXException | IOException ex) { if (logger.isDebugEnabled()) logger.debug(xmlSource.toString()); throw new WecubeCoreException("3270",String.format("XML validation failed: %s" , ex.getMessage())); } }
PluginConfigXmlValidator { public void validate(StreamSource xmlSource) throws WecubeCoreException { try { validator.validate(xmlSource); } catch (SAXException | IOException ex) { if (logger.isDebugEnabled()) logger.debug(xmlSource.toString()); throw new WecubeCoreException("3270",String.format("XML validation failed: %s" , ex.getMessage())); } } }
PluginConfigXmlValidator { public void validate(StreamSource xmlSource) throws WecubeCoreException { try { validator.validate(xmlSource); } catch (SAXException | IOException ex) { if (logger.isDebugEnabled()) logger.debug(xmlSource.toString()); throw new WecubeCoreException("3270",String.format("XML validation failed: %s" , ex.getMessage())); } } PluginConfigXmlValidator(); }
PluginConfigXmlValidator { public void validate(StreamSource xmlSource) throws WecubeCoreException { try { validator.validate(xmlSource); } catch (SAXException | IOException ex) { if (logger.isDebugEnabled()) logger.debug(xmlSource.toString()); throw new WecubeCoreException("3270",String.format("XML validation failed: %s" , ex.getMessage())); } } PluginConfigXmlValidator(); void validate(StreamSource xmlSource); void validate(InputStream inputStream); void validate(String definitionXmlFullName); }
PluginConfigXmlValidator { public void validate(StreamSource xmlSource) throws WecubeCoreException { try { validator.validate(xmlSource); } catch (SAXException | IOException ex) { if (logger.isDebugEnabled()) logger.debug(xmlSource.toString()); throw new WecubeCoreException("3270",String.format("XML validation failed: %s" , ex.getMessage())); } } PluginConfigXmlValidator(); void validate(StreamSource xmlSource); void validate(InputStream inputStream); void validate(String definitionXmlFullName);  }