01: /**********************************************************************************
02: * $URL:https://source.sakaiproject.org/svn/osp/trunk/common/api/src/java/org/theospi/portfolio/guidance/mgt/GuidanceManager.java $
03: * $Id:GuidanceManager.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.theospi.portfolio.guidance.mgt;
21:
22: import org.sakaiproject.content.api.ContentCollection;
23: import org.sakaiproject.entity.api.Reference;
24: import org.sakaiproject.metaobj.shared.model.Id;
25: import org.theospi.portfolio.guidance.model.Guidance;
26:
27: import java.io.IOException;
28: import java.io.InputStream;
29: import java.io.OutputStream;
30: import java.util.List;
31: import java.util.Map;
32:
33: /**
34: * Created by IntelliJ IDEA.
35: * User: John Ellis
36: * Date: Nov 11, 2005
37: * Time: 12:07:35 PM
38: * To change this template use File | Settings | File Templates.
39: */
40: public interface GuidanceManager {
41:
42: public final static String CURRENT_GUIDANCE = "org.theospi.portfolio.guidance.currentGuidance";
43: public final static String CURRENT_GUIDANCE_ID = "org.theospi.portfolio.guidance.currentGuidanceId";
44:
45: public Guidance createNew(String description, String siteId,
46: Id securityQualifier, String securityViewFunction,
47: String securityEditFunction);
48:
49: public Guidance getGuidance(Id guidanceId);
50:
51: public boolean assureAccess(Guidance guidance);
52:
53: public Guidance saveGuidance(Guidance guidance);
54:
55: public void deleteGuidance(Guidance guidance);
56:
57: public Reference decorateReference(Guidance guidance,
58: String reference);
59:
60: public List listGuidances(String siteId);
61:
62: public Guidance getGuidance(String id);
63:
64: public Guidance getGuidance(String id, boolean checkAuthz);
65:
66: public void packageGuidanceForExport(List guidanceIds,
67: OutputStream os) throws IOException;
68:
69: /**
70: * takes a stream generated by the packageGuidanceForExport and regenerates the guidance into
71: * the given worksite.
72: * @param parent ContentCollection
73: * @param siteId String
74: * @param in InputStream
75: * @return Map of old id (String) to new Guidance object
76: * @throws IOException
77: */
78: public Map importGuidanceList(ContentCollection parent,
79: String siteId, InputStream in) throws IOException;
80:
81: /**
82: * Pulls all guidance
83: * @return List of Guidance
84: */
85: public List getGuidanceForWarehousing();
86: }
|