Package org.apache.maven.scm
Class ChangeSet
- java.lang.Object
-
- org.apache.maven.scm.ChangeSet
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HgChangeSet
,SvnChangeSet
public class ChangeSet extends Object implements Serializable
- Author:
- Emmanuel Venisse
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
AMPERSAND_ENTITY
Escaped&
entitystatic String
APOSTROPHE_ENTITY
Escaped'
entitystatic String
GREATER_THAN_ENTITY
Escaped>
entitystatic String
LESS_THAN_ENTITY
Escaped<
entitystatic String
QUOTE_ENTITY
Escaped"
entity
-
Constructor Summary
Constructors Constructor Description ChangeSet()
Constructor used when attributes aren't available until laterChangeSet(String strDate, String userDatePattern, String comment, String author, List<ChangeFile> files)
ChangeSet(Date date, String comment, String author, List<ChangeFile> files)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addFile(ChangeFile file)
void
addMergedRevision(String mergedRevision)
void
addTag(String tag)
Setter for property tags.boolean
containsFilename(String filename)
boolean
containsFilename(String filename, ScmProviderRepository repository)
Deprecated.Use methodcontainsFilename(String)
boolean
equals(Object obj)
static String
escapeValue(Object value)
Escape thetoString
of the given object.String
getAuthor()
Getter for property author.String
getComment()
Getter for property comment.Date
getDate()
Getter for property date.String
getDateFormatted()
List<ChangeFile>
getFiles()
Getter for ChangeFile list.Set<String>
getMergedRevisions()
String
getParentRevision()
String
getRevision()
List<String>
getTags()
Getter for property tags.String
getTimeFormatted()
int
hashCode()
void
setAuthor(String author)
Setter for property author.void
setComment(String comment)
Setter for property comment.void
setDate(String date)
Setter for property date that takes a string and parses itvoid
setDate(String date, String userDatePattern)
Setter for property date that takes a string and parses itvoid
setDate(Date date)
Setter for property date.void
setFiles(List<ChangeFile> files)
Setter for ChangeFile list.void
setMergedRevisions(Set<String> mergedRevisions)
void
setParentRevision(String parentRevision)
void
setRevision(String revision)
void
setTags(List<String> tags)
Setter for property tags.String
toString()
String
toXML()
Provide the changelog entry as an XML snippet.
-
-
-
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
-
ChangeSet
public ChangeSet(String strDate, String userDatePattern, String comment, String author, 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(Date date, String comment, String author, 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 List<ChangeFile> getFiles()
Getter for ChangeFile list.- Returns:
- List of ChangeFile.
-
setFiles
public void setFiles(List<ChangeFile> files)
Setter for ChangeFile list.- Parameters:
files
- List of ChangeFiles.
-
addFile
public void addFile(ChangeFile file)
-
containsFilename
public boolean containsFilename(String filename, ScmProviderRepository repository)
Deprecated.Use methodcontainsFilename(String)
- Parameters:
filename
- TODOrepository
- NOT USED- Returns:
- TODO
-
containsFilename
public boolean containsFilename(String filename)
-
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.
-
setDate
public void setDate(Date date)
Setter for property date.- Parameters:
date
- New value of property date.
-
setDate
public void setDate(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(String date, 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 String getDateFormatted()
- Returns:
- date in yyyy-mm-dd format
-
getTimeFormatted
public String getTimeFormatted()
- Returns:
- time in HH:mm:ss format
-
setTags
public void setTags(List<String> tags)
Setter for property tags.- Parameters:
tags
- New value of property tags. This replaces the existing list (if any).
-
addTag
public void addTag(String tag)
Setter for property tags.- Parameters:
tag
- New tag to add to the list of tags.
-
getRevision
public String getRevision()
- Returns:
- TODO
- Since:
- 1.3
-
setRevision
public void setRevision(String revision)
- Parameters:
revision
- TODO- Since:
- 1.3
-
getParentRevision
public String getParentRevision()
-
setParentRevision
public void setParentRevision(String parentRevision)
-
addMergedRevision
public void addMergedRevision(String mergedRevision)
-
getMergedRevisions
public Set<String> getMergedRevisions()
-
setMergedRevisions
public void setMergedRevisions(Set<String> mergedRevisions)
-
toXML
public 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
-
escapeValue
public static 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
- escapevalue.toString()
- Returns:
- text with characters restricted (for use in attributes) escaped
-
-