org.quartz.xml.XMLSchedulingDataProcessor.maybeThrowValidationException()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(171)

本文整理了Java中org.quartz.xml.XMLSchedulingDataProcessor.maybeThrowValidationException()方法的一些代码示例,展示了XMLSchedulingDataProcessor.maybeThrowValidationException()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLSchedulingDataProcessor.maybeThrowValidationException()方法的具体详情如下:
包路径:org.quartz.xml.XMLSchedulingDataProcessor
类名称:XMLSchedulingDataProcessor
方法名:maybeThrowValidationException

XMLSchedulingDataProcessor.maybeThrowValidationException介绍

[英]Throws a ValidationException if the number of validationExceptions detected is greater than zero.
[中]如果检测到的ValidationException数大于零,则引发ValidationException。

代码示例

代码示例来源:origin: quartz-scheduler/quartz

  1. /**
  2. * Process the xmlfile named <code>fileName</code> with the given system
  3. * ID.
  4. *
  5. * @param fileName
  6. * meta data file name.
  7. * @param systemId
  8. * system ID.
  9. */
  10. protected void processFile(String fileName, String systemId)
  11. throws ValidationException, ParserConfigurationException,
  12. SAXException, IOException, SchedulerException,
  13. ClassNotFoundException, ParseException, XPathException {
  14. prepForProcessing();
  15. log.info("Parsing XML file: " + fileName +
  16. " with systemId: " + systemId);
  17. InputSource is = new InputSource(getInputStream(fileName));
  18. is.setSystemId(systemId);
  19. process(is);
  20. maybeThrowValidationException();
  21. }

代码示例来源:origin: quartz-scheduler/quartz

  1. /**
  2. * Process the xmlfile named <code>fileName</code> with the given system
  3. * ID.
  4. *
  5. * @param fileName
  6. * meta data file name.
  7. * @param systemId
  8. * system ID.
  9. */
  10. protected void processFile(String fileName, String systemId)
  11. throws ValidationException, ParserConfigurationException,
  12. SAXException, IOException, SchedulerException,
  13. ClassNotFoundException, ParseException, XPathException {
  14. prepForProcessing();
  15. log.info("Parsing XML file: " + fileName +
  16. " with systemId: " + systemId);
  17. InputSource is = new InputSource(getInputStream(fileName));
  18. is.setSystemId(systemId);
  19. process(is);
  20. maybeThrowValidationException();
  21. }

代码示例来源:origin: quartz-scheduler/quartz

  1. /**
  2. * Process the xmlfile named <code>fileName</code> with the given system
  3. * ID.
  4. *
  5. * @param stream
  6. * an input stream containing the xml content.
  7. * @param systemId
  8. * system ID.
  9. */
  10. public void processStreamAndScheduleJobs(InputStream stream, String systemId, Scheduler sched)
  11. throws ValidationException, ParserConfigurationException,
  12. SAXException, XPathException, IOException, SchedulerException,
  13. ClassNotFoundException, ParseException {
  14. prepForProcessing();
  15. log.info("Parsing XML from stream with systemId: " + systemId);
  16. InputSource is = new InputSource(stream);
  17. is.setSystemId(systemId);
  18. process(is);
  19. executePreProcessCommands(sched);
  20. scheduleJobs(sched);
  21. maybeThrowValidationException();
  22. }

代码示例来源:origin: quartz-scheduler/quartz

  1. /**
  2. * Process the xmlfile named <code>fileName</code> with the given system
  3. * ID.
  4. *
  5. * @param stream
  6. * an input stream containing the xml content.
  7. * @param systemId
  8. * system ID.
  9. */
  10. public void processStreamAndScheduleJobs(InputStream stream, String systemId, Scheduler sched)
  11. throws ValidationException, ParserConfigurationException,
  12. SAXException, XPathException, IOException, SchedulerException,
  13. ClassNotFoundException, ParseException {
  14. prepForProcessing();
  15. log.info("Parsing XML from stream with systemId: " + systemId);
  16. InputSource is = new InputSource(stream);
  17. is.setSystemId(systemId);
  18. process(is);
  19. executePreProcessCommands(sched);
  20. scheduleJobs(sched);
  21. maybeThrowValidationException();
  22. }

相关文章