/**
 * 
 */
package org.ajax4jsf.portlet.lifecycle;

import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
import javax.faces.lifecycle.Lifecycle;

/**
 * @author asmirnov
 *
 */
public class InvokeApplicationPhase extends LifecyclePhase {

	/**
	 * @param lifecycle
	 */
	public InvokeApplicationPhase(Lifecycle lifecycle) {
		super(lifecycle);
	}

	/* (non-Javadoc)
	 * @see org.ajax4jsf.portlet.lifecycle.LifecyclePhase#executeNextPhase(javax.faces.context.FacesContext, javax.faces.event.PhaseListener[])
	 */
	protected void executeNextPhase(FacesContext context) {
		// do nothing.

	}

	/* (non-Javadoc)
	 * @see org.ajax4jsf.portlet.lifecycle.LifecyclePhase#executePhase(javax.faces.context.FacesContext)
	 */
	public void executePhase(FacesContext context) {
		context.getViewRoot().processApplication(context);
	}

	/* (non-Javadoc)
	 * @see org.ajax4jsf.portlet.lifecycle.LifecyclePhase#getPhaseId()
	 */
	protected PhaseId getPhaseId() {
		return PhaseId.INVOKE_APPLICATION;
	}

}
