/******************************************************************************
 * CrudLogic.java - created by Sakai App Builder -AZ
 * 
 * Copyright (c) 2007 Sakai Project/Sakai Foundation
 * Licensed under the Educational Community License version 1.0
 * 
 * A copy of the Educational Community License has been included in this 
 * distribution and is available at: http://www.opensource.org/licenses/ecl1.php
 * 
 *****************************************************************************/

package org.sakaiproject.wontovlab.logic;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;

import org.sakaiproject.wontovlab.model.Drug;
import org.sakaiproject.wontovlab.model.Equipment;
import org.sakaiproject.wontovlab.model.Material;
import org.sakaiproject.wontovlab.model.Solution;



/**
 * This is the interface for the app Logic, 
 * @author Sakai App Builder -AZ
 */
public interface MaterialLogic 
{

    public List listMaterial(String locationId, String userId);
	public void saveMaterial(Material material);

	public List listMaterialByDescription(String material);
	
    public List listEquipment(String locationId, String userId);
	public void saveEquipment(Equipment equipment);
    
	public List listDrug(String locationId, String userId);
	public void saveDrug(Drug Drug);
	
	public List listSolution(String locationId, String userId);
	public void saveSolution(Solution solution);
	
	public void removeDrug(Drug drug);
	
	public void removeEquipment(Equipment equipment);
	
	public void removeSolution(Solution solution);
	
	public boolean canEditMaterial(Material material, String locationId, String userId);
	
	public boolean canReadMaterial(Material material, String locationId, String userId);
	
	public boolean canDeleteMaterial(Material material, String locationId, String userId);
	
	public boolean canCreateMaterial(String locationId, String userId);
	
	public void saveMaterialImage(Long materialId, String fileName, InputStream data) throws IOException;
	
	public String getMaterialImageName(Long materialId);

}
