01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/archive/tags/sakai_2-4-1/archive-api/api/src/java/org/sakaiproject/archive/cover/ArchiveService.java $
03: * $Id: ArchiveService.java 7947 2006-04-19 03:14:11Z ggolden@umich.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2003, 2004, 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.sakaiproject.archive.cover;
21:
22: import org.sakaiproject.component.cover.ComponentManager;
23:
24: /**
25: * <p>
26: * ArchiveService is a static Cover for the {@link org.sakaiproject.archive.api.ArchiveService ArchiveService}; see that interface for usage details.
27: * </p>
28: */
29: public class ArchiveService {
30: /**
31: * Access the component instance: special cover only method.
32: *
33: * @return the component instance.
34: */
35: public static org.sakaiproject.archive.api.ArchiveService getInstance() {
36: if (ComponentManager.CACHE_COMPONENTS) {
37: if (m_instance == null)
38: m_instance = (org.sakaiproject.archive.api.ArchiveService) ComponentManager
39: .get(org.sakaiproject.archive.api.ArchiveService.class);
40: return m_instance;
41: } else {
42: return (org.sakaiproject.archive.api.ArchiveService) ComponentManager
43: .get(org.sakaiproject.archive.api.ArchiveService.class);
44: }
45: }
46:
47: private static org.sakaiproject.archive.api.ArchiveService m_instance = null;
48:
49: public static java.lang.String SERVICE_NAME = org.sakaiproject.archive.api.ArchiveService.SERVICE_NAME;
50:
51: public static java.lang.String archive(java.lang.String param0) {
52: org.sakaiproject.archive.api.ArchiveService service = getInstance();
53: if (service == null)
54: return null;
55:
56: return service.archive(param0);
57: }
58:
59: public static java.lang.String merge(java.lang.String param0,
60: java.lang.String param1, java.lang.String param2) {
61: org.sakaiproject.archive.api.ArchiveService service = getInstance();
62: if (service == null)
63: return null;
64:
65: return service.merge(param0, param1, param2);
66: }
67: }
|