Package jenkins.scm.api
Class SCMSourceObserver.Wrapped<O extends SCMSourceObserver>
java.lang.Object
jenkins.scm.api.SCMSourceObserver
jenkins.scm.api.SCMSourceObserver.Wrapped<O>
- Type Parameters:
- O- the class of wrapped observer.
- Direct Known Subclasses:
- SCMSourceObserver.Filter
- Enclosing class:
- SCMSourceObserver
public abstract static class SCMSourceObserver.Wrapped<O extends SCMSourceObserver>
extends SCMSourceObserver
Base class for an observer that wraps another observer.
- 
Nested Class SummaryNested classes/interfaces inherited from class jenkins.scm.api.SCMSourceObserverSCMSourceObserver.Filter<O extends SCMSourceObserver>, SCMSourceObserver.ProjectObserver, SCMSourceObserver.Wrapped<O extends SCMSourceObserver>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAttribute(String key, Object value) Adds extra metadata about the overall organization.Indicates who is asking for sources.Returns the subset of "project" names that this observer is interested in ornullif interested in all "project" names.Provides a way of reporting progress.booleanReturns information about whether the observer wants more results.Declare that a new "project" such as a source repository has been found.Methods inherited from class jenkins.scm.api.SCMSourceObserverfilter
- 
Constructor Details- 
WrappedConstructor.- Parameters:
- delegate- the observer to delegate to.
 
 
- 
- 
Method Details- 
getContextIndicates who is asking for sources.- Specified by:
- getContextin class- SCMSourceObserver
- Returns:
- a contextual item, typically a OrganizationFolder
 
- 
getListenerProvides a way of reporting progress.- Specified by:
- getListenerin class- SCMSourceObserver
- Returns:
- a logger
 
- 
getIncludesReturns the subset of "project" names that this observer is interested in ornullif interested in all "project" names.Implementations should not assume that the SCMSourceObserver.getIncludes()will be honoured. This method is designed to provide a hint toSCMNavigatorimplementations.- Overrides:
- getIncludesin class- SCMSourceObserver
- Returns:
- the subset of "project" names that this observer is interested in or null.
- See Also:
 
- 
observe@NonNull public SCMSourceObserver.ProjectObserver observe(@NonNull String projectName) throws IllegalArgumentException, IOException, InterruptedException Declare that a new "project" such as a source repository has been found.- Specified by:
- observein class- SCMSourceObserver
- Parameters:
- projectName- a name of the project, such as a repository name within an organization; may be used as an- Item.getName()
- Returns:
- a secondary callback to customize the project, on which you must call SCMSourceObserver.ProjectObserver.complete()
- Throws:
- IllegalArgumentException- if this- projectNamehas already been encountered
- IOException- if observing this- projectNamecould not be completed due to an- IOException.
- InterruptedException- if observing this- projectNamewas interrupted.
 
- 
addAttributepublic void addAttribute(@NonNull String key, @Nullable Object value) throws IllegalArgumentException, ClassCastException Adds extra metadata about the overall organization. Currently no metadata keys are defined; placeholder for description, icon, URL, etc.- Specified by:
- addAttributein class- SCMSourceObserver
- Parameters:
- key- a predefined attribute name
- value- some value, of a type defined by the attribute, perhaps null if allowed by the attribute documentation
- Throws:
- IllegalArgumentException- if the attribute name is unrecognized, or this attribute was already added
- ClassCastException- if the attribute value is inappropriate for its type
 
- 
isObservingpublic boolean isObserving()Returns information about whether the observer wants more results.- Overrides:
- isObservingin class- SCMSourceObserver
- Returns:
- trueif the observer is still observing or- falseto signal that it is ok to stop early.
 
 
-