Package jenkins.security
Interface CustomClassFilter
-
- All Superinterfaces:
ExtensionPoint
- All Known Implementing Classes:
CustomClassFilter.Contributed
,CustomClassFilter.Static
public interface CustomClassFilter extends ExtensionPoint
Allows extensions to adjust the behavior ofClassFilter.DEFAULT
. Custom filters can be called frequently, and return values are uncached, so implementations should be fast.- Since:
- 2.102
- See Also:
ClassFilterImpl
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CustomClassFilter.Contributed
Standard filter which can load whitelists and blacklists from plugins.static class
CustomClassFilter.Static
Standard filter which pays attention to a system property.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Boolean
permits(Class<?> c)
Determine whether a class should be permitted byClassFilter.isBlacklisted(Class)
ofClassFilter.DEFAULT
.default Boolean
permits(String name)
Determine whether a class should be permitted byClassFilter.isBlacklisted(String)
ofClassFilter.DEFAULT
.
-
-
-
Method Detail
-
permits
@CheckForNull default Boolean permits(Class<?> c)
Determine whether a class should be permitted byClassFilter.isBlacklisted(Class)
ofClassFilter.DEFAULT
.- Parameters:
c
- the class- Returns:
- true to permit it when it would normally be rejected (for example due to having a custom serialization method and being from a third-party library); false to reject it when it would normally be permitted; null to express no opinion (the default)
-
permits
@CheckForNull default Boolean permits(String name)
Determine whether a class should be permitted byClassFilter.isBlacklisted(String)
ofClassFilter.DEFAULT
.- Parameters:
name
- a class name- Returns:
- true to permit it when it would normally be rejected (currently useless);
false to reject it when it would normally be permitted (currently due to
ClassFilter.STANDARD
; null to express no opinion (the default)
-
-