Package org.apache.maven.scm
Class ChangeSet
java.lang.Object
org.apache.maven.scm.ChangeSet
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HgChangeSet
,SvnChangeSet
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Escaped&
entitystatic final String
Escaped'
entityprivate String
User who made changesprivate String
comment provided at commit timeprivate Date
Date the changes were committedprivate static final ThreadSafeDateFormat
Formatter used by the getDateFormatted method.private static final String
private List
<ChangeFile> List of ChangeFilestatic final String
Escaped>
entitystatic final String
Escaped<
entityRevisions that were merged into this oneprivate String
Revision from which this one originatesstatic final String
Escaped"
entityprivate String
The SCM revision id for this changeset.private static final long
private static final ThreadSafeDateFormat
Formatter used by the getTimeFormatted method.private static final String
private static final ThreadSafeDateFormat
Formatter used to parse date/timestamp.private static final ThreadSafeDateFormat
private static final ThreadSafeDateFormat
private static final ThreadSafeDateFormat
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFile
(ChangeFile file) void
addMergedRevision
(String mergedRevision) boolean
containsFilename
(String filename) boolean
containsFilename
(String filename, ScmProviderRepository repository) Deprecated.boolean
static String
escapeValue
(Object value) Escape thetoString
of the given object.Getter for property author.Getter for property comment.getDate()
Getter for property date.getFiles()
Getter for ChangeFile list.int
hashCode()
private String
removeCDataEnd
(String message) remove a]]>
from comments (replace it with] ] >
).void
Setter for property author.void
setComment
(String comment) Setter for property comment.void
Setter for property date that takes a string and parses itvoid
Setter for property date that takes a string and parses itvoid
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) toString()
toXML()
Provide the changelog entry as an XML snippet.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
LESS_THAN_ENTITY
Escaped<
entity- See Also:
-
GREATER_THAN_ENTITY
Escaped>
entity- See Also:
-
AMPERSAND_ENTITY
Escaped&
entity- See Also:
-
APOSTROPHE_ENTITY
Escaped'
entity- See Also:
-
QUOTE_ENTITY
Escaped"
entity- See Also:
-
DATE_PATTERN
- See Also:
-
DATE_FORMAT
Formatter used by the getDateFormatted method. -
TIME_PATTERN
- See Also:
-
TIME_FORMAT
Formatter used by the getTimeFormatted method. -
TIMESTAMP_FORMAT_1
Formatter used to parse date/timestamp. -
TIMESTAMP_FORMAT_2
-
TIMESTAMP_FORMAT_3
-
TIMESTAMP_FORMAT_4
-
date
Date the changes were committed -
author
User who made changes -
comment
comment provided at commit time -
files
List of ChangeFile -
revision
The SCM revision id for this changeset.- Since:
- 1.3
-
parentRevision
Revision from which this one originates- Since:
- 1.7
-
mergedRevisions
Revisions that were merged into this one- Since:
- 1.7
-
-
Constructor Details
-
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
- 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 Details
-
getFiles
Getter for ChangeFile list.- Returns:
- List of ChangeFile.
-
setFiles
Setter for ChangeFile list.- Parameters:
files
- List of ChangeFiles.
-
addFile
-
containsFilename
Deprecated.Use methodcontainsFilename(String)
- Parameters:
filename
-repository
- NOT USED- Returns:
-
containsFilename
-
getAuthor
Getter for property author.- Returns:
- Value of property author.
-
setAuthor
Setter for property author.- Parameters:
author
- New value of property author.
-
getComment
Getter for property comment.- Returns:
- Value of property comment.
-
setComment
Setter for property comment.- Parameters:
comment
- New value of property comment.
-
getDate
Getter for property date.- Returns:
- Value of property date.
-
setDate
Setter for property date.- Parameters:
date
- New value of property date.
-
setDate
Setter for property date that takes a string and parses it- Parameters:
date
- - a string in yyyy/MM/dd HH:mm:ss format
-
setDate
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
- Returns:
- date in yyyy-mm-dd format
-
getTimeFormatted
- Returns:
- time in HH:mm:ss format
-
getRevision
- Returns:
- Since:
- 1.3
-
setRevision
- Parameters:
revision
-- Since:
- 1.3
-
getParentRevision
-
setParentRevision
-
addMergedRevision
-
getMergedRevisions
-
setMergedRevisions
-
toString
-
toXML
Provide the changelog entry as an XML snippet.- Returns:
- a changelog-entry in xml format
-
equals
-
hashCode
public int hashCode() -
removeCDataEnd
remove a]]>
from comments (replace it with] ] >
).- Parameters:
message
- The message to modify- Returns:
- a clean string
-
escapeValue
Escape the
swiped from jakarta-commons/betwixt -- XMLUtils.javatoString
of the given object. For use in an attribute value.- Parameters:
value
- escapevalue.toString()
- Returns:
- text with characters restricted (for use in attributes) escaped
-
containsFilename(String)