package com.fp.armas.portal.faces.listener;

import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;

import com.fp.armas.portal.util.PortalLogger;

/**
 * Listener informativo de las fases del ciclo de vida JSF
 * @author dcruz
 *
 */
public class PortalListener implements PhaseListener, PortalLogger{

	private static final long serialVersionUID = 8303265902200435474L;

	@Override
	public void afterPhase(PhaseEvent event) {
		log.info("After PHASE: {}", event.getPhaseId());
	}

	@Override
	public void beforePhase(PhaseEvent event) {
		log.info("Before PHASE: {}", event.getPhaseId());
	}

	@Override
	public PhaseId getPhaseId() {
		return PhaseId.ANY_PHASE;
	}

}
