public interface

Blame

com.atlassian.stash.content.Blame

Class Overview

Provides blame (or praise) data for a span of lines within a file.

Summary

Fields
public static final Function<BlamePerson> TO_AUTHOR
Public Methods
Person getAuthor()
The author who last updated the lines in the span.
Date getAuthorTimestamp()
The timestamp at which the author committed the revision.
String getCommitHash()
The full commit hash for the revision.
String getDisplayCommitHash()
A shorted version of the commit hash for the revision, suitable for display.
String getFileName()
The name the file had when the lines in the span were updated, which may not match the file's current name.
int getLineNumber()
The 1-based line number in the file at which this span of blame begins.
int getSpannedLines()
The number of lines in the span, to which the same blame information (author, commit hash, etc.) applies.

Fields

public static final Function<BlamePerson> TO_AUTHOR

Public Methods

public Person getAuthor ()

The author who last updated the lines in the span.

Returns
  • the author

public Date getAuthorTimestamp ()

The timestamp at which the author committed the revision.

Returns
  • the author's commit timestamp

public String getCommitHash ()

The full commit hash for the revision.

Returns
  • the commit hash

public String getDisplayCommitHash ()

A shorted version of the commit hash for the revision, suitable for display.

Returns
  • the display commit hash

public String getFileName ()

The name the file had when the lines in the span were updated, which may not match the file's current name.

Returns
  • the filename when the revision occurred

public int getLineNumber ()

The 1-based line number in the file at which this span of blame begins.

Returns
  • the line number beginning this span of blame

public int getSpannedLines ()

The number of lines in the span, to which the same blame information (author, commit hash, etc.) applies. This value will never be negative, but may be 0 for an empty file.

Returns
  • the number of lines covered by this span of blame information