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 TypeMethodDescriptionvoid
addContributor
(Contributor contributor) Adds a contributor to the list of contributors.void
addContributors
(Collection<Contributor> contributors) Adds all contributors from the given collection to the list of contributors.void
addSignature
(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.boolean
isValid()
Returns true if the changeset is valid.void
Sets the author of the changeset.void
setBranches
(List<String> branches) Sets the branches of the changeset.void
setContributors
(Collection<Contributor> contributors) Sets the collection of contributors.void
setCreationDate
(Long timestamp) void
Sets the date of the changeset.void
setDescription
(String description) Sets the description (commit message) of the changeset.void
Sets the id of the changeset.void
setLastModified
(Long timestamp) void
setParents
(List<String> parents) Sets the parents of the changeset.void
setSignatures
(Collection<Signature> signatures) Sets a collection of signatures which belong to this changeset.void
Sets 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:
getCreationDate
in interfaceModelObject
-
setCreationDate
- Specified by:
setCreationDate
in 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:
getId
in interfaceModelObject
-
setLastModified
- Specified by:
setLastModified
in interfaceModelObject
-
getLastModified
Description copied from interface:LastModifiedAware
Returns a timestamp of the last modified date.- Specified by:
getLastModified
in interfaceLastModifiedAware
-
getType
Description copied from interface:TypedObject
Returns the type of the object.- Specified by:
getType
in 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:
isValid
in 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
-