com.opensymphony.xwork2
Class DefaultUnknownHandlerManager

java.lang.Object
  extended by com.opensymphony.xwork2.DefaultUnknownHandlerManager
All Implemented Interfaces:
UnknownHandlerManager

public class DefaultUnknownHandlerManager
extends Object
implements UnknownHandlerManager

Default implementation of UnknownHandlerManager

See Also:
UnknownHandlerManager

Field Summary
private  Configuration configuration
           
private  Container container
           
protected  ArrayList<UnknownHandler> unknownHandlers
           
 
Constructor Summary
DefaultUnknownHandlerManager()
           
 
Method Summary
protected  void build()
          Builds a list of UnknowHandlers in the order specified by the configured "unknown-handler-stack".
 List<UnknownHandler> getUnknownHandlers()
           
 ActionConfig handleUnknownAction(String namespace, String actionName)
          Iterate over UnknownHandlers and return the result of the first one that can handle it
 Object handleUnknownMethod(Object action, String methodName)
          Iterate over UnknownHandlers and return the result of the first one that can handle it
 Result handleUnknownResult(ActionContext actionContext, String actionName, ActionConfig actionConfig, String resultCode)
          Iterate over UnknownHandlers and return the result of the first one that can handle it
 boolean hasUnknownHandlers()
           
 void setConfiguration(Configuration configuration)
           
 void setContainer(Container container)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

unknownHandlers

protected ArrayList<UnknownHandler> unknownHandlers

configuration

private Configuration configuration

container

private Container container
Constructor Detail

DefaultUnknownHandlerManager

public DefaultUnknownHandlerManager()
Method Detail

setConfiguration

public void setConfiguration(Configuration configuration)

setContainer

public void setContainer(Container container)

build

protected void build()
Builds a list of UnknowHandlers in the order specified by the configured "unknown-handler-stack". If "unknown-handler-stack" was not configured, all UnknowHandlers will be returned, in no specific order


handleUnknownResult

public Result handleUnknownResult(ActionContext actionContext,
                                  String actionName,
                                  ActionConfig actionConfig,
                                  String resultCode)
Iterate over UnknownHandlers and return the result of the first one that can handle it

Specified by:
handleUnknownResult in interface UnknownHandlerManager

handleUnknownMethod

public Object handleUnknownMethod(Object action,
                                  String methodName)
                           throws NoSuchMethodException
Iterate over UnknownHandlers and return the result of the first one that can handle it

Specified by:
handleUnknownMethod in interface UnknownHandlerManager
Throws:
NoSuchMethodException

handleUnknownAction

public ActionConfig handleUnknownAction(String namespace,
                                        String actionName)
Iterate over UnknownHandlers and return the result of the first one that can handle it

Specified by:
handleUnknownAction in interface UnknownHandlerManager
Throws:
NoSuchMethodException

hasUnknownHandlers

public boolean hasUnknownHandlers()
Specified by:
hasUnknownHandlers in interface UnknownHandlerManager

getUnknownHandlers

public List<UnknownHandler> getUnknownHandlers()
Specified by:
getUnknownHandlers in interface UnknownHandlerManager


Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.