public abstract class ExtensionFilter extends Object implements ExtensionPoint
ExtensionComponents discovered by ExtensionFinders,
as if they were never discovered.
This is useful for those who are deploying restricted/simplified version of Jenkins by reducing the functionality.
Because of the way ExtensionFinder works, even when an extension component
is rejected by a filter, its instance still gets created first.
DescriptorVisibilityFilter,
ExtensionComponentSet.filtered()ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
ExtensionFilter() |
| Modifier and Type | Method and Description |
|---|---|
static ExtensionList<ExtensionFilter> |
all()
All registered
ExtensionFilter instances. |
abstract <T> boolean |
allows(Class<T> type,
ExtensionComponent<T> component)
Checks if a newly discovered extension is allowed to participate into Jenkins.
|
static <T> boolean |
isAllowed(Class<T> type,
ExtensionComponent<T> component) |
public abstract <T> boolean allows(Class<T> type, ExtensionComponent<T> component)
To filter Descriptors based on the Describable subtypes, do as follows:
return !component.isDescriptorOf(Builder.class);
type - The type of the extension that we are discovering. This is not the actual instance
type, but the contract type, such as Descriptor, AdministrativeMonitor, etc.ExtensionFilters veto
a component, it gets dropped.public static <T> boolean isAllowed(Class<T> type, ExtensionComponent<T> component)
public static ExtensionList<ExtensionFilter> all()
ExtensionFilter instances.Copyright © 2019. All rights reserved.