public class

SimpleCommit

extends SimpleMinimalCommit
implements Commit Serializable
java.lang.Object
   ↳ com.atlassian.stash.commit.SimpleMinimalCommit
     ↳ com.atlassian.stash.commit.SimpleCommit

Summary

Nested Classes
class SimpleCommit.Builder  
[Expand]
Inherited Constants
From class com.atlassian.stash.commit.SimpleMinimalCommit
[Expand]
Inherited Fields
From interface com.atlassian.stash.commit.Commit
From interface com.atlassian.stash.commit.MinimalCommit
Public Methods
boolean equals(Object o)
@Nonnull Set<String> getAttributeValues(String name)
Return the attribute values for attribute name, or an empty set if the specified attribute has no values.
@Nonnull AttributeMap getAttributes()
A map of attributes that have been associated with the object.
@Nonnull Person getAuthor()
@Nonnull Date getAuthorTimestamp()
String getMessage()
@Nonnull List<MinimalCommit> getParents()
@Nonnull PropertyMap getProperties()
Repository getRepository()
Retrieves the repository this commit was loaded from, if it's available.
int hashCode()
void setAttributes(AttributeMap attributes)
void setProperties(PropertyMap properties)
void setRepository(Repository repository)
String toString()
[Expand]
Inherited Methods
From class com.atlassian.stash.commit.SimpleMinimalCommit
From class java.lang.Object
From interface com.atlassian.stash.commit.Commit
From interface com.atlassian.stash.commit.MinimalCommit
From interface com.atlassian.stash.content.AttributeSupport
From interface com.atlassian.stash.property.PropertySupport

Public Methods

public boolean equals (Object o)

@Nonnull public Set<String> getAttributeValues (String name)

Return the attribute values for attribute name, or an empty set if the specified attribute has no values. This is a convenience wrapper for getAttributes().get(name), which will return null for attributes with no values.

Parameters
name the attribute name
Returns
  • the set of attribute values, which may be empty but never null

@Nonnull public AttributeMap getAttributes ()

A map of attributes that have been associated with the object.

While the returned attributes are guaranteed to be non-null, they may be empty.

Returns
  • the attribute map, which may be empty but never null

@Nonnull public Person getAuthor ()

@Nonnull public Date getAuthorTimestamp ()

public String getMessage ()

@Nonnull public List<MinimalCommit> getParents ()

@Nonnull public PropertyMap getProperties ()

public Repository getRepository ()

Retrieves the repository this commit was loaded from, if it's available.

Note: For reasons of performance and conciseness this field may be null depending on the service used to construct this commit. If an explicit repository context has been provided by some other mechanism (for example, web-fragments on the commit page will have an explicit 'repository' object in their render context) it is preferable to use that instead of this.

Returns
  • the repository that this commit belongs to

public int hashCode ()

public void setAttributes (AttributeMap attributes)

public void setProperties (PropertyMap properties)

public void setRepository (Repository repository)

public String toString ()