org.vraptor.core
Class InterceptorsLogicFlow

java.lang.Object
  extended by org.vraptor.core.InterceptorsLogicFlow
All Implemented Interfaces:
LogicFlow

public class InterceptorsLogicFlow
extends Object
implements LogicFlow

The base implementation of logic flow, calling the given interceptors.

Author:
Guilherme Silveira, Paulo Silveira

Constructor Summary
InterceptorsLogicFlow(LogicRequest request, InterceptorDealer dealer)
           
 
Method Summary
 void addInterceptor(InterceptorType i)
          Adds an interceptor to the top.
 void execute()
          Executes the next step in the flow, keeping in mind the last interceptor executed, so we can execute the next one.
 LogicRequest getLogicRequest()
          Returns the respective LogicRequest for this flow
 void redirect(String url)
          Executes a server side redirect to this url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterceptorsLogicFlow

public InterceptorsLogicFlow(LogicRequest request,
                             InterceptorDealer dealer)
Method Detail

execute

public void execute()
             throws ViewException,
                    LogicException
Executes the next step in the flow, keeping in mind the last interceptor executed, so we can execute the next one.

Specified by:
execute in interface LogicFlow
Throws:
ViewException - some view problem
LogicException - some logic or interceptor problem

addInterceptor

public void addInterceptor(InterceptorType i)
Adds an interceptor to the top.

Parameters:
i - the interceptor to add

redirect

public void redirect(String url)
              throws RedirectException
Description copied from interface: LogicFlow
Executes a server side redirect to this url. If a ViewException occurs it might be dangerous to try a server side forward (the end-user might get an unexpected combination of both pages).

Specified by:
redirect in interface LogicFlow
Throws:
RedirectException

getLogicRequest

public LogicRequest getLogicRequest()
Description copied from interface: LogicFlow
Returns the respective LogicRequest for this flow

Specified by:
getLogicRequest in interface LogicFlow
Returns:


Copyright © 2004-2008 VRaptor. All Rights Reserved.