Package jenkins.scm.api.mixin
Interface SCMHeadMixin
- All Superinterfaces:
Comparable<SCMHead>
,Serializable
- All Known Subinterfaces:
ChangeRequestSCMHead
,ChangeRequestSCMHead2
- All Known Implementing Classes:
SCMHead
Interface to allow declaring mixin interfaces for
SCMHead
subclasses. Do not implement this interface
directly, rather extend from SCMHead
and implement the appropriate mixins such as
ChangeRequestSCMHead
and TagSCMHead
Two SCMHeadMixin
implementations are equal if and only if:
- They both are the same class
- They both have the same
getName()
- For each implemented
SCMHeadMixin
sub-interface, they both return the same values from all Java Bean property getters declared on the sub-interface. Thus, for exampleChangeRequestSCMHead
implementations are only considered equal ifChangeRequestSCMHead.getId()
andChangeRequestSCMHead.getTarget()
are also equal
Object.hashCode()
for a SCMHeadMixin
implementation must be equal to the
String.hashCode()
of getName()
- Since:
- 2.0
-
Nested Class Summary
-
Method Summary
Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getName
Returns the name.- Returns:
- the name.
-
getOrigin
Returns the origin of the head.-
For centralized version control systems such as Subversion, CVS, etc the return value will always be
SCMHeadOrigin.DEFAULT
. - For distributed version control systems such as Git, Mercurial etc the return value may have other values.
-
For centralized distributed version control systems such as GitHub, Bitbucket, etc the return values may
be restricted to
SCMHeadOrigin.DEFAULT
or instances ofSCMHeadOrigin.Fork
.
- Returns:
- the origin of the head or
SCMHeadOrigin.DEFAULT
if there can only ever be one origin. - Since:
- 2.2.0
-
For centralized version control systems such as Subversion, CVS, etc the return value will always be
-