Package jenkins.scm.impl
Class NoOpProjectObserver
java.lang.Object
jenkins.scm.api.SCMSourceObserver.ProjectObserver
jenkins.scm.impl.NoOpProjectObserver
A
SCMSourceObserver.ProjectObserver that does nothing.- Since:
- 2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String key, Object value) Adds extra metadata about a specific project.voidAdds a source repository to be used from a new project.voidcomplete()To be called when finished defining one project.static NoOpProjectObserverinstance()Returns the singleton instance.
-
Constructor Details
-
NoOpProjectObserver
public NoOpProjectObserver()
-
-
Method Details
-
instance
Returns the singleton instance.- Returns:
- the singleton instance.
-
addSource
Adds a source repository to be used from a new project.- Specified by:
addSourcein classSCMSourceObserver.ProjectObserver- Parameters:
source- a potential SCM source as inMultiBranchProject.getSCMSources; do not callSCMSource.setOwner(jenkins.scm.api.SCMSourceOwner)on it
-
addAttribute
public void addAttribute(@NonNull String key, @Nullable Object value) throws IllegalArgumentException, ClassCastException Adds extra metadata about a specific project. Currently no metadata keys are defined; placeholder for description, icon, URL, etc.- Specified by:
addAttributein classSCMSourceObserver.ProjectObserver- Parameters:
key- a predefined attribute namevalue- 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 addedClassCastException- if the attribute value is inappropriate for its type
-
complete
To be called when finished defining one project.- Specified by:
completein classSCMSourceObserver.ProjectObserver- Throws:
IllegalStateException- may be thrown if called twiceInterruptedException- if processing of the final project was interrupted
-