package com.sun.ts.tests.jsf.spec.coretags.common;

import java.io.Serializable;

import javax.annotation.PostConstruct;
import javax.faces.bean.RequestScoped;

@RequestScoped
public class BookBean implements Serializable {

	private String authorName;
	private boolean result;
	
	@PostConstruct
	public void postConstruct() {
	}

	public String checkAuthor() {
		if ("Orsen Scott Card".equals(authorName)) {
			this.setResult(true);
			return "Test Passed!";
		} 
		
		this.setResult(false);
		return "Test Failed!";
	}

	public String getAuthorName() {
		return authorName;
	}

	public void setAuthorName(String authorName) {
		this.authorName = authorName;
	}

	public boolean getResult() {
		return result;
	}

	public void setResult(boolean result) {
		this.result = result;
	}
}
