org.jenkinsci.plugins.darcs
Class DarcsChangeLogParser

java.lang.Object
  extended by hudson.scm.ChangeLogParser
      extended by org.jenkinsci.plugins.darcs.DarcsChangeLogParser

 class DarcsChangeLogParser
extends ChangeLogParser

Parses the output of Darcs log.

Author:
Sven Strittmatter , Ralph Lange

Field Summary
private  DarcsSaxHandler handler
          Custom SAX Parser.
private static Logger LOGGER
          Logger facility.
private  DarcsXmlSanitizer sanitizer
          Sanitizes XML character encoding.
 
Constructor Summary
DarcsChangeLogParser()
          Convenience constructor which initializes all dependencies.
DarcsChangeLogParser(DarcsSaxHandler handler, DarcsXmlSanitizer sani)
          Dedicated constructor.
 
Method Summary
 DarcsChangeSetList parse(AbstractBuild build, File changelogFile)
          Parses the Darcs change log file.
private  DarcsChangeSetList parse(AbstractBuild build, InputSource changeLog)
           
 DarcsChangeSetList parse(ByteArrayOutputStream changeLog)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

private static final Logger LOGGER
Logger facility.


handler

private final DarcsSaxHandler handler
Custom SAX Parser.


sanitizer

private final DarcsXmlSanitizer sanitizer
Sanitizes XML character encoding.

Constructor Detail

DarcsChangeLogParser

public DarcsChangeLogParser()
Convenience constructor which initializes all dependencies.


DarcsChangeLogParser

public DarcsChangeLogParser(DarcsSaxHandler handler,
                            DarcsXmlSanitizer sani)
Dedicated constructor.

Parameters:
handler - implementation of a SAX parser
sani - sanitize to clean comments
Method Detail

parse

public DarcsChangeSetList parse(AbstractBuild build,
                                File changelogFile)
                         throws IOException,
                                SAXException
Parses the Darcs change log file. The Darcs change log file is in XML format (as given by the command darcs changes --xml-output --summary).

Specified by:
parse in class ChangeLogParser
Parameters:
build - the current build
changelogFile - the change log file
Returns:
change set list
Throws:
IOException - on read errors
SAXException - on parse errors

parse

public DarcsChangeSetList parse(ByteArrayOutputStream changeLog)
                         throws IOException,
                                SAXException
Parameters:
changeLog - stream to read XML from
Returns:
change set list w/ current build null
Throws:
IOException - on read errors
SAXException - on parse errors
See Also:
parse(hudson.model.AbstractBuild, java.io.File)

parse

private DarcsChangeSetList parse(AbstractBuild build,
                                 InputSource changeLog)
                          throws IOException,
                                 SAXException
Throws:
IOException
SAXException


Copyright © 2004-2013 weltraumschaf.de. All Rights Reserved.