Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (C) 2014-2015 Philip Helger (www.helger.com) philip[at]helger[dot]com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package com.helger.webbasics.action;
 
 import java.util.Map;
 
 
Action invoker interface.

Author(s):
Philip Helger
 
 public interface IActionInvoker
 {
  
Register an action.

Parameters:
aAction The action declaration to be used. May not be null.
 
   void registerAction (@Nonnull IActionDeclaration aAction);

  
Invoke the specified action

Parameters:
sActionName The name of the action to be invoked. May not be null.
aActionExecutor The executor to be invoked. May not be null.
aRequestScope The current request scope. May not be null.
aUnifiedResponse The response to be filled. May not be null.
Throws:
java.lang.Throwable In case the IActionExecutor threw an exception.
 
   void invokeAction (@Nonnull final String sActionName,
                      @Nonnull IActionExecutor aActionExecutor,
                      @Nonnull IRequestWebScopeWithoutResponse aRequestScope,
                      @Nonnull UnifiedResponse aUnifiedResponsethrows Throwable;

  

Returns:
A map from action name to action executor factory. Never null.
 
   @Nonnull
   Map <StringIFactory <? extends IActionExecutor>> getAllRegisteredExecutors ();

  
Check whether an action with the given name is present

Parameters:
sActionName The name of the action to check. May be null.
Returns:
true if an action with the given name is contained, false otherwise.
 
   boolean isRegisteredAction (@Nullable String sActionName);

  
Get the executor factory associated with the given action.

Parameters:
sActionName The name of the action to check. May be null.
Returns:
null if no such action exists.
 
   @Nullable
   IFactory <? extends IActionExecutorgetRegisteredExecutor (@Nullable String sActionName);

  
Create an executor associated with the given action. This is a shortcut for getRegisteredExecutor (sActionName).create()

Parameters:
sActionName The name of the action to instantiate. May be null.
Returns:
null if no such action exists.
 
   @Nullable
New to GrepCode? Check out our FAQ X