jetbrains.buildServer.vcs
Class ModificationData

java.lang.Object
  extended by jetbrains.buildServer.vcs.BaseModificationData
      extended by jetbrains.buildServer.vcs.ModificationData
All Implemented Interfaces:
ChangeData

public class ModificationData
extends BaseModificationData
implements ChangeData

Bean object to represent modification happened to the version control as reported by version control integration plugin.

Author:
Kir

Constructor Summary
ModificationData(java.util.Date changeDate, java.util.List<VcsChange> changes, java.lang.String description, java.lang.String user, VcsRoot vcsRoot, java.lang.String version, java.lang.String displayVersion)
          This constructor has to be used in production code to create ModificationData instance
 
Method Summary
 boolean equals(java.lang.Object o)
           
 VcsRoot getVcsRoot()
          Get VcsRoot, associated with the change.
 VcsRoot getVcsRootObject()
           
 int hashCode()
           
static ModificationData substituteFiles(ModificationData originalData, java.util.List<VcsChange> changedFiles)
          Creates a copy of modification data with changed files substituted.
 
Methods inherited from class jetbrains.buildServer.vcs.BaseModificationData
addParentRevision, getAttributes, getChangeCount, getChanges, getDescription, getDisplayVersion, getParentRevisions, getUserName, getVcsDate, getVersion, isCanBeIgnored, setAttribute, setAttributes, setCanBeIgnored, setParentRevisions, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jetbrains.vcs.api.ChangeData
getAttributes, getChanges, getDescription, getDisplayVersion, getParentRevisions, getUserName, getVcsDate, getVersion, isCanBeIgnored
 

Constructor Detail

ModificationData

public ModificationData(java.util.Date changeDate,
                        java.util.List<VcsChange> changes,
                        java.lang.String description,
                        java.lang.String user,
                        VcsRoot vcsRoot,
                        @NotNull
                        java.lang.String version,
                        java.lang.String displayVersion)
This constructor has to be used in production code to create ModificationData instance

Parameters:
changeDate - date of the change.
changes - list of all files affected by this modification.
description - commit message.
user - user name in the version control.
vcsRoot - current settings.
version - repository version right after the modification. Has to have the same meaning as VcsSupport.getCurrentVersion.
displayVersion - repository version right after the modification in the human readable format. Used for presentation purpose only.
Method Detail

substituteFiles

@NotNull
public static ModificationData substituteFiles(@NotNull
                                                       ModificationData originalData,
                                                       @NotNull
                                                       java.util.List<VcsChange> changedFiles)
Creates a copy of modification data with changed files substituted.

Parameters:
originalData - original data
changedFiles - new changed files
Returns:
ModificationData copy but with different changed files

getVcsRootObject

public VcsRoot getVcsRootObject()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class BaseModificationData

hashCode

public int hashCode()
Overrides:
hashCode in class BaseModificationData

getVcsRoot

@NotNull
public VcsRoot getVcsRoot()
Description copied from interface: ChangeData
Get VcsRoot, associated with the change.

Specified by:
getVcsRoot in interface ChangeData