Package jenkins.scm.api
Class SCM2
- java.lang.Object
-
- hudson.scm.SCM
-
- jenkins.scm.api.SCM2
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<SCM>
public abstract class SCM2 extends SCM
Extended functionality base class forSCM
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 ofSCM
but typically implementations would need to have the functionality made available fromafterSave(SCMTriggerItem)
and/orgetItemActions(SCMTriggerItem)
. Implementations that do not require these features can get integration with the SCM API event subsystem by implementingSCMHeadEvent.isMatch(SCM)
.- Since:
- 2.0
- See Also:
SCM2TransientActionFactory
,SCM2Notifier
,SCMHeadEvent.isMatch(SCM)
-
-
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
Constructors Constructor Description SCM2()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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
-
-
-
-
Method Detail
-
afterSave
public void afterSave(SCMTriggerItem owner)
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:
SCMTriggerListener
,SCMTrigger.isIgnorePostCommitHooks()
,SCMHeadEvent.isMatch(SCM)
-
getItemActions
public Collection<? extends Action> getItemActions(SCMTriggerItem owner)
Action
s to be displayed in theSCMTriggerItem
page.- Parameters:
owner
- the owner of thisSCM2
.- Returns:
- can be empty but never null
-
-