Package jenkins.scm.api
Class SCM2
java.lang.Object
hudson.scm.SCM
jenkins.scm.api.SCM2
- All Implemented Interfaces:
ExtensionPoint
,Describable<SCM>
Extended functionality base class for
SCM
implementations that only want to handle one event system and
are consolidating on the SCM API event system. It is not strictly required to extend from this class in place of
SCM
but typically implementations would need to have the functionality made available from
afterSave(SCMTriggerItem)
and/or getItemActions(SCMTriggerItem)
. Implementations that do
not require these features can get integration with the SCM API event subsystem by implementing
SCMHeadEvent.isMatch(SCM)
.- Since:
- 2.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterSave
(SCMTriggerItem owner) Callback from theSCMTriggerItem
after theSCMTriggerItem
has been saved.Collection<? extends Action>
getItemActions
(SCMTriggerItem owner) Action
s to be displayed in theSCMTriggerItem
page.Methods inherited from class hudson.scm.SCM
_calcRevisionsFromBuild, _for, _for, all, buildEnvironment, buildEnvVars, calcRevisionsFromBuild, calcRevisionsFromBuild, checkout, checkout, compareRemoteRevisionWith, compareRemoteRevisionWith, createChangeLogParser, createEmptyChangeLog, createEmptyChangeLog, getApi, getBrowser, getDescriptor, getEffectiveBrowser, getKey, getModuleRoot, getModuleRoot, getModuleRoots, getModuleRoots, getType, guessBrowser, nullify, poll, pollChanges, postCheckout, postCheckout, processWorkspaceBeforeDeletion, processWorkspaceBeforeDeletion, requiresWorkspaceForPolling, supportsPolling
-
Constructor Details
-
SCM2
public SCM2()
-
-
Method Details
-
afterSave
Callback from theSCMTriggerItem
after theSCMTriggerItem
has been saved. Can be used to register theSCMTriggerItem
for a call-back hook from the backing SCM that this source is for. Implementations are responsible for ensuring that they do not create duplicate registrations and that orphaned registrations are removed eventually.- Parameters:
owner
- the owner of thisSCM2
.- See Also:
-
getItemActions
Action
s to be displayed in theSCMTriggerItem
page.- Parameters:
owner
- the owner of thisSCM2
.- Returns:
- can be empty but never null
-