org.vraptor.component
Interface LogicMethod

All Known Implementing Classes:
DefaultLogicMethod, LogicMethodWrapper

public interface LogicMethod

A business logic method.

Author:
Guilherme Silveira

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()
           
 boolean shouldRedirect()
          Should execute a redirect after business logic execution.
 ValidationErrors validate(Object component, LogicRequest context, ResourceBundle bundle, Object[] methodParamObjects)
          Validates this logic.
 

Method Detail

getName

String getName()
Returns the logic's name

Returns:
its name

execute

String execute(Object component,
               LogicRequest context,
               Object[] params)
               throws LogicException
Executes the logic by invoking the method

Parameters:
component - the component to invoke the method on
context -
Returns:
the method's result
Throws:
LogicException - something wrong happenned

shouldRedirect

boolean shouldRedirect()
Should execute a redirect after business logic execution.

Returns:
true if redirection should be done

validate

ValidationErrors validate(Object component,
                          LogicRequest context,
                          ResourceBundle bundle,
                          Object[] methodParamObjects)
                          throws UnstableValidationException
Validates this logic.

Parameters:
component -
context -
methodParamObjects - method parameters
Returns:
the errors
Throws:
UnstableValidationException

getMetadata

Method getMetadata()

getParameters

List<MethodParameter> getParameters()

getComponentType

ComponentType getComponentType()


Copyright © 2004-2008 VRaptor. All Rights Reserved.