org.vraptor.plugin
Class LogicMethodWrapper

java.lang.Object
  extended by org.vraptor.plugin.LogicMethodWrapper
All Implemented Interfaces:
LogicMethod

public class LogicMethodWrapper
extends Object
implements LogicMethod


Constructor Summary
protected LogicMethodWrapper(LogicMethod logic)
           
 
Method Summary
 String execute(Object component, LogicRequest context, Object[] params)
          Executes the logic by invoking the method
 ComponentType getComponentType()
           
 Method getMetadata()
           
 String getName()
          Returns the logic's name
 List<MethodParameter> getParameters()
           
protected  LogicMethod getWrappedMethod()
           
 boolean shouldRedirect()
          Should execute a redirect after business logic execution.
 ValidationErrors validate(Object component, LogicRequest context, ResourceBundle bundle, Object[] params)
          Validates this logic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogicMethodWrapper

protected LogicMethodWrapper(LogicMethod logic)
Method Detail

getName

public String getName()
Description copied from interface: LogicMethod
Returns the logic's name

Specified by:
getName in interface LogicMethod
Returns:
its name

execute

public String execute(Object component,
                      LogicRequest context,
                      Object[] params)
               throws LogicException
Description copied from interface: LogicMethod
Executes the logic by invoking the method

Specified by:
execute in interface LogicMethod
Parameters:
component - the component to invoke the method on
Returns:
the method's result
Throws:
LogicException - something wrong happenned

shouldRedirect

public boolean shouldRedirect()
Description copied from interface: LogicMethod
Should execute a redirect after business logic execution.

Specified by:
shouldRedirect in interface LogicMethod
Returns:
true if redirection should be done

validate

public ValidationErrors validate(Object component,
                                 LogicRequest context,
                                 ResourceBundle bundle,
                                 Object[] params)
                          throws UnstableValidationException
Description copied from interface: LogicMethod
Validates this logic.

Specified by:
validate in interface LogicMethod
params - method parameters
Returns:
the errors
Throws:
UnstableValidationException

getMetadata

public Method getMetadata()
Specified by:
getMetadata in interface LogicMethod

getWrappedMethod

protected LogicMethod getWrappedMethod()

getParameters

public List<MethodParameter> getParameters()
Specified by:
getParameters in interface LogicMethod

getComponentType

public ComponentType getComponentType()
Specified by:
getComponentType in interface LogicMethod


Copyright © 2004-2008 VRaptor. All Rights Reserved.