org.ploin.web.faces.phaselistener
Class JsfPhaseListener06

java.lang.Object
  extended by org.ploin.web.faces.phaselistener.JsfPhaseListener06
All Implemented Interfaces:
Serializable, EventListener, javax.faces.event.PhaseListener

public class JsfPhaseListener06
extends Object
implements javax.faces.event.PhaseListener

PhaseListener for Phase 6.

$LastChangedBy: r.reiz $
$Revision: 126 $
$Date: 2010-05-22 18:46:29 +0200 (Sat, 22 May 2010) $

See Also:
Serialized Form

Constructor Summary
JsfPhaseListener06()
           
 
Method Summary
 void afterPhase(javax.faces.event.PhaseEvent event)
          after phase 6 the framework checks if you leave a flow.
 void beforePhase(javax.faces.event.PhaseEvent event)
          before phase 6 the framework looks for authoritys.
 javax.faces.context.FacesContext getFacesContextTest()
           
 Set<String> getFlowPath(javax.servlet.http.HttpSession session)
           
 javax.faces.event.PhaseId getPhaseId()
           
 void logTime(Long time)
           
 void processLeavingFlow(javax.faces.context.FacesContext fc, javax.servlet.http.HttpSession session, List<Flow> flows, Flow flow, String fromViewId, String toViewId)
           
 void setFacesContextTest(javax.faces.context.FacesContext facesContextTest)
           
 void stayInFlow(Flow flow, javax.faces.context.FacesContext fc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsfPhaseListener06

public JsfPhaseListener06()
Method Detail

beforePhase

public void beforePhase(javax.faces.event.PhaseEvent event)
before phase 6 the framework looks for authoritys. If the destination viewID is defined in a flow and the flow have includeAuthoritys or excludeAuthoritys, then the framework fetch a value from the AuthoritySource and look if the user/request is authorized to entry the view. If the user/request is not authorized to entry the view, ploinFaces set the value from the "accessDeniedPage" (ploinFlows.xml) as current viewId. If "accessDeniedPage" is not defined the user/request will stay on the current view (fromViewId).

Specified by:
beforePhase in interface javax.faces.event.PhaseListener
Parameters:
event -

afterPhase

public void afterPhase(javax.faces.event.PhaseEvent event)
after phase 6 the framework checks if you leave a flow. If you do, than the framework will remove all attributes from session who are defined in the leaved flow.

Specified by:
afterPhase in interface javax.faces.event.PhaseListener
Parameters:
event -

logTime

public void logTime(Long time)

getFlowPath

public Set<String> getFlowPath(javax.servlet.http.HttpSession session)

stayInFlow

public void stayInFlow(Flow flow,
                       javax.faces.context.FacesContext fc)

processLeavingFlow

public void processLeavingFlow(javax.faces.context.FacesContext fc,
                               javax.servlet.http.HttpSession session,
                               List<Flow> flows,
                               Flow flow,
                               String fromViewId,
                               String toViewId)
Parameters:
fc - - the facesContext
session - - HttpSession
flows - - all flows defined in the ploinFlows.xml
flow - - the leaving flow
fromViewId -
toViewId -

getPhaseId

public javax.faces.event.PhaseId getPhaseId()
Specified by:
getPhaseId in interface javax.faces.event.PhaseListener

getFacesContextTest

public javax.faces.context.FacesContext getFacesContextTest()

setFacesContextTest

public void setFacesContextTest(javax.faces.context.FacesContext facesContextTest)


Copyright © 2012 PLOIN GmbH. All Rights Reserved.