/**
 * 
 */
package org.richfaces.component;

import javax.faces.component.UIMessages;
import javax.faces.context.FacesContext;

import org.ajax4jsf.component.AjaxOutput;

/**
 * @author Anton Belevich
 *
 */
public abstract class UIRichMessages extends UIMessages implements AjaxOutput{

	
	private boolean isPassed = true;
		
	public boolean isPassed(){
		return isPassed;
	}
	
	public boolean isAjaxRendered() {
		return true;
	}

	public void setAjaxRendered(boolean ajaxRendered){
		if(!ajaxRendered){
			new IllegalArgumentException();
		}	
	}
	
	public void decode(FacesContext context){
		isPassed = true;
		super.decode(context);
	}

	public abstract String getLevel();

	public abstract void setLevel(String level);

}
