jetbrains.buildServer.vcs
Class FilteredVcsChange

java.lang.Object
  extended by jetbrains.buildServer.vcs.VcsChange
      extended by jetbrains.buildServer.vcs.FilteredVcsChange
All Implemented Interfaces:
VcsChangeInfo, VcsFileModification

public class FilteredVcsChange
extends VcsChange
implements VcsFileModification

Represents changed file and its status in change: whether it included or excluded by checkout rules.


Nested Class Summary
static class FilteredVcsChange.ExcludeReason
          Exclude reason
 
Nested classes/interfaces inherited from interface jetbrains.buildServer.vcs.VcsChangeInfo
VcsChangeInfo.ContentType, VcsChangeInfo.Type
 
Constructor Summary
FilteredVcsChange(VcsFileModification delegate, FilteredVcsChange.ExcludeReason excludeReason, java.lang.String relativeFileName)
          Creates new VcsChange instance.
 
Method Summary
 byte[] getContentAfter()
          Returns file content after the modification
 byte[] getContentBefore()
          Returns file content before the modification
 java.lang.String getExcludeReason()
           
 boolean isExcluded()
          Returns if this file is excluded.
 boolean isExcludedByCheckoutRules()
          Returns true if this file is excluded by checkout rules.
 
Methods inherited from class jetbrains.buildServer.vcs.VcsChange
createList, equals, forTest, getAfterChangeRevisionNumber, getBeforeChangeRevisionNumber, getChangeTypeName, getFileName, getRelativeFileName, getType, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jetbrains.buildServer.vcs.VcsChangeInfo
getAfterChangeRevisionNumber, getBeforeChangeRevisionNumber, getChangeTypeName, getFileName, getRelativeFileName, getType
 

Constructor Detail

FilteredVcsChange

public FilteredVcsChange(@NotNull
                         VcsFileModification delegate,
                         FilteredVcsChange.ExcludeReason excludeReason,
                         java.lang.String relativeFileName)
Creates new VcsChange instance.

Parameters:
delegate - original, not filtered changed file
excludeReason - reason of the file exclusion
relativeFileName - relative file path according to the specified build or configuration.
Method Detail

isExcluded

public boolean isExcluded()
Returns if this file is excluded.

Returns:
see above.

isExcludedByCheckoutRules

public boolean isExcludedByCheckoutRules()
Returns true if this file is excluded by checkout rules.

Returns:
see above
Since:
4.5

getExcludeReason

@Nullable
public java.lang.String getExcludeReason()
Returns:
reason why the file is excluded from the change. null if not excluded.

getContentBefore

public byte[] getContentBefore()
                        throws VcsException
Description copied from interface: VcsFileModification
Returns file content before the modification

Specified by:
getContentBefore in interface VcsFileModification
Returns:
bytes of file content
Throws:
VcsException - if some VCS error occurs

getContentAfter

public byte[] getContentAfter()
                       throws VcsException
Description copied from interface: VcsFileModification
Returns file content after the modification

Specified by:
getContentAfter in interface VcsFileModification
Returns:
bytes of file content
Throws:
VcsException - if some VCS error occurs