hudson.plugins.perforce
Class PerforceChangeLogSet

java.lang.Object
  extended by hudson.scm.ChangeLogSet<PerforceChangeLogEntry>
      extended by hudson.plugins.perforce.PerforceChangeLogSet
All Implemented Interfaces:
java.lang.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.Entry
 
Field Summary
 
Fields inherited from class hudson.scm.ChangeLogSet
build
 
Constructor Summary
PerforceChangeLogSet(hudson.model.AbstractBuild<?,?> build, java.util.List<PerforceChangeLogEntry> logs)
           
 
Method Summary
 java.util.List<PerforceChangeLogEntry> getHistory()
           
 boolean isEmptySet()
           
 java.util.Iterator<PerforceChangeLogEntry> iterator()
           
static java.lang.String javaDateToStringDate(java.util.Date newDate)
          This takes a java.util.Date and converts it to a string.
static PerforceChangeLogSet parse(hudson.model.AbstractBuild build, java.io.InputStream changeLogStream)
          Parses the change log stream and returns a Perforce change log set.
static void saveToChangeLog(java.io.OutputStream outputStream, java.util.List<com.tek42.perforce.model.Changelist> changes)
          Stores the history objects to the output stream as xml
protected static java.util.Date stringDateToJavaDate(java.lang.String newDate)
          Returns a java.util.Date object set to the time specified in newDate.
 
Methods inherited from class hudson.scm.ChangeLogSet
createEmpty, getItems
 
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,
                            java.util.List<PerforceChangeLogEntry> logs)
Method Detail

getHistory

public java.util.List<PerforceChangeLogEntry> getHistory()

isEmptySet

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

iterator

public java.util.Iterator<PerforceChangeLogEntry> iterator()

parse

public static PerforceChangeLogSet parse(hudson.model.AbstractBuild build,
                                         java.io.InputStream changeLogStream)
                                  throws java.io.IOException,
                                         org.xml.sax.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:
java.io.IOException
org.xml.sax.SAXException

saveToChangeLog

public static void saveToChangeLog(java.io.OutputStream outputStream,
                                   java.util.List<com.tek42.perforce.model.Changelist> changes)
                            throws java.io.IOException
Stores the history objects to the output stream as xml

Parameters:
outputStream - the stream to write to
history - the history objects to store
Throws:
java.io.IOException

javaDateToStringDate

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

Returns:
A string representation of the date

stringDateToJavaDate

protected static java.util.Date stringDateToJavaDate(java.lang.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 © 2007. All Rights Reserved.