Class ToolSelection
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<ToolSelection>
-
- io.jenkins.plugins.analysis.core.model.ToolSelection
-
- All Implemented Interfaces:
Describable<ToolSelection>
public class ToolSelection extends AbstractDescribableImpl<ToolSelection>
UI proxy to let users select a static analysis report based on the UI.- Author:
- Ullrich Hafner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ToolSelection.ToolSelectionDescriptor
Descriptor forToolSelection
.
-
Constructor Summary
Constructors Constructor Description ToolSelection()
Creates a new instance ofToolSelection
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Predicate<ResultAction>
createToolFilter(boolean canSelectTools, List<ToolSelection> selectedTools)
Creates a filter that can be used to filterResultAction
instances for a given set of tools.ToolSelection.ToolSelectionDescriptor
getDescriptor()
String
getId()
static String[]
getIds(List<ToolSelection> tools)
Returns all IDs of the specified tools.void
setId(String id)
Selects the ID of the static analysis results.
-
-
-
Constructor Detail
-
ToolSelection
@DataBoundConstructor public ToolSelection()
Creates a new instance ofToolSelection
.
-
-
Method Detail
-
setId
@DataBoundSetter public void setId(String id)
Selects the ID of the static analysis results.- Parameters:
id
- the ID of the static analysis results
-
getId
public String getId()
-
getDescriptor
public ToolSelection.ToolSelectionDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<ToolSelection>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<ToolSelection>
-
createToolFilter
public static Predicate<ResultAction> createToolFilter(boolean canSelectTools, List<ToolSelection> selectedTools)
Creates a filter that can be used to filterResultAction
instances for a given set of tools.- Parameters:
canSelectTools
- iftrue
the selection of tools is done by selecting the corresponding IDs, otherwise all available tools in a job are automatically selectedselectedTools
- the tools that should be taken into account- Returns:
- filter
Predicate
-
getIds
public static String[] getIds(List<ToolSelection> tools)
Returns all IDs of the specified tools.- Parameters:
tools
- the tools- Returns:
- the IDs of the tools
-
-