01: /**********************************************************************************
02: * $URL:https://source.sakaiproject.org/svn/osp/trunk/common/api/src/java/org/theospi/portfolio/style/mgt/StyleManager.java $
03: * $Id:StyleManager.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 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.style.mgt;
21:
22: import java.io.IOException;
23: import java.io.InputStream;
24: import java.io.OutputStream;
25: import java.util.Collection;
26: import java.util.List;
27: import java.util.Map;
28: import java.util.Set;
29:
30: import org.sakaiproject.content.api.ContentCollection;
31: import org.sakaiproject.entity.api.Reference;
32: import org.sakaiproject.metaobj.shared.model.Agent;
33: import org.sakaiproject.metaobj.shared.model.Id;
34: import org.theospi.portfolio.shared.model.Node;
35: import org.theospi.portfolio.style.model.Style;
36:
37: public interface StyleManager {
38:
39: public Node getNode(Id artifactId);
40:
41: public Node getNode(Reference ref);
42:
43: public Style storeStyle(Style style);
44:
45: public Style storeStyle(Style style, boolean checkAuthz);
46:
47: public Style mergeStyle(Style style);
48:
49: public Style mergeStyle(Style style, boolean checkAuthz);
50:
51: public Style getStyle(Id styleId);
52:
53: public boolean deleteStyle(final Id styleId);
54:
55: public Style getLightWeightStyle(final Id styleId);
56:
57: public Collection findSiteStyles(String currentWorksiteId);
58:
59: public Collection findPublishedStyles(String currentWorksiteId);
60:
61: public Collection findGlobalStyles(Agent agent);
62:
63: public boolean isGlobal();
64:
65: public void packageStyleForExport(Set styleIds, OutputStream os)
66: throws IOException;
67:
68: public Map importStyleList(ContentCollection parent, String siteId,
69: InputStream in) throws IOException;
70:
71: /** This function returns all styles */
72: public Collection getStylesForWarehouse();
73:
74: public List getConsumers();
75: }
|