Class ObjectComponent<T extends AbstractModelObject>
- java.lang.Object
-
- com.cloudbees.jenkins.support.api.Component
-
- com.cloudbees.jenkins.support.api.ObjectComponent<T>
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<ObjectComponent<T>>
- Direct Known Subclasses:
AgentsConfigFile
,DirectoryComponent
,DumpExportTable
,ProcFilesRetriever
,SlaveLaunchLogs
,ThreadDumps
public abstract class ObjectComponent<T extends AbstractModelObject> extends Component implements Describable<ObjectComponent<T>>, ExtensionPoint
Represents a component of a support bundle for a specific model object.This is the unit of user consent; when creating a bundle for this object, the user would enable/disable individual components.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.cloudbees.jenkins.support.api.Component
Component.ComponentCategory
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ObjectComponent()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addContents(Container container)
Add contents to a containerabstract void
addContents(Container container, T item)
Add contents from a specific item to a containerstatic <T extends AbstractModelObject>
List<ObjectComponent<T>>allInstances(T item)
All applicableObjectComponent
s for the class.static <T extends AbstractModelObject>
List<ObjectComponentDescriptor<T>>for_(T item)
All applicableObjectComponentDescriptor
s for the class.ObjectComponentDescriptor<T>
getDescriptor()
<C extends AbstractModelObject>
booleanisApplicable(Class<C> clazz)
Return if this component is applicable to a specific class of item.protected boolean
isApplicable(T item)
Return if this component is applicable to a specific item.boolean
isSelectedByDefault(T item)
Control if the component should be selected by default, based on the applicable item-
Methods inherited from class com.cloudbees.jenkins.support.api.Component
getCategory, getDisplayName, getDisplayPermissions, getId, getRequiredPermissions, isEnabled, isSelectedByDefault, start
-
-
-
-
Method Detail
-
getDescriptor
public ObjectComponentDescriptor<T> getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<T extends AbstractModelObject>
-
addContents
public void addContents(@NonNull Container container)
Add contents to a container- Specified by:
addContents
in classComponent
- Parameters:
container
- aContainer
-
addContents
public abstract void addContents(@NonNull Container container, @NonNull T item)
Add contents from a specific item to a container- Parameters:
container
- theContainer
item
- the item
-
allInstances
public static <T extends AbstractModelObject> List<ObjectComponent<T>> allInstances(T item)
All applicableObjectComponent
s for the class.
-
for_
public static <T extends AbstractModelObject> List<ObjectComponentDescriptor<T>> for_(T item)
All applicableObjectComponentDescriptor
s for the class.
-
isApplicable
public <C extends AbstractModelObject> boolean isApplicable(Class<C> clazz)
Return if this component is applicable to a specific class of item.- Overrides:
isApplicable
in classComponent
- Type Parameters:
C
- Object that extendsAbstractModelObject
- Parameters:
clazz
- the class- Returns:
true
if applicable to this class
-
isApplicable
protected boolean isApplicable(T item)
Return if this component is applicable to a specific item.- Parameters:
item
- the item- Returns:
- true if applicable
-
isSelectedByDefault
public boolean isSelectedByDefault(T item)
Control if the component should be selected by default, based on the applicable item- Parameters:
item
- the item- Returns:
- true to select the component by default
-
-