Package jenkins.branch
Class JobDecorator<P extends Job<P,B>,B extends Run<P,B>>
java.lang.Object
jenkins.branch.JobDecorator<P,B>
- Direct Known Subclasses:
ProjectDecorator
Something that can decorate a job.
Decorations can include manipulating the list of
JobProperty
s of the project as well as custom
tweaks that are specific to the project instance type itself.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionList<JobProperty<? super P>>
jobProperties
(List<JobProperty<? super P>> properties) This method is an extension point whereby aBranchProperty
can filter or enhance the set ofJobProperty
to be used by the branch specific project.This method is an extension point whereby aBranchProperty
can apply final tweaks to the project for the branch specific project.
-
Constructor Details
-
JobDecorator
public JobDecorator()
-
-
Method Details
-
jobProperties
@NonNull public List<JobProperty<? super P>> jobProperties(@NonNull List<JobProperty<? super P>> properties) This method is an extension point whereby aBranchProperty
can filter or enhance the set ofJobProperty
to be used by the branch specific project.- Parameters:
properties
- the proposedJobProperty
s.- Returns:
- the resulting
JobProperty
s.
-
project
This method is an extension point whereby aBranchProperty
can apply final tweaks to the project for the branch specific project. Implementations should try to obey the following rules:- Don't trigger a save of the job
- Don't try to manipulate the
JobProperty
instances in the job, usejobProperties(List)
instead. - Don't try to manipulate the
BuildWrapper
instances in the job, useProjectDecorator.buildWrappers(List)
instead. - Don't try to manipulate the
Publisher
instances in the job, useProjectDecorator.publishers(java.util.List)
instead.
- Parameters:
project
- the project.- Returns:
- the supplied project for method chaining.
-