Package jenkins.scm.api
Interface SCMSourceOwner
-
- All Superinterfaces:
AccessControlled
,Item
,ModelObject
,OnMaster
,PersistenceRoot
,Saveable
,SearchableModelObject
,SearchItem
- All Known Subinterfaces:
SCMNavigatorOwner
public interface SCMSourceOwner extends Item
AnItem
that ownsSCMSource
instances. AnySCMSource
instances accessed through aSCMSourceOwner
will have hadSCMSource.setOwner(SCMSourceOwner)
called with a non-null owner before being exposed through eithergetSCMSources()
orgetSCMSource(String)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default 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.List<SCMSource>
getSCMSources()
Returns theSCMSource
instances that this item is consuming.void
onSCMSourceUpdated(SCMSource source)
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.-
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 Detail
-
getSCMSources
@NonNull List<SCMSource> getSCMSources()
Returns theSCMSource
instances that this item is consuming.- Returns:
- the
SCMSource
instances that this item is consuming.
-
getSCMSource
@CheckForNull default SCMSource getSCMSource(@CheckForNull String sourceId)
Gets the source with the specifiedSCMSource.getId()
.- Parameters:
sourceId
- theSCMSource.getId()
- Returns:
- the corresponding
SCMSource
ornull
if no matching source.
-
onSCMSourceUpdated
@Deprecated void onSCMSourceUpdated(@NonNull SCMSource source)
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
@CheckForNull default SCMSourceCriteria getSCMSourceCriteria(@NonNull SCMSource source)
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.
-
-