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
public class JobDecorator<P extends Job<P,B>,B extends Run<P,B>> extends Object
Something that can decorate a job. Decorations can include manipulating the list ofJobProperty
s of the project as well as custom tweaks that are specific to the project instance type itself.
-
-
Constructor Summary
Constructors Constructor Description JobDecorator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<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.P
project(P project)
This method is an extension point whereby aBranchProperty
can apply final tweaks to the project for the branch specific project.
-
-
-
Method Detail
-
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
@NonNull public P project(@NonNull P 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.
-
-