hudson.plugins.perforce
Class PerforceChangeLogSet

java.lang.Object
  extended by hudson.scm.ChangeLogSet<PerforceChangeLogEntry>
      extended by hudson.plugins.perforce.PerforceChangeLogSet
All Implemented Interfaces:
Iterable<PerforceChangeLogEntry>

public class PerforceChangeLogSet
extends hudson.scm.ChangeLogSet<PerforceChangeLogEntry>

Author:
Mike Wille

Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.scm.ChangeLogSet
hudson.scm.ChangeLogSet.AffectedFile, hudson.scm.ChangeLogSet.Entry
 
Field Summary
 
Fields inherited from class hudson.scm.ChangeLogSet
build
 
Constructor Summary
PerforceChangeLogSet(hudson.model.AbstractBuild<?,?> build, List<PerforceChangeLogEntry> logs)
           
 
Method Summary
 List<PerforceChangeLogEntry> getHistory()
           
 Collection<PerforceChangeLogEntry> getLogs()
           
 boolean isEmptySet()
           
 Iterator<PerforceChangeLogEntry> iterator()
           
static String javaDateToStringDate(Date newDate)
          This takes a java.util.Date and converts it to a string.
static PerforceChangeLogSet parse(hudson.model.AbstractBuild build, InputStream changeLogStream)
          Parses the change log stream and returns a Perforce change log set.
static void saveToChangeLog(OutputStream outputStream, List<Changelist> changes)
          Stores the history objects to the output stream as xml
protected static Date stringDateToJavaDate(String newDate)
          Returns a java.util.Date object set to the time specified in newDate.
 
Methods inherited from class hudson.scm.ChangeLogSet
createEmpty, getBuild, getItems, getKind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerforceChangeLogSet

public PerforceChangeLogSet(hudson.model.AbstractBuild<?,?> build,
                            List<PerforceChangeLogEntry> logs)
Method Detail

getHistory

public List<PerforceChangeLogEntry> getHistory()

isEmptySet

public boolean isEmptySet()
Overrides:
isEmptySet in class hudson.scm.ChangeLogSet<PerforceChangeLogEntry>

getLogs

public Collection<PerforceChangeLogEntry> getLogs()
Specified by:
getLogs in class hudson.scm.ChangeLogSet<PerforceChangeLogEntry>

iterator

public Iterator<PerforceChangeLogEntry> iterator()
Specified by:
iterator in interface Iterable<PerforceChangeLogEntry>
Overrides:
iterator in class hudson.scm.ChangeLogSet<PerforceChangeLogEntry>

parse

public static PerforceChangeLogSet parse(hudson.model.AbstractBuild build,
                                         InputStream changeLogStream)
                                  throws IOException,
                                         SAXException
Parses the change log stream and returns a Perforce change log set.

Parameters:
build - the build for the change log
changeLogStream - input stream containing the change log
Returns:
the change log set
Throws:
IOException
SAXException

saveToChangeLog

public static void saveToChangeLog(OutputStream outputStream,
                                   List<Changelist> changes)
                            throws IOException
Stores the history objects to the output stream as xml

Parameters:
outputStream - the stream to write to
changes - the history objects to store
Throws:
IOException

javaDateToStringDate

public static String javaDateToStringDate(Date newDate)
This takes a java.util.Date and converts it to a string.

Returns:
A string representation of the date

stringDateToJavaDate

protected static Date stringDateToJavaDate(String newDate)
Returns a java.util.Date object set to the time specified in newDate. The format expected is the format of: YYYY-MM-DD HH:MM:SS

Parameters:
newDate - the string date to convert
Returns:
A java.util.Date based off of the string format.


Copyright © 2004-2012 Hudson. All Rights Reserved.