Package org.apache.maven.scm
Class ChangeSet
- java.lang.Object
-
- org.apache.maven.scm.ChangeSet
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
HgChangeSet,SvnChangeSet
public class ChangeSet extends java.lang.Object implements java.io.Serializable- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAMPERSAND_ENTITYEscaped&entity.static java.lang.StringAPOSTROPHE_ENTITYEscaped'entity.private java.lang.StringauthorUser who made changes.private java.lang.StringcommentComment provided at commit time.private java.util.DatedateDate the changes were committed.private static ThreadSafeDateFormatDATE_FORMATFormatter used by the getDateFormatted method.private static java.lang.StringDATE_PATTERNprivate java.util.List<ChangeFile>filesList of ChangeFile.static java.lang.StringGREATER_THAN_ENTITYEscaped>entity.static java.lang.StringLESS_THAN_ENTITYEscaped<entity.private java.util.Set<java.lang.String>mergedRevisionsRevisions that were merged into this one.private java.lang.StringparentRevisionRevision from which this one originates.static java.lang.StringQUOTE_ENTITYEscaped"entity.private java.lang.StringrevisionThe SCM revision id for this changeset.private static longserialVersionUIDprivate java.util.List<java.lang.String>tagsList of tags.private static ThreadSafeDateFormatTIME_FORMATFormatter used by the getTimeFormatted method.private static java.lang.StringTIME_PATTERNprivate static ThreadSafeDateFormatTIMESTAMP_FORMAT_1Formatter used to parse date/timestamp.private static ThreadSafeDateFormatTIMESTAMP_FORMAT_2private static ThreadSafeDateFormatTIMESTAMP_FORMAT_3private static ThreadSafeDateFormatTIMESTAMP_FORMAT_4
-
Constructor Summary
Constructors Constructor Description ChangeSet()Constructor used when attributes aren't available until later.ChangeSet(java.lang.String strDate, java.lang.String userDatePattern, java.lang.String comment, java.lang.String author, java.util.List<ChangeFile> files)ChangeSet(java.util.Date date, java.lang.String comment, java.lang.String author, java.util.List<ChangeFile> files)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddFile(ChangeFile file)voidaddMergedRevision(java.lang.String mergedRevision)voidaddTag(java.lang.String tag)Setter for property tags.booleancontainsFilename(java.lang.String filename)booleancontainsFilename(java.lang.String filename, ScmProviderRepository repository)Deprecated.use methodcontainsFilename(String)booleanequals(java.lang.Object obj)static java.lang.StringescapeValue(java.lang.Object value)Escape thetoStringof the given object.java.lang.StringgetAuthor()Getter for property author.java.lang.StringgetComment()Getter for property comment.java.util.DategetDate()Getter for property date.java.lang.StringgetDateFormatted()java.util.List<ChangeFile>getFiles()Getter for ChangeFile list.java.util.Set<java.lang.String>getMergedRevisions()java.lang.StringgetParentRevision()java.lang.StringgetRevision()java.util.List<java.lang.String>getTags()Getter for property tags.java.lang.StringgetTimeFormatted()inthashCode()private java.lang.StringremoveCDataEnd(java.lang.String message)Remove a]]>from comments (replace it with] ] >).voidsetAuthor(java.lang.String author)Setter for property author.voidsetComment(java.lang.String comment)Setter for property comment.voidsetDate(java.lang.String date)Setter for property date that takes a string and parses it.voidsetDate(java.lang.String date, java.lang.String userDatePattern)Setter for property date that takes a string and parses it.voidsetDate(java.util.Date date)Setter for property date.voidsetFiles(java.util.List<ChangeFile> files)Setter for ChangeFile list.voidsetMergedRevisions(java.util.Set<java.lang.String> mergedRevisions)voidsetParentRevision(java.lang.String parentRevision)voidsetRevision(java.lang.String revision)voidsetTags(java.util.List<java.lang.String> tags)Setter for property tags.java.lang.StringtoString()java.lang.StringtoXML()Provide the changelog entry as an XML snippet.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
LESS_THAN_ENTITY
public static final java.lang.String LESS_THAN_ENTITY
Escaped<entity.- See Also:
- Constant Field Values
-
GREATER_THAN_ENTITY
public static final java.lang.String GREATER_THAN_ENTITY
Escaped>entity.- See Also:
- Constant Field Values
-
AMPERSAND_ENTITY
public static final java.lang.String AMPERSAND_ENTITY
Escaped&entity.- See Also:
- Constant Field Values
-
APOSTROPHE_ENTITY
public static final java.lang.String APOSTROPHE_ENTITY
Escaped'entity.- See Also:
- Constant Field Values
-
QUOTE_ENTITY
public static final java.lang.String QUOTE_ENTITY
Escaped"entity.- See Also:
- Constant Field Values
-
DATE_PATTERN
private static final java.lang.String DATE_PATTERN
- See Also:
- Constant Field Values
-
DATE_FORMAT
private static final ThreadSafeDateFormat DATE_FORMAT
Formatter used by the getDateFormatted method.
-
TIME_PATTERN
private static final java.lang.String TIME_PATTERN
- See Also:
- Constant Field Values
-
TIME_FORMAT
private static final ThreadSafeDateFormat TIME_FORMAT
Formatter used by the getTimeFormatted method.
-
TIMESTAMP_FORMAT_1
private static final ThreadSafeDateFormat TIMESTAMP_FORMAT_1
Formatter used to parse date/timestamp.
-
TIMESTAMP_FORMAT_2
private static final ThreadSafeDateFormat TIMESTAMP_FORMAT_2
-
TIMESTAMP_FORMAT_3
private static final ThreadSafeDateFormat TIMESTAMP_FORMAT_3
-
TIMESTAMP_FORMAT_4
private static final ThreadSafeDateFormat TIMESTAMP_FORMAT_4
-
date
private java.util.Date date
Date the changes were committed.
-
author
private java.lang.String author
User who made changes.
-
comment
private java.lang.String comment
Comment provided at commit time.
-
files
private java.util.List<ChangeFile> files
List of ChangeFile.
-
tags
private java.util.List<java.lang.String> tags
List of tags.
-
revision
private java.lang.String revision
The SCM revision id for this changeset.- Since:
- 1.3
-
parentRevision
private java.lang.String parentRevision
Revision from which this one originates.- Since:
- 1.7
-
mergedRevisions
private java.util.Set<java.lang.String> mergedRevisions
Revisions that were merged into this one.- Since:
- 1.7
-
-
Constructor Detail
-
ChangeSet
public ChangeSet(java.lang.String strDate, java.lang.String userDatePattern, java.lang.String comment, java.lang.String author, java.util.List<ChangeFile> files)- Parameters:
strDate- date the changes were committeduserDatePattern- pattern of datecomment- comment provided at commit timeauthor- user who made changesfiles- the ChangeFile list
-
ChangeSet
public ChangeSet(java.util.Date date, java.lang.String comment, java.lang.String author, java.util.List<ChangeFile> files)- Parameters:
date- date the changes were committedcomment- comment provided at commit timeauthor- user who made changesfiles- the ChangeFile list
-
ChangeSet
public ChangeSet()
Constructor used when attributes aren't available until later.
-
-
Method Detail
-
getFiles
public java.util.List<ChangeFile> getFiles()
Getter for ChangeFile list.- Returns:
- list of ChangeFile
-
setFiles
public void setFiles(java.util.List<ChangeFile> files)
Setter for ChangeFile list.- Parameters:
files- list of ChangeFiles
-
addFile
public void addFile(ChangeFile file)
-
containsFilename
public boolean containsFilename(java.lang.String filename, ScmProviderRepository repository)Deprecated.use methodcontainsFilename(String)- Parameters:
filename- TODOrepository- NOT USED- Returns:
- TODO
-
containsFilename
public boolean containsFilename(java.lang.String filename)
-
getAuthor
public java.lang.String getAuthor()
Getter for property author.- Returns:
- value of property author
-
setAuthor
public void setAuthor(java.lang.String author)
Setter for property author.- Parameters:
author- new value of property author
-
getComment
public java.lang.String getComment()
Getter for property comment.- Returns:
- value of property comment
-
setComment
public void setComment(java.lang.String comment)
Setter for property comment.- Parameters:
comment- new value of property comment
-
getDate
public java.util.Date getDate()
Getter for property date.- Returns:
- value of property date
-
setDate
public void setDate(java.util.Date date)
Setter for property date.- Parameters:
date- new value of property date
-
setDate
public void setDate(java.lang.String date)
Setter for property date that takes a string and parses it.- Parameters:
date- a string in yyyy/MM/dd HH:mm:ss format
-
setDate
public void setDate(java.lang.String date, java.lang.String userDatePattern)Setter for property date that takes a string and parses it.- Parameters:
date- a string in yyyy/MM/dd HH:mm:ss formatuserDatePattern- pattern of date
-
getDateFormatted
public java.lang.String getDateFormatted()
- Returns:
- date in yyyy-mm-dd format
-
getTimeFormatted
public java.lang.String getTimeFormatted()
- Returns:
- time in HH:mm:ss format
-
getTags
public java.util.List<java.lang.String> getTags()
Getter for property tags.- Returns:
- value of property author
-
setTags
public void setTags(java.util.List<java.lang.String> tags)
Setter for property tags.- Parameters:
tags- new value of property tags. This replaces the existing list (if any).
-
addTag
public void addTag(java.lang.String tag)
Setter for property tags.- Parameters:
tag- new tag to add to the list of tags
-
getRevision
public java.lang.String getRevision()
- Returns:
- TODO
- Since:
- 1.3
-
setRevision
public void setRevision(java.lang.String revision)
- Parameters:
revision- TODO- Since:
- 1.3
-
getParentRevision
public java.lang.String getParentRevision()
-
setParentRevision
public void setParentRevision(java.lang.String parentRevision)
-
addMergedRevision
public void addMergedRevision(java.lang.String mergedRevision)
-
getMergedRevisions
public java.util.Set<java.lang.String> getMergedRevisions()
-
setMergedRevisions
public void setMergedRevisions(java.util.Set<java.lang.String> mergedRevisions)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toXML
public java.lang.String toXML()
Provide the changelog entry as an XML snippet.- Returns:
- a changelog-entry in xml format TODO make sure comment doesn't contain CDATA tags - MAVEN114
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
removeCDataEnd
private java.lang.String removeCDataEnd(java.lang.String message)
Remove a]]>from comments (replace it with] ] >).- Parameters:
message- the message to modify- Returns:
- a clean string
-
escapeValue
public static java.lang.String escapeValue(java.lang.Object value)
Escape the
toStringof the given object. For use in an attribute value.swiped from jakarta-commons/betwixt -- XMLUtils.java.
- Parameters:
value- escapevalue.toString()- Returns:
- text with characters restricted (for use in attributes) escaped
-
-