Package sonia.scm.repository
Class Changeset
java.lang.Object
sonia.scm.BasicPropertiesAware
sonia.scm.repository.Changeset
- All Implemented Interfaces:
Serializable,Cloneable,LastModifiedAware,ModelObject,PropertiesAware,TypedObject,Validateable
Represents a changeset/commit of a repository.
- See Also:
-
Field Summary
Fields inherited from class sonia.scm.BasicPropertiesAware
properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContributor(Contributor contributor) Adds a contributor to the list of contributors.voidaddContributors(Collection<Contributor> contributors) Adds all contributors from the given collection to the list of contributors.voidaddSignature(Signature signature) Adds a signature to the list of signatures.Returns the author of the changeset.Returns the branches of the changeset.Returns collection of contributors for this changeset.Returns a timestamp of the creation date of theChangeset.getDate()Returns the creation date of the changeset.Return the description (commit message) of the changeset.getId()Returns the id of the changeset.Returns a timestamp of the last modified date.Return the ids of the parent changesets.Returns a immutable list of signatures.getTags()Returns tags associated with this changeset.getType()Returns the type of the object.booleanisValid()Returns true if the changeset is valid.voidSets the author of the changeset.voidsetBranches(List<String> branches) Sets the branches of the changeset.voidsetContributors(Collection<Contributor> contributors) Sets the collection of contributors.voidsetCreationDate(Long timestamp) voidSets the date of the changeset.voidsetDescription(String description) Sets the description (commit message) of the changeset.voidSets the id of the changeset.voidsetLastModified(Long timestamp) voidsetParents(List<String> parents) Sets the parents of the changeset.voidsetSignatures(Collection<Signature> signatures) Sets a collection of signatures which belong to this changeset.voidSets the tags of the changesettoString()Methods inherited from class sonia.scm.BasicPropertiesAware
equals, getProperties, getProperty, hashCode, removeProperty, setProperties, setProperty
-
Constructor Details
-
Changeset
public Changeset() -
Changeset
-
Changeset
-
-
Method Details
-
toString
-
getCreationDate
Returns a timestamp of the creation date of theChangeset.- Specified by:
getCreationDatein interfaceModelObject
-
setCreationDate
- Specified by:
setCreationDatein interfaceModelObject
-
getAuthor
Returns the author of the changeset. -
getBranches
Returns the branches of the changeset. In the most cases a changeset is only related to one branch, but in the case of receive hooks it is possible that a changeset is related to more than a branch.- Returns:
- branches of the changeset
-
getDate
Returns the creation date of the changeset. -
getDescription
Return the description (commit message) of the changeset. -
getId
Returns the id of the changeset.- Specified by:
getIdin interfaceModelObject
-
setLastModified
- Specified by:
setLastModifiedin interfaceModelObject
-
getLastModified
Description copied from interface:LastModifiedAwareReturns a timestamp of the last modified date.- Specified by:
getLastModifiedin interfaceLastModifiedAware
-
getType
Description copied from interface:TypedObjectReturns the type of the object.- Specified by:
getTypein interfaceTypedObject
-
getParents
Return the ids of the parent changesets.- Returns:
- Since:
- 1.11
-
getTags
Returns tags associated with this changeset.- Returns:
- tags of the changeset
-
getContributors
Returns collection of contributors for this changeset.- Returns:
- collection of contributors
- Since:
- 2.1.0
-
isValid
public boolean isValid()Returns true if the changeset is valid.- Specified by:
isValidin interfaceValidateable- Returns:
- true if the changeset is valid
-
setAuthor
Sets the author of the changeset. -
setBranches
Sets the branches of the changeset. -
setDate
Sets the date of the changeset. -
setDescription
Sets the description (commit message) of the changeset. -
setId
Sets the id of the changeset. -
setParents
Sets the parents of the changeset.- Parameters:
parents- parents of the changeset- Since:
- 1.11
-
setTags
Sets the tags of the changeset -
setContributors
Sets the collection of contributors.- Since:
- 2.1.0
-
addContributor
Adds a contributor to the list of contributors.- Since:
- 2.1.0
-
addContributors
Adds all contributors from the given collection to the list of contributors.- Since:
- 2.1.0
-
setSignatures
Sets a collection of signatures which belong to this changeset.- Parameters:
signatures- collection of signatures- Since:
- 2.4.0
-
getSignatures
Returns a immutable list of signatures.- Returns:
- signatures
- Since:
- 2.4.0
-
addSignature
Adds a signature to the list of signatures.- Parameters:
signature-- Since:
- 2.4.0
-