Package com.helger.photon.ajax.decl
Interface IAjaxFunctionDeclaration
-
- All Superinterfaces:
com.helger.commons.name.IHasName
- All Known Implementing Classes:
AjaxFunctionDeclaration
public interface IAjaxFunctionDeclaration extends com.helger.commons.name.IHasNameInterface for all AJAX function declarations- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleancanExecute(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope)Check if this AJAX function can be executed for the passed request.StringgetAjaxServletPath()Predicate<? super com.helger.web.scope.IRequestWebScopeWithoutResponse>getExecutionFilter()default IAjaxExecutorgetExecutor()Supplier<? extends IAjaxExecutor>getExecutorFactory()default StringgetInvocationURI(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope)default StringgetInvocationURI(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope, Map<String,String> aParams)default com.helger.commons.url.SimpleURLgetInvocationURL(com.helger.web.scope.IRequestWebScopeWithoutResponse aRequestScope)default StringgetPathWithoutContext()
-
-
-
Method Detail
-
getExecutorFactory
@Nonnull Supplier<? extends IAjaxExecutor> getExecutorFactory()
- Returns:
- The executor factory to be used. May not be
null.
-
getExecutor
@Nullable default IAjaxExecutor getExecutor()
- Returns:
- An Ajax executor from the executor factory.
- See Also:
getExecutorFactory()
-
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
nullnor empty. This is a shortcut forgetAjaxServletPath () + 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 benull.- Returns:
- The URI where the AJAX function can be invoked. Neither
nullnor 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 benull.aParams- An optional map with URL parameters to be used in the URL. May benullor empty.- Returns:
- The URI where the AJAX function can be invoked. Neither
nullnor 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 benull.- 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. Nevernull.- Returns:
trueif this AJAX function can be executed,falseotherwise.
-
-