org.apache.maven.changelog
Interface ChangeLogGenerator

All Known Implementing Classes:
AbstractChangeLogGenerator

public interface ChangeLogGenerator

Instances of ChangeLogGenerator are intended to provide an InputStream for a ChangeLogParser to parse into individual ChangeLogEntry objects.

Version:
$Id: ChangeLogGenerator.java 532339 2007-04-25 12:28:56Z ltheussl $
Author:
Glenn McAllister, dion

Method Summary
 void cleanup()
          Provides the opportunity for the generator to do any required cleanup.
 Collection getEntries(ChangeLogParser parser)
          Return a Collection of ChangeLogEntry objects.
 String getLogEnd()
          Return a string indicating the end of the entries.
 String getLogStart()
          Return a string indicating the start of the entries.
 void init(ChangeLog changeLog)
          Initialize the ChangeLogGenerator instance with in the controlling ChangeLog instance.
 

Method Detail

init

public void init(ChangeLog changeLog)
Initialize the ChangeLogGenerator instance with in the controlling ChangeLog instance. Any configuration required for the generator should be obtained from the changeLog. This method is guaranteed to be called before getEntries(org.apache.maven.changelog.ChangeLogParser).

Parameters:
changeLog - the controlling ChangeLog instance

getEntries

public Collection getEntries(ChangeLogParser parser)
                      throws IOException
Return a Collection of ChangeLogEntry objects. This method should create an InputStream that contains the change log insformation which is then passed to the parser to create the individual ChangeLogEntry objects.

This method is guaranteed to be called after init(org.apache.maven.changelog.ChangeLog) and before cleanup(). This method must invoke only the ChangeLogParser.parse(java.io.InputStream) method.

Parameters:
parser - the parser that will create the individual ChangeLogEntry objects.
Returns:
a Collection of ChangeLogEntry objects
Throws:
IOException - if there is an error while creating the ChangeLogEntry objects

getLogStart

public String getLogStart()
Return a string indicating the start of the entries. This will usually be a date or a tag.

Returns:
a string indicating the start of the entries.

getLogEnd

public String getLogEnd()
Return a string indicating the end of the entries. This will usually be a date or a tag.

Returns:
a string indicating the end of the entries.

cleanup

public void cleanup()
Provides the opportunity for the generator to do any required cleanup. This method is guaranteed to be called after the getEntries method even if an exception is thrown from getEntries.



Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.