Interface DispatchValidator

    • Field Detail

      • DEFAULT

        static final DispatchValidator DEFAULT
        Default validator implementation that explicitly allows all dispatch requests to proceed.
    • Method Detail

      • isDispatchAllowed

        @CheckForNull
        Boolean isDispatchAllowed​(@NonNull
                                  StaplerRequest req,
                                  @NonNull
                                  StaplerResponse rsp)
        Checks if the given request and response should be allowed to dispatch. Returns null to indicate an unknown or neutral result.
        Parameters:
        req - the HTTP request to validate
        rsp - the HTTP response
        Returns:
        true if the request should be dispatched, false if not, or null if unknown or neutral
      • isDispatchAllowed

        @CheckForNull
        default Boolean isDispatchAllowed​(@NonNull
                                          StaplerRequest req,
                                          @NonNull
                                          StaplerResponse rsp,
                                          @NonNull
                                          String viewName,
                                          @CheckForNull
                                          Object node)
        Checks if the given request and response should be allowed to dispatch a view on an optionally present node object. Returns null to indicate an unknown or neutral result.
        Parameters:
        req - the HTTP request to validate
        rsp - the HTTP response
        viewName - the name of the view to dispatch
        node - the node being dispatched if present
        Returns:
        true if the view should be allowed to dispatch, false if it should not, or null if unknown