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
,NodeExecutors
,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.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.<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 itemMethods inherited from class com.cloudbees.jenkins.support.api.Component
getCategory, getDisplayName, getDisplayPermissions, getId, getRequiredPermissions, isEnabled, isSelectedByDefault, start
-
Constructor Details
-
ObjectComponent
public ObjectComponent()
-
-
Method Details
-
getDescriptor
- Specified by:
getDescriptor
in interfaceDescribable<T extends AbstractModelObject>
-
addContents
Add contents to a container- Specified by:
addContents
in classComponent
- Parameters:
container
- aContainer
-
addContents
Add contents from a specific item to a container- Parameters:
container
- theContainer
item
- the item
-
allInstances
All applicableObjectComponent
s for the class. -
for_
All applicableObjectComponentDescriptor
s for the class. -
isApplicable
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
Return if this component is applicable to a specific item.- Parameters:
item
- the item- Returns:
- true if applicable
-
isSelectedByDefault
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
-