/********************************************************************************** * $URL:https://source.sakaiproject.org/svn/osp/trunk/common/api/src/java/org/theospi/portfolio/guidance/mgt/GuidanceManager.java $ * $Id:GuidanceManager.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $ *********************************************************************************** * * Copyright (c) 2005, 2006, 2008 The Sakai Foundation * * Licensed under the Educational Community License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/ECL-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * **********************************************************************************/ package org.theospi.portfolio.guidance.mgt; import org.sakaiproject.content.api.ContentCollection; import org.sakaiproject.entity.api.Reference; import org.sakaiproject.metaobj.shared.model.Id; import org.theospi.portfolio.guidance.model.Guidance; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.List; import java.util.Map; /** * Created by IntelliJ IDEA. * User: John Ellis * Date: Nov 11, 2005 * Time: 12:07:35 PM * To change this template use File | Settings | File Templates. */ public interface GuidanceManager { public final static String CURRENT_GUIDANCE = "org.theospi.portfolio.guidance.currentGuidance"; public final static String CURRENT_GUIDANCE_ID = "org.theospi.portfolio.guidance.currentGuidanceId"; public Guidance createNew(String description, String siteId, Id securityQualifier, String securityViewFunction, String securityEditFunction); public Guidance getGuidance(Id guidanceId); public boolean assureAccess(Guidance guidance); public Guidance saveGuidance(Guidance guidance); public void deleteGuidance(Guidance guidance); public Reference decorateReference(Guidance guidance, String reference); public List listGuidances(String siteId); public Guidance getGuidance(String id); public Guidance getGuidance(String id, boolean checkAuthz); public void packageGuidanceForExport(List guidanceIds, OutputStream os) throws IOException; /** * takes a stream generated by the packageGuidanceForExport and regenerates the guidance into * the given worksite. * @param parent ContentCollection * @param siteId String * @param in InputStream * @return Map of old id (String) to new Guidance object * @throws IOException */ public Map importGuidanceList(ContentCollection parent, String siteId, InputStream in) throws IOException; /** * Pulls all guidance * @return List of Guidance */ public List getGuidanceForWarehousing(); }