Package jenkins.scm.api.metadata
Class PrimaryInstanceMetadataAction
java.lang.Object
hudson.model.InvisibleAction
jenkins.scm.api.metadata.PrimaryInstanceMetadataAction
- All Implemented Interfaces:
Action
,ModelObject
,Serializable
@ExportedBean
public class PrimaryInstanceMetadataAction
extends InvisibleAction
implements Serializable
Identifies a
SCMHead
/ SCMSource
as being a primary instance. Some examples of how this metadata is
intended to be used:
- The Git source control system
allows optionally identifying a specific branch as being the default branch. A Git branch source could therefore
return an instance of this action for the corresponding
SCMHead
fromSCMSource.fetchActions(SCMHead, SCMHeadEvent, TaskListener)
to indicate that it is the "primary" head. - The GitHub repository hosting service has the concepts of fork repositories associated with a primary repository.
One option is that a GitHub
SCMNavigator
could use this action to differentiate forks from their primary wherebySCMSource.fetchActions(SCMSourceEvent, TaskListener)
would return an instance of this action to identify the primary source. An alternative option is that a GitHub specificSCMSource
could useSCMCategory
to differentiate theSCMHead
instances that originate from a fork and useSCMSource.fetchActions(SCMHead, SCMHeadEvent, TaskListener)
to mark the primary branches from each "source". - Other SCM systems may have the concept of multiple primary heads. For example it may be possible to identify
heads as being a primary for the
1.x
,2.x
, and3.x
release lines. *
- there can be zero, one or many
SCMHead
instances with this metadata - there can be zero, one or many
SCMSource
instances with this metadata - within any
SCMCategory
there can be zero, one or manySCMHead
/SCMSource
instances with this metadata - the information conveyed by this metadata may or may not be orthogonal to the
SCMCategory
. Categories convey pseudo-type information from the source / navigator. The categorizations that a source / navigator chooses to implement may be such that they are orthogonal to primary instance or they may be complementary with primary instance. The decision as to which of these is appropriate for a specific SCM system is out of scope for the SCM API.
- Since:
- 2.0.1
- See Also:
-
Constructor Summary
-
Method Summary
Methods inherited from class hudson.model.InvisibleAction
getDisplayName, getIconFileName, getUrlName
-
Constructor Details
-
PrimaryInstanceMetadataAction
public PrimaryInstanceMetadataAction()
-