Package jenkins.scm.api
Interface SCMSourceOwner
- All Superinterfaces:
AccessControlled
,Item
,ModelObject
,OnMaster
,PersistenceRoot
,Saveable
,SearchableModelObject
,SearchItem
- All Known Subinterfaces:
SCMNavigatorOwner
An
Item
that owns SCMSource
instances. Any SCMSource
instances accessed through a
SCMSourceOwner
will have had SCMSource.setOwner(SCMSourceOwner)
called with a non-null
owner before being exposed through either getSCMSources()
or getSCMSource(String)
.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault SCMSource
getSCMSource
(String sourceId) Gets the source with the specifiedSCMSource.getId()
.default SCMSourceCriteria
getSCMSourceCriteria
(SCMSource source) Returns the criteria for determining if a candidate head is relevant for consumption.Returns theSCMSource
instances that this item is consuming.void
onSCMSourceUpdated
(SCMSource source) Deprecated.Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, getACL, hasAnyPermission, hasPermission, hasPermission, hasPermission2
Methods inherited from interface hudson.model.Item
delete, getAbsoluteUrl, getAllJobs, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, onCreatedFromScratch, onLoad, save
Methods inherited from interface hudson.model.PersistenceRoot
getRootDir
Methods inherited from interface hudson.search.SearchableModelObject
getSearch
Methods inherited from interface hudson.search.SearchItem
getSearchIndex, getSearchName, getSearchUrl
-
Method Details
-
getSCMSources
Returns theSCMSource
instances that this item is consuming.- Returns:
- the
SCMSource
instances that this item is consuming.
-
getSCMSource
Gets the source with the specifiedSCMSource.getId()
.- Parameters:
sourceId
- theSCMSource.getId()
- Returns:
- the corresponding
SCMSource
ornull
if no matching source.
-
onSCMSourceUpdated
Deprecated.implementations ofSCMSourceOwner
would prefer theSCMEventListener
extension point which allows for more fine-grained response to events, so prefer delivering event notification throughSCMHeadEvent.fireNow(SCMHeadEvent)
,SCMSourceEvent.fireNow(SCMSourceEvent)
orSCMNavigatorEvent.fireNow(SCMNavigatorEvent)
as appropriate.Called when a source has received notification of an update. Implementations are required to assume that the set of theSCMHead
instances returned bySCMSource.fetch(SCMHeadObserver, TaskListener)
may now be invalid / incomplete and consequently requires a full refresh. Implementations must provide stern looks of disapproval to anyone calling this method.- Parameters:
source
- the source
-
getSCMSourceCriteria
Returns the criteria for determining if a candidate head is relevant for consumption.- Parameters:
source
- the source to get the criteria for.- Returns:
- the criteria for determining if a candidate head is relevant for consumption.
-
SCMSourceOwner
would prefer theSCMEventListener
extension point which allows for more fine-grained response to events, so prefer delivering event notification throughSCMHeadEvent.fireNow(SCMHeadEvent)
,SCMSourceEvent.fireNow(SCMSourceEvent)
orSCMNavigatorEvent.fireNow(SCMNavigatorEvent)
as appropriate.