org.apache.maven.changelog
Class ChangeLogEntry

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

public class ChangeLogEntry
extends Object

Change Log Entry - holds details about revisions to a file.

Version:
$Id: ChangeLogEntry.java 532339 2007-04-25 12:28:56Z ltheussl $
Author:
dIon Gillard

Field Summary
static String AMPERSAND_ENTITY
          Escaped & entity
static String APOSTROPHE_ENTITY
          Escaped ' entity
static String GREATER_THAN_ENTITY
          Escaped > entity
static String LESS_THAN_ENTITY
          Escaped < entity
static String QUOTE_ENTITY
          Escaped " entity
 
Constructor Summary
ChangeLogEntry()
          Constructor used when attributes aren't available until later
 
Method Summary
 void addFile(ChangeLogFile file)
          Adds a file to the list for this entry
 void addFile(String file, String revision)
          Adds a feature to the File attribute of the Entry object.
static String escapeValue(Object value)
          Escape the toString of the given object.
 String getAuthor()
          Getter for property author.
 String getComment()
          Getter for property comment.
 Date getDate()
          Getter for property date.
 String getDateFormatted()
           
 String getTimeFormatted()
           
 void setAuthor(String author)
          Setter for property author.
 void setComment(String comment)
          Setter for property comment.
 void setDate(Date date)
          Setter for property date.
 String toString()
           
 String toXML()
          Provide the changelog entry as an XML snippet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LESS_THAN_ENTITY

public static final String LESS_THAN_ENTITY
Escaped < entity

See Also:
Constant Field Values

GREATER_THAN_ENTITY

public static final String GREATER_THAN_ENTITY
Escaped > entity

See Also:
Constant Field Values

AMPERSAND_ENTITY

public static final String AMPERSAND_ENTITY
Escaped & entity

See Also:
Constant Field Values

APOSTROPHE_ENTITY

public static final String APOSTROPHE_ENTITY
Escaped ' entity

See Also:
Constant Field Values

QUOTE_ENTITY

public static final String QUOTE_ENTITY
Escaped " entity

See Also:
Constant Field Values
Constructor Detail

ChangeLogEntry

public ChangeLogEntry()
Constructor used when attributes aren't available until later

Method Detail

addFile

public void addFile(ChangeLogFile file)
Adds a file to the list for this entry

Parameters:
file - a ChangeLogFile

addFile

public void addFile(String file,
                    String revision)
Adds a feature to the File attribute of the Entry object.

Parameters:
file - the file name committed
revision - the revision of the latest change

toString

public String toString()
Returns:
a string representation of the entry

toXML

public String toXML()
Provide the changelog entry as an XML snippet.

Returns:
a changelog-entry in xml format

getAuthor

public String getAuthor()
Getter for property author.

Returns:
Value of property author.

setAuthor

public void setAuthor(String author)
Setter for property author.

Parameters:
author - New value of property author.

getComment

public String getComment()
Getter for property comment.

Returns:
Value of property comment.

setComment

public void setComment(String comment)
Setter for property comment.

Parameters:
comment - New value of property comment.

getDate

public Date getDate()
Getter for property date.

Returns:
Value of property date.

setDate

public void setDate(Date date)
Setter for property date.

Parameters:
date - New value of property date.

getDateFormatted

public String getDateFormatted()
Returns:
date in yyyy-mm-dd format

getTimeFormatted

public String getTimeFormatted()
Returns:
time in HH:mm:ss format

escapeValue

public static final String escapeValue(Object value)

Escape the toString of the given object. For use in an attribute value.

swiped from jakarta-commons/betwixt -- XMLUtils.java

Parameters:
value - escape value.toString()
Returns:
text with characters restricted (for use in attributes) escaped


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