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
JobPropertys of the project as well as custom
tweaks that are specific to the project instance type itself.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<JobProperty<? super P>>jobProperties(List<JobProperty<? super P>> properties) This method is an extension point whereby aBranchPropertycan filter or enhance the set ofJobPropertyto be used by the branch specific project.This method is an extension point whereby aBranchPropertycan 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 aBranchPropertycan filter or enhance the set ofJobPropertyto be used by the branch specific project.- Parameters:
properties- the proposedJobPropertys.- Returns:
- the resulting
JobPropertys.
-
project
This method is an extension point whereby aBranchPropertycan 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
JobPropertyinstances in the job, usejobProperties(List)instead. - Don't try to manipulate the
BuildWrapperinstances in the job, useProjectDecorator.buildWrappers(List)instead. - Don't try to manipulate the
Publisherinstances in the job, useProjectDecorator.publishers(java.util.List)instead.
- Parameters:
project- the project.- Returns:
- the supplied project for method chaining.
-