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
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • LESS_THAN_ENTITY

      public static final String LESS_THAN_ENTITY
      Escaped < entity
      See Also:
    • GREATER_THAN_ENTITY

      public static final String GREATER_THAN_ENTITY
      Escaped > entity
      See Also:
    • AMPERSAND_ENTITY

      public static final String AMPERSAND_ENTITY
      Escaped & entity
      See Also:
    • APOSTROPHE_ENTITY

      public static final String APOSTROPHE_ENTITY
      Escaped ' entity
      See Also:
    • QUOTE_ENTITY

      public static final String QUOTE_ENTITY
      Escaped " entity
      See Also:
    • DATE_PATTERN

      private static final String DATE_PATTERN
      See Also:
    • DATE_FORMAT

      private static final ThreadSafeDateFormat DATE_FORMAT
      Formatter used by the getDateFormatted method.
    • TIME_PATTERN

      private static final String TIME_PATTERN
      See Also:
    • 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 Date date
      Date the changes were committed
    • author

      private String author
      User who made changes
    • comment

      private String comment
      comment provided at commit time
    • files

      private List<ChangeFile> files
      List of ChangeFile
    • revision

      private String revision
      The SCM revision id for this changeset.
      Since:
      1.3
    • parentRevision

      private String parentRevision
      Revision from which this one originates
      Since:
      1.7
    • mergedRevisions

      private Set<String> 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 committed
      userDatePattern - pattern of date
      comment - comment provided at commit time
      author - User who made changes
      files - The ChangeFile list
    • ChangeSet

      public ChangeSet(Date date, String comment, String author, List<ChangeFile> files)
      Parameters:
      date - Date the changes were committed
      comment - comment provided at commit time
      author - User who made changes
      files - The ChangeFile list
    • ChangeSet

      public ChangeSet()
      Constructor used when attributes aren't available until later
  • Method Details

    • 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.
      Parameters:
      filename -
      repository - NOT USED
      Returns:
    • containsFilename

      public boolean containsFilename(String filename)
    • 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.
    • 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 format
      userDatePattern - - 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
    • getRevision

      public String getRevision()
      Returns:
      Since:
      1.3
    • setRevision

      public void setRevision(String revision)
      Parameters:
      revision -
      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)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toXML

      public String toXML()
      Provide the changelog entry as an XML snippet.
      Returns:
      a changelog-entry in xml format
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • removeCDataEnd

      private String removeCDataEnd(String message)
      remove a ]]> from comments (replace it with ] ] >).
      Parameters:
      message - The message to modify
      Returns:
      a clean string
    • 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 - escape value.toString()
      Returns:
      text with characters restricted (for use in attributes) escaped