001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/mailarchive/tags/sakai_2-4-1/mailarchive-api/api/src/java/org/sakaiproject/mailarchive/cover/MailArchiveService.java $
003: * $Id: MailArchiveService.java 9905 2006-05-24 20:01:54Z ggolden@umich.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2003, 2004, 2005, 2006 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.mailarchive.cover;
021:
022: import org.sakaiproject.component.cover.ComponentManager;
023:
024: /**
025: * <p>
026: * MailArchiveService is a static Cover for the {@link org.sakaiproject.mailarchive.api.MailArchiveService MailArchiveService}; see that interface for usage details.
027: * </p>
028: */
029: public class MailArchiveService {
030: /**
031: * Access the component instance: special cover only method.
032: *
033: * @return the component instance.
034: */
035: public static org.sakaiproject.mailarchive.api.MailArchiveService getInstance() {
036: if (ComponentManager.CACHE_COMPONENTS) {
037: if (m_instance == null)
038: m_instance = (org.sakaiproject.mailarchive.api.MailArchiveService) ComponentManager
039: .get(org.sakaiproject.mailarchive.api.MailArchiveService.class);
040: return m_instance;
041: } else {
042: return (org.sakaiproject.mailarchive.api.MailArchiveService) ComponentManager
043: .get(org.sakaiproject.mailarchive.api.MailArchiveService.class);
044: }
045: }
046:
047: private static org.sakaiproject.mailarchive.api.MailArchiveService m_instance = null;
048:
049: public static java.lang.String APPLICATION_ID = org.sakaiproject.mailarchive.api.MailArchiveService.APPLICATION_ID;
050:
051: public static java.lang.String REFERENCE_ROOT = org.sakaiproject.mailarchive.api.MailArchiveService.REFERENCE_ROOT;
052:
053: public static java.lang.String SECURE_MAIL_ROOT = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_MAIL_ROOT;
054:
055: public static java.lang.String SECURE_MAIL_READ = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_MAIL_READ;
056:
057: public static java.lang.String SECURE_MAIL_ADD = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_MAIL_ADD;
058:
059: public static java.lang.String SECURE_MAIL_REMOVE_OWN = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_MAIL_REMOVE_OWN;
060:
061: public static java.lang.String SECURE_MAIL_REMOVE_ANY = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_MAIL_REMOVE_ANY;
062:
063: public static java.lang.String SECURE_MAIL_UPDATE_OWN = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_MAIL_UPDATE_OWN;
064:
065: public static java.lang.String SECURE_MAIL_UPDATE_ANY = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_MAIL_UPDATE_ANY;
066:
067: public static java.lang.String SECURE_MAIL_READ_DRAFT = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_MAIL_READ_DRAFT;
068:
069: public static java.lang.String HEADER_OUTER_CONTENT_TYPE = org.sakaiproject.mailarchive.api.MailArchiveService.HEADER_OUTER_CONTENT_TYPE;
070:
071: public static java.lang.String HEADER_INNER_CONTENT_TYPE = org.sakaiproject.mailarchive.api.MailArchiveService.HEADER_INNER_CONTENT_TYPE;
072:
073: public static java.lang.String SECURE_READ = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_READ;
074:
075: public static java.lang.String SECURE_ADD = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_ADD;
076:
077: public static java.lang.String SECURE_REMOVE_OWN = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_REMOVE_OWN;
078:
079: public static java.lang.String SECURE_REMOVE_ANY = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_REMOVE_ANY;
080:
081: public static java.lang.String SECURE_UPDATE_OWN = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_UPDATE_OWN;
082:
083: public static java.lang.String SECURE_UPDATE_ANY = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_UPDATE_ANY;
084:
085: public static java.lang.String SECURE_READ_DRAFT = org.sakaiproject.mailarchive.api.MailArchiveService.SECURE_READ_DRAFT;
086:
087: public static java.lang.String REF_TYPE_CHANNEL = org.sakaiproject.mailarchive.api.MailArchiveService.REF_TYPE_CHANNEL;
088:
089: public static java.lang.String REF_TYPE_MESSAGE = org.sakaiproject.mailarchive.api.MailArchiveService.REF_TYPE_MESSAGE;
090:
091: public static org.sakaiproject.mailarchive.api.MailArchiveChannel getMailArchiveChannel(
092: java.lang.String param0)
093: throws org.sakaiproject.exception.IdUnusedException,
094: org.sakaiproject.exception.PermissionException {
095: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
096: if (service == null)
097: return null;
098:
099: return service.getMailArchiveChannel(param0);
100: }
101:
102: public static org.sakaiproject.mailarchive.api.MailArchiveChannelEdit addMailArchiveChannel(
103: java.lang.String param0)
104: throws org.sakaiproject.exception.IdUsedException,
105: org.sakaiproject.exception.IdInvalidException,
106: org.sakaiproject.exception.PermissionException {
107: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
108: if (service == null)
109: return null;
110:
111: return service.addMailArchiveChannel(param0);
112: }
113:
114: public static java.util.List getChannels() {
115: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
116: if (service == null)
117: return null;
118:
119: return service.getChannels();
120: }
121:
122: public static boolean allowGetChannel(java.lang.String param0) {
123: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
124: if (service == null)
125: return false;
126:
127: return service.allowGetChannel(param0);
128: }
129:
130: public static boolean allowAddChannel(java.lang.String param0) {
131: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
132: if (service == null)
133: return false;
134:
135: return service.allowAddChannel(param0);
136: }
137:
138: public static org.sakaiproject.message.api.MessageChannelEdit addChannel(
139: java.lang.String param0)
140: throws org.sakaiproject.exception.IdUsedException,
141: org.sakaiproject.exception.IdInvalidException,
142: org.sakaiproject.exception.PermissionException {
143: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
144: if (service == null)
145: return null;
146:
147: return service.addChannel(param0);
148: }
149:
150: public static boolean allowEditChannel(java.lang.String param0) {
151: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
152: if (service == null)
153: return false;
154:
155: return service.allowEditChannel(param0);
156: }
157:
158: public static org.sakaiproject.message.api.MessageChannelEdit editChannel(
159: java.lang.String param0)
160: throws org.sakaiproject.exception.IdUnusedException,
161: org.sakaiproject.exception.PermissionException,
162: org.sakaiproject.exception.InUseException {
163: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
164: if (service == null)
165: return null;
166:
167: return service.editChannel(param0);
168: }
169:
170: public static void commitChannel(
171: org.sakaiproject.message.api.MessageChannelEdit param0) {
172: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
173: if (service == null)
174: return;
175:
176: service.commitChannel(param0);
177: }
178:
179: public static void cancelChannel(
180: org.sakaiproject.message.api.MessageChannelEdit param0) {
181: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
182: if (service == null)
183: return;
184:
185: service.cancelChannel(param0);
186: }
187:
188: public static boolean allowRemoveChannel(java.lang.String param0) {
189: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
190: if (service == null)
191: return false;
192:
193: return service.allowRemoveChannel(param0);
194: }
195:
196: public static void removeChannel(
197: org.sakaiproject.message.api.MessageChannelEdit param0)
198: throws org.sakaiproject.exception.PermissionException {
199: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
200: if (service == null)
201: return;
202:
203: service.removeChannel(param0);
204: }
205:
206: public static java.lang.String channelReference(
207: java.lang.String param0, java.lang.String param1) {
208: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
209: if (service == null)
210: return null;
211:
212: return service.channelReference(param0, param1);
213: }
214:
215: public static java.lang.String messageReference(
216: java.lang.String param0, java.lang.String param1,
217: java.lang.String param2) {
218: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
219: if (service == null)
220: return null;
221:
222: return service.messageReference(param0, param1, param2);
223: }
224:
225: public static java.lang.String messageReference(
226: java.lang.String param0, java.lang.String param1) {
227: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
228: if (service == null)
229: return null;
230:
231: return service.messageReference(param0, param1);
232: }
233:
234: public static void cancelMessage(
235: org.sakaiproject.message.api.MessageEdit param0) {
236: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
237: if (service == null)
238: return;
239:
240: service.cancelMessage(param0);
241: }
242:
243: public static java.util.List getMessages(java.lang.String param0,
244: org.sakaiproject.time.api.Time param1, int param2,
245: boolean param3, boolean param4, boolean param5)
246: throws org.sakaiproject.exception.PermissionException {
247: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
248: if (service == null)
249: return null;
250:
251: return service.getMessages(param0, param1, param2, param3,
252: param4, param5);
253: }
254:
255: public static java.util.List getChannelIds(java.lang.String param0) {
256: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
257: if (service == null)
258: return null;
259:
260: return service.getChannelIds(param0);
261: }
262:
263: public static org.sakaiproject.message.api.Message getMessage(
264: org.sakaiproject.entity.api.Reference param0)
265: throws org.sakaiproject.exception.IdUnusedException,
266: org.sakaiproject.exception.PermissionException {
267: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
268: if (service == null)
269: return null;
270:
271: return service.getMessage(param0);
272: }
273:
274: public static org.sakaiproject.message.api.MessageChannel getChannel(
275: java.lang.String param0)
276: throws org.sakaiproject.exception.IdUnusedException,
277: org.sakaiproject.exception.PermissionException {
278: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
279: if (service == null)
280: return null;
281:
282: return service.getChannel(param0);
283: }
284:
285: public static java.lang.String merge(java.lang.String param0,
286: org.w3c.dom.Element param1, java.lang.String param2,
287: java.lang.String param3, java.util.Map param4,
288: java.util.HashMap param5, java.util.Set param6) {
289: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
290: if (service == null)
291: return null;
292:
293: return service.merge(param0, param1, param2, param3, param4,
294: param5, param6);
295: }
296:
297: public static java.lang.String getLabel() {
298: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
299: if (service == null)
300: return null;
301:
302: return service.getLabel();
303: }
304:
305: public static java.lang.String archive(java.lang.String param0,
306: org.w3c.dom.Document param1, java.util.Stack param2,
307: java.lang.String param3, java.util.List param4) {
308: org.sakaiproject.mailarchive.api.MailArchiveService service = getInstance();
309: if (service == null)
310: return null;
311:
312: return service.archive(param0, param1, param2, param3, param4);
313: }
314: }
|