Interface IAjaxFunctionDeclaration

  • All Superinterfaces:
    com.helger.commons.name.IHasName
    All Known Implementing Classes:
    AjaxFunctionDeclaration

    public interface IAjaxFunctionDeclaration
    extends com.helger.commons.name.IHasName
    Interface for all AJAX function declarations
    Author:
    Philip Helger
    • Method Detail

      • getExecutionFilter

        @Nullable
        Predicate<? super com.helger.web.scope.IRequestWebScopeWithoutResponse> getExecutionFilter()
        Returns:
        The optional filter to be invoked before the main AJAX invocation. May be null.
      • getAjaxServletPath

        @Nonnull
        @Nonempty
        String getAjaxServletPath()
        Returns:
        The path to the AJAX servlet. Must start with a slash and end with a slash!
      • getPathWithoutContext

        @Nonnull
        @Nonempty
        default String getPathWithoutContext()
        Returns:
        The path to execute this AJAX function but without a context path. Neither null nor empty. This is a shortcut for getAjaxServletPath () + getName ()
      • getInvocationURI

        @Nonnull
        @Nonempty
        default String getInvocationURI​(@Nonnull
                                        com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope)
        Parameters:
        aRequestScope - The request web scope to be used. Required for cookie-less handling. May not be null.
        Returns:
        The URI where the AJAX function can be invoked. Neither null nor empty.
      • getInvocationURI

        @Nonnull
        @Nonempty
        default String getInvocationURI​(@Nonnull
                                        com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope,
                                        @Nullable
                                        Map<String,​String> aParams)
        Parameters:
        aRequestScope - The request web scope to be used. Required for cookie-less handling. May not be null.
        aParams - An optional map with URL parameters to be used in the URL. May be null or empty.
        Returns:
        The URI where the AJAX function can be invoked. Neither null nor empty.
      • getInvocationURL

        @Nonnull
        default com.helger.commons.url.SimpleURL getInvocationURL​(@Nonnull
                                                                  com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope)
        Parameters:
        aRequestScope - The request web scope to be used. Required for cookie-less handling. May not be null.
        Returns:
        The URL where the AJAX function can be invoked. Never null.
      • canExecute

        boolean canExecute​(@Nonnull
                           com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope)
        Check if this AJAX function can be executed for the passed request.
        Parameters:
        aRequestScope - The request scope to be used for evaluation. Never null .
        Returns:
        true if this AJAX function can be executed, false otherwise.