Interface PluginAllowlist

All Known Subinterfaces:
PluginAllowlistRegistrar
All Known Implementing Classes:
PluginAllowlistConfigurator

public interface PluginAllowlist
Determines whether a plugin method or class is allowed to be invoked from a Velocity template, as defined by plugin module descriptors.
Since:
6.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Checks if a method is allowlisted by either the method explicitly or by its class/package.
    boolean
    Only returns true if the actual class is allowlisted, irrespective of whether all methods declared in the class are individually allowlisted.
    boolean
    Only returns true if the specific method is allowlisted, irrespective of whether its declaring class is allowlisted.
    void
    Reloads the allowlist from the plugin module descriptors.
  • Method Details

    • isAllowlisted

      default boolean isAllowlisted(Method method)
      Checks if a method is allowlisted by either the method explicitly or by its class/package.
      Since:
      6.1.0
    • isAllowlistedClassPackage

      boolean isAllowlistedClassPackage(Class<?> clazz)
      Only returns true if the actual class is allowlisted, irrespective of whether all methods declared in the class are individually allowlisted.
    • isAllowlistedMethod

      boolean isAllowlistedMethod(Method method)
      Only returns true if the specific method is allowlisted, irrespective of whether its declaring class is allowlisted. Call isAllowlisted(java.lang.reflect.Method) to consider both method and class/package allowlist configuration.
    • reload

      void reload()
      Reloads the allowlist from the plugin module descriptors.
      Since:
      6.1.0