001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/help/tags/sakai_2-4-1/help-api/src/java/org/sakaiproject/api/app/help/HelpManager.java $
003: * $Id: HelpManager.java 7900 2006-04-18 08:04:32Z marquard@ched.uct.ac.za $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2003, 2004 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.api.app.help;
021:
022: import java.util.List;
023: import java.util.Map;
024: import java.util.Set;
025:
026: import org.sakaiproject.component.api.ServerConfigurationService;
027:
028: /**
029: * Help Manager for the Sakai Help Tool.
030: * @version $Id: HelpManager.java 7900 2006-04-18 08:04:32Z marquard@ched.uct.ac.za $
031: */
032: public interface HelpManager {
033:
034: /**
035: * Synchronize initialization of the manager.
036: */
037: public void initialize();
038:
039: /**
040: * reInitialization of the help tool.
041: */
042: public void reInitialize();
043:
044: /**
045: * Create Category
046: * @return Category
047: */
048: public Category createCategory();
049:
050: /**
051: * Store Category
052: * @param category
053: */
054: public void storeCategory(Category category);
055:
056: /**
057: * find all contexts associated with mappedView
058: * @param mappedView
059: * @return - list of contexts (String)
060: */
061: public List getContexts(String mappedView);
062:
063: /**
064: * returns a list of all active contexts. Active contexts
065: * are created when the user navigates around the site.
066: * @param session
067: * @return
068: */
069: public List getActiveContexts(Map session);
070:
071: /**
072: * adds a context to the active context list
073: * @param session
074: * @param mappedView
075: */
076: public void addContexts(Map session, String mappedView);
077:
078: /**
079: * get Resources for a context
080: * @param context
081: * @return set of resources associated with the supplied context
082: */
083: public Set getResources(Long context);
084:
085: /**
086: * get a resource by id
087: * @param id
088: * @return
089: */
090: public Resource getResource(Long id);
091:
092: /**
093: * create a resource
094: * @return Resource
095: */
096: public Resource createResource();
097:
098: /**
099: * persist a resource
100: * @param resource
101: */
102: public void storeResource(Resource resource);
103:
104: /**
105: * delete a resource by id
106: * @param resourceId
107: */
108: public void deleteResource(Long resourceId);
109:
110: /**
111: * get source
112: * @param id
113: * @return Source
114: */
115: public Source getSource(Long id);
116:
117: /**
118: * store source
119: * @param source
120: */
121: public void storeSource(Source source);
122:
123: /**
124: * delete source by id
125: * @param sourceId
126: */
127: public void deleteSource(Long sourceId);
128:
129: /**
130: * get context by id
131: * @param id
132: * @return Context
133: */
134: public Context getContext(Long id);
135:
136: /**
137: * store context
138: * @param context
139: */
140: public void storeContext(Context context);
141:
142: /**
143: * delete context by id
144: * @param contextId
145: */
146: public void deleteContext(Long contextId);
147:
148: /**
149: *
150: * @param session
151: * @return map of resources keyed by active contexts
152: */
153: public Map getResourcesForActiveContexts(Map session);
154:
155: /**
156: *
157: * @param query
158: * @return set of resources found by searching with the supplied query.
159: * @throws RuntimeException - if query can't be parsed
160: */
161: public Set searchResources(String query) throws RuntimeException;
162:
163: /**
164: * get table of contents of manager
165: * @return TableOfContents
166: */
167: public TableOfContents getTableOfContents();
168:
169: /**
170: * set table of contents
171: * @param toc
172: */
173: public void setTableOfContents(TableOfContents toc);
174:
175: /**
176: * searches the glossary for the keyword.
177: * Returns a GlossaryEntry for this keyword if found,
178: * return null if no entry is found.
179: * @param keyword
180: * @return
181: */
182: public GlossaryEntry searchGlossary(String keyword);
183:
184: /**
185: * get glossary
186: * @return Glossary
187: */
188: public Glossary getGlossary();
189:
190: /**
191: * get resource by doc id
192: * @param helpDocIdString
193: * @return Resource
194: */
195: public Resource getResourceByDocId(String helpDocIdString);
196:
197: /**
198: * get support email address
199: * @return address as string
200: */
201: public String getSupportEmailAddress();
202:
203: /**
204: * get REST configuration
205: * @return REST configuration
206: */
207: public RestConfiguration getRestConfiguration();
208:
209: /**
210: * get static EXTERNAL_LOCATION
211: * @return EXTERNAL_LOCATION
212: */
213: public String getExternalLocation();
214:
215: /**
216: * get server config service
217: * @return
218: */
219: public ServerConfigurationService getServerConfigurationService();
220:
221: /**
222: * set server config service
223: * @param s
224: */
225: public void setServerConfigurationService(
226: ServerConfigurationService s);
227:
228: /**
229: * get Welcome Page
230: * @return docId of Welcome Page
231: */
232: public String getWelcomePage();
233:
234: }
|