public class NoOpProjectObserver extends SCMSourceObserver.ProjectObserver
SCMSourceObserver.ProjectObserver that does nothing.| Constructor and Description |
|---|
NoOpProjectObserver() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String key,
Object value)
Adds extra metadata about a specific project.
|
void |
addSource(SCMSource source)
Adds a source repository to be used from a new project.
|
void |
complete()
To be called when finished defining one project.
|
static NoOpProjectObserver |
instance()
Returns the singleton instance.
|
public static NoOpProjectObserver instance()
public void addSource(@NonNull
SCMSource source)
addSource in class SCMSourceObserver.ProjectObserversource - a potential SCM source as in MultiBranchProject.getSCMSources; do not call
SCMSource.setOwner(jenkins.scm.api.SCMSourceOwner) on itpublic void addAttribute(@NonNull
String key,
@Nullable
Object value)
throws IllegalArgumentException,
ClassCastException
addAttribute in class SCMSourceObserver.ProjectObserverkey - a predefined attribute namevalue - some value, of a type defined by the attribute, perhaps null if allowed by the attribute
documentationIllegalArgumentException - if the attribute name is unrecognized, or this attribute was already addedClassCastException - if the attribute value is inappropriate for its typepublic void complete()
throws IllegalStateException,
InterruptedException
complete in class SCMSourceObserver.ProjectObserverIllegalStateException - may be thrown if called twiceInterruptedException - if processing of the final project was interruptedCopyright © 2016–2019. All rights reserved.