01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/archive/tags/sakai_2-4-1/archive-api/api/src/java/org/sakaiproject/archive/api/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.api;
21:
22: /**
23: * <p>
24: * ArchiveService takes care of exporting and importing entities.
25: * </p>
26: */
27: public interface ArchiveService {
28: /** This string can be used to find the service in the service manager. */
29: static final String SERVICE_NAME = ArchiveService.class.getName();
30:
31: /** A tag for the input system. */
32: static final String FROM_CT = "CT";
33:
34: static final String FROM_WT = "WT";
35:
36: static final String FROM_SAKAI = "Sakai 1.0";
37:
38: // the list of boolean tells if the imported item needs to be set as draft
39: static final boolean SAKAI_msg_draft_import = true;
40:
41: static final boolean SAKAI_assign_draft_import = true;
42:
43: static final boolean SAKAI_rsc_draft_import = false;
44:
45: static final boolean SAKAI_schedule_draft_import = true;
46:
47: /**
48: * Create an archive for the resources of a site.
49: *
50: * @param siteId
51: * The id of the site to archive.
52: * @return A log of messages from the archive.
53: */
54: String archive(String siteId);
55:
56: /**
57: * Read in an archived set of resources, and merge the entries into the specified site, and set site creator name
58: *
59: * @param archiveUrl
60: * The archive xml file Url.
61: * @param siteId
62: * The id of the site to merge the content into.
63: * @param siteCreatorId
64: * the site creator Id
65: * @return A log of messages from the merge.
66: */
67: String merge(String archiveUrl, String siteId, String siteCreatorId);
68: }
|