Class Component
java.lang.Object
com.cloudbees.jenkins.support.api.Component
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
AboutBrowser,AboutJenkins,AboutUser,AdministrativeMonitors,BuildQueue,ConfigFileComponent,CustomLogs,EnvironmentVariables,FileDescriptorLimit,FileListCapComponent,GCLogs,HeapUsageHistogram,ItemsContent,JenkinsLogs,LoadStats,LoggerManager,Metrics,NetworkInterfaces,NodeMonitors,ObjectComponent,OtherConfigFilesComponent,OtherLogs,ProxyConfiguration,RemotingDiagnostics,ReverseProxy,RootCAs,RunningBuilds,SlaveCommandStatistics,SlaveLogs,SystemProperties,TaskLogs,UnfilteredFileListCapComponent,UpdateCenter
Represents a component of a support bundle.
This is the unit of user consent; when creating a support bundle, the user would enable/disable individual components.
- Author:
- Stephen Connolly
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCategories supported by this version of support-coreNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddContents(Container container) Add contents to a containerbooleanThis method will indicate if the component can be generated asynchronously.Specify in whichComponent.ComponentCategorythe current component is related.abstract StringgetId()Returns the component id.abstract Set<Permission>Returns the (possibly empty, never null) list of permissions that are required for the user to include this in a bundle.<C extends AbstractModelObject>
booleanisApplicable(Class<C> clazz) Return if this component is applicable to a specific class of item.booleanReturnstrueif the current authentication can include this component in a bundle.booleanvoidstart(SupportContext context) Deprecated.booleansupersedes(Component component) Returns true if a component is superseded by this component.
-
Constructor Details
-
Component
public Component()
-
-
Method Details
-
getRequiredPermissions
Returns the (possibly empty, never null) list of permissions that are required for the user to include this in a bundle. An empty list indicates that any user can include this bundle.- Returns:
- the (possibly empty, never null) list of permissions that are required for the user to include this in a bundle.
-
getDisplayPermissions
-
isEnabled
@Exported public boolean isEnabled()Returnstrueif the current authentication can include this component in a bundle.- Returns:
trueif the current authentication can include this component in a bundle.
-
isSelectedByDefault
@Exported public boolean isSelectedByDefault() -
canBeGeneratedAsync
public boolean canBeGeneratedAsync()This method will indicate if the component can be generated asynchronously. This is useful for components that need request context info that only be available in a request thread. By default, it will return true.- Returns:
-
isApplicable
Return if this component is applicable to a specific class of item.- Type Parameters:
C- Object that extendsAbstractModelObject- Parameters:
clazz- the class- Returns:
trueif applicable to this class
-
getDisplayName
-
addContents
Add contents to a container- Parameters:
container- aContainer
-
getId
Returns the component id.- Returns:
- by default, the
Class.getSimpleName()of the component implementation.
-
start
Deprecated. -
getCategory
Specify in whichComponent.ComponentCategorythe current component is related.- Returns:
- An enum value of
Component.ComponentCategory. - Since:
- TODO
-
supersedes
Returns true if a component is superseded by this component. useful if we write a component that makes another one obsolete.
-