package org.sakaiproject.wontovlab.tool.jsf;

import org.sakaiproject.wontovlab.model.Drug;
import org.sakaiproject.wontovlab.model.Equipment;
import org.sakaiproject.wontovlab.model.StepMaterial;


/**
 * This is a wrapper class which is required to get the interactions from the user
 * without storing UI dependent information in the data POJO
 * @author Sakai App Builder -AZ
 */
public class StepWrapper {

	private StepMaterial stepMaterial;
	private String description;
	private Drug drug;
	private Equipment equipment;
	private boolean canDelete; // can this weblab be deleted
	private boolean canEdit;
	private int newStepIdFormatted;

	/**
	 * Constructor which accepts the object we are wrapping
	 * @param item the WebLab we are wrapping
	 */
	public StepWrapper() {
		
	}
	
	public StepWrapper(StepMaterial stepMaterial, Drug drug) {
		this.stepMaterial = stepMaterial;
		this.drug = drug;
	}	
	
	public StepWrapper(StepMaterial stepMaterial, Equipment equipment) {
		this.stepMaterial = stepMaterial;
		this.equipment = equipment;
	}
	
	public StepWrapper(StepMaterial stepMaterial) {
		this.stepMaterial = stepMaterial;
	}

	public StepWrapper(Drug drug) {
		this.drug = drug;
	}
	
	public StepWrapper(Equipment equipment) {
		this.equipment = equipment;
	}
	
	


	/**
	 * Basic setters and getters
	 */


	public boolean isCanDelete() {
		return canDelete;
	}

	public void setCanDelete(boolean canDelete) {
		this.canDelete = canDelete;
	}

	public StepMaterial getStepMaterial()
	{
		return stepMaterial;
	}


	public void setStepMaterial(StepMaterial stepMaterial)
	{
		this.stepMaterial = stepMaterial;
	}

	

	public Drug getDrug() {
		return drug;
	}

	public void setDrug(Drug drug) {
		this.drug = drug;
	}



	public Equipment getEquipment() {
		return equipment;
	}

	public void setEquipment(Equipment equipment) {
		this.equipment = equipment;
	}

	public boolean isCanEdit()
	{
		return canEdit;
	}


	public void setCanEdit(boolean canEdit)
	{
		this.canEdit = canEdit;
	}


	public int getNewStepIdFormatted() {
		return newStepIdFormatted;
	}

	public void setNewStepIdFormatted(int newStepIdFormatted) {
		this.newStepIdFormatted = newStepIdFormatted;
	}

	public String getDescription() {
		return stepMaterial.getMaterial().getDescription();
	}

}
