org.apache.maven.changelog
Class ChangeLog

java.lang.Object
  extended byorg.apache.maven.changelog.ChangeLog

public class ChangeLog
extends Object

Change log task. It uses a ChangeLogGenerator and ChangeLogParser to create a Collection of ChangeLogEntry objects, which are used to produce an XML output that represents the list of changes.

Version:
$Id: ChangeLog.java 532339 2007-04-25 12:28:56Z ltheussl $
Author:
Glenn McAllister, Jeff Martin, Jason van Zyl, dIon Gillard, Stefan Bodewig, Peter Donald

Constructor Summary
ChangeLog()
           
 
Method Summary
 void doExecute()
          Execute task.
 File getBasedir()
          Get the base directory for the change log generator.
 Collection getChangeSets()
          Gets the collection of change sets.
 String getCommentFormat()
          Returns the commentFormat used to interrogate the RCS.
 String getDate()
          Get the date to start the log from.
 String getDateFormat()
          Get the date format of log entries to process; the interpretation of this parameter depends on the generator.
 List getDevelopers()
          Returns the developers.
 String getMarkerEnd()
          Returns the marker (date or tag) for the end of the current change set.
 String getMarkerStart()
          Returns the marker (date or tag) for the start of the current change set.
 String getOutputEncoding()
          Returns the outputEncoding.
 boolean getQuoteDate()
          Get the quoteDate property.
 String getRange()
          Get the range of log entries to process; the interpretation of the range depends on the generator implementation.
 String getRepositoryConnection()
          Return connection string declared in project.xml
 String getTag()
          Get the tag to start the log from.
 String getType()
          Get the type of log to generate (range, date, or tag).
 void setBasedir(File base)
          Set the base directory for the change log generator.
 void setChangeSets(Collection sets)
          Sets the collection of change sets.
 void setCommentFormat(String commentFormat)
          Sets the commentFormat.
 void setDate(String date)
          Set the date to start the log from.
 void setDateFormat(String dateFormat)
          Set the date format of log entries to process; the interpretation of this parameter depends on the generator.
 void setDevelopers(List developers)
          Sets the developers.
 void setFactory(String factoryClassName)
          Set the ChangeLogFactory class name.
 void setMarkerEnd(String marker)
          Sets the marker (date or tag) for the end of the current change set.
 void setMarkerStart(String marker)
          Sets the marker (date or tag) for the start of the current change set.
 void setOutput(File output)
          Set the output file for the log.
 void setOutputEncoding(String outputEncoding)
          Sets the outputEncoding.
 void setQuoteDate(boolean newQuoteDate)
          Set the quoteDate property.
 void setRange(String range)
          Set the range of log entries to process; the interpretation of this parameter depends on the generator.
 void setRepositoryConnection(String aString)
          Change SCM connection string
 void setTag(String tag)
          Set the tag to start the log from.
 void setType(String type)
          Set the type of log to generate (range, date, or tag).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeLog

public ChangeLog()
Method Detail

setFactory

public void setFactory(String factoryClassName)
Set the ChangeLogFactory class name. If this isn't set, the factory defaults to Maven's build in CVS factory.

Parameters:
factoryClassName - the fully qualified factory class name

setType

public void setType(String type)
Set the type of log to generate (range, date, or tag).

Parameters:
type - one of "range", "date", or "tag".

getType

public String getType()
Get the type of log to generate (range, date, or tag).

Returns:
the basis for the log.

setRange

public void setRange(String range)
Set the range of log entries to process; the interpretation of this parameter depends on the generator. This is only used if the type is "range".

Parameters:
range - the range of log entries.

getRange

public String getRange()
Get the range of log entries to process; the interpretation of the range depends on the generator implementation.

Returns:
the range of log entries.

setDate

public void setDate(String date)
Set the date to start the log from. This is only used if the type is "date". The format is that given by the dateFormat property, if present. Otherwise, the format is "yyyy-MM-dd".

Parameters:
date - the date to use.

getDate

public String getDate()
Get the date to start the log from.

Returns:
the start date.

setTag

public void setTag(String tag)
Set the tag to start the log from. This is only used if the type is "tag".

Parameters:
tag - the tag to use.

getTag

public String getTag()
Get the tag to start the log from.

Returns:
the tag.

setMarkerStart

public void setMarkerStart(String marker)
Sets the marker (date or tag) for the start of the current change set. (This is only set internally, but also by test code.)

Parameters:
marker - start marker to use.

getMarkerStart

public String getMarkerStart()
Returns the marker (date or tag) for the start of the current change set. Whether it's a date or tag depends on getType().

Returns:
the marker (date or tag) for the start of the current change set.

setMarkerEnd

public void setMarkerEnd(String marker)
Sets the marker (date or tag) for the end of the current change set. (This is only set internally, but also by test code.)

Parameters:
marker - end marker to use, or null to specify all changes since the start.

getMarkerEnd

public String getMarkerEnd()
Returns the marker (date or tag) for the end of the current change set. Whether it's a date or tag depends on getType().

Returns:
the marker (date or tag) for the end of the current change set, or null if there is no end (meaning the change set should show all changes from the start to the present time).

setDateFormat

public void setDateFormat(String dateFormat)
Set the date format of log entries to process; the interpretation of this parameter depends on the generator.

Parameters:
dateFormat - the dateFormat of log entries.

getDateFormat

public String getDateFormat()
Get the date format of log entries to process; the interpretation of this parameter depends on the generator.

Returns:
the dateFormat of log entries.

setQuoteDate

public void setQuoteDate(boolean newQuoteDate)
Set the quoteDate property.

Parameters:
newQuoteDate - the quoteDate property to set.

getQuoteDate

public boolean getQuoteDate()
Get the quoteDate property.

Returns:
the quoteDate property.

setBasedir

public void setBasedir(File base)
Set the base directory for the change log generator.

Parameters:
base - the base directory

getBasedir

public File getBasedir()
Get the base directory for the change log generator.

Returns:
the base directory

setOutput

public void setOutput(File output)
Set the output file for the log.

Parameters:
output - the output file

getRepositoryConnection

public String getRepositoryConnection()
Return connection string declared in project.xml

Returns:
connection string

setRepositoryConnection

public void setRepositoryConnection(String aString)
Change SCM connection string

Parameters:
aString - a string containing the project's repository connection

doExecute

public void doExecute()
               throws FileNotFoundException,
                      IOException,
                      UnsupportedEncodingException
Execute task.

Throws:
FileNotFoundException - if the base diretory getBasedir() doesn't exist
IOException - if there are problems running CVS
UnsupportedEncodingException - if the underlying platform doesn't support ISO-8859-1 encoding

getChangeSets

public Collection getChangeSets()
Gets the collection of change sets.

Returns:
collection of ChangeLogSet objects.

setChangeSets

public void setChangeSets(Collection sets)
Sets the collection of change sets.

Parameters:
sets - New value of property sets.

getDevelopers

public List getDevelopers()
Returns the developers.

Returns:
List

setDevelopers

public void setDevelopers(List developers)
Sets the developers.

Parameters:
developers - The developers to set

getOutputEncoding

public String getOutputEncoding()
Returns the outputEncoding.

Returns:
String

setOutputEncoding

public void setOutputEncoding(String outputEncoding)
Sets the outputEncoding.

Parameters:
outputEncoding - The outputEncoding to set

getCommentFormat

public String getCommentFormat()
Returns the commentFormat used to interrogate the RCS.

Returns:
String

setCommentFormat

public void setCommentFormat(String commentFormat)
Sets the commentFormat.

Parameters:
commentFormat - The commentFormat to set


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