001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/email/tags/sakai_2-4-1/email-api/api/src/java/org/sakaiproject/email/cover/DigestService.java $
003: * $Id: DigestService.java 7287 2006-03-30 21:21:55Z 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.email.cover;
021:
022: import org.sakaiproject.component.cover.ComponentManager;
023:
024: /**
025: * <p>
026: * DigestService is a static Cover for the {@link org.sakaiproject.email.api.DigestService DigestService}; see that interface for usage details.
027: * </p>
028: */
029: public class DigestService {
030: /**
031: * Access the component instance: special cover only method.
032: *
033: * @return the component instance.
034: */
035: public static org.sakaiproject.email.api.DigestService getInstance() {
036: if (ComponentManager.CACHE_COMPONENTS) {
037: if (m_instance == null)
038: m_instance = (org.sakaiproject.email.api.DigestService) ComponentManager
039: .get(org.sakaiproject.email.api.DigestService.class);
040: return m_instance;
041: } else {
042: return (org.sakaiproject.email.api.DigestService) ComponentManager
043: .get(org.sakaiproject.email.api.DigestService.class);
044: }
045: }
046:
047: private static org.sakaiproject.email.api.DigestService m_instance = null;
048:
049: public static java.lang.String SERVICE_NAME = org.sakaiproject.email.api.DigestService.SERVICE_NAME;
050:
051: public static java.lang.String REFERENCE_ROOT = org.sakaiproject.email.api.DigestService.REFERENCE_ROOT;
052:
053: public static java.lang.String SECURE_ADD_DIGEST = org.sakaiproject.email.api.DigestService.SECURE_ADD_DIGEST;
054:
055: public static java.lang.String SECURE_EDIT_DIGEST = org.sakaiproject.email.api.DigestService.SECURE_EDIT_DIGEST;
056:
057: public static java.lang.String SECURE_REMOVE_DIGEST = org.sakaiproject.email.api.DigestService.SECURE_REMOVE_DIGEST;
058:
059: public static void commit(
060: org.sakaiproject.email.api.DigestEdit param0) {
061: org.sakaiproject.email.api.DigestService service = getInstance();
062: if (service == null)
063: return;
064:
065: service.commit(param0);
066: }
067:
068: public static org.sakaiproject.email.api.Digest getDigest(
069: java.lang.String param0)
070: throws org.sakaiproject.exception.IdUnusedException {
071: org.sakaiproject.email.api.DigestService service = getInstance();
072: if (service == null)
073: return null;
074:
075: return service.getDigest(param0);
076: }
077:
078: public static java.util.List getDigests() {
079: org.sakaiproject.email.api.DigestService service = getInstance();
080: if (service == null)
081: return null;
082:
083: return service.getDigests();
084: }
085:
086: public static org.sakaiproject.email.api.DigestEdit add(
087: java.lang.String param0)
088: throws org.sakaiproject.exception.IdUsedException {
089: org.sakaiproject.email.api.DigestService service = getInstance();
090: if (service == null)
091: return null;
092:
093: return service.add(param0);
094: }
095:
096: public static void remove(
097: org.sakaiproject.email.api.DigestEdit param0) {
098: org.sakaiproject.email.api.DigestService service = getInstance();
099: if (service == null)
100: return;
101:
102: service.remove(param0);
103: }
104:
105: public static void digest(java.lang.String param0,
106: java.lang.String param1, java.lang.String param2) {
107: org.sakaiproject.email.api.DigestService service = getInstance();
108: if (service == null)
109: return;
110:
111: service.digest(param0, param1, param2);
112: }
113:
114: public static void cancel(
115: org.sakaiproject.email.api.DigestEdit param0) {
116: org.sakaiproject.email.api.DigestService service = getInstance();
117: if (service == null)
118: return;
119:
120: service.cancel(param0);
121: }
122:
123: public static org.sakaiproject.email.api.DigestEdit edit(
124: java.lang.String param0)
125: throws org.sakaiproject.exception.InUseException {
126: org.sakaiproject.email.api.DigestService service = getInstance();
127: if (service == null)
128: return null;
129:
130: return service.edit(param0);
131: }
132: }
|