/**********************************************************************************
 * $URL: https://source.sakaiproject.org/svn/archive/tags/sakai_2-3-1/archive-api/api/src/java/org/sakaiproject/archive/api/ArchiveService.java $
 * $Id: ArchiveService.java 7947 2006-04-19 03:14:11Z ggolden@umich.edu $
 ***********************************************************************************
 *
 * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
 * 
 * Licensed under the Educational Community License, Version 1.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at
 * 
 *      http://www.opensource.org/licenses/ecl1.php
 * 
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 *
 **********************************************************************************/

package org.sakaiproject.archive.api;

/**
 * <p>
 * ArchiveService takes care of exporting and importing entities.
 * </p>
 */
public interface ArchiveService
{
	/** This string can be used to find the service in the service manager. */
	static final String SERVICE_NAME = ArchiveService.class.getName();

	/** A tag for the input system. */
	static final String FROM_CT = "CT";

	static final String FROM_WT = "WT";

	static final String FROM_SAKAI = "Sakai 1.0";

	// the list of boolean tells if the imported item needs to be set as draft
	static final boolean SAKAI_msg_draft_import = true;

	static final boolean SAKAI_assign_draft_import = true;

	static final boolean SAKAI_rsc_draft_import = false;

	static final boolean SAKAI_schedule_draft_import = true;

	/**
	 * Create an archive for the resources of a site.
	 * 
	 * @param siteId
	 *        The id of the site to archive.
	 * @return A log of messages from the archive.
	 */
	String archive(String siteId);

	/**
	 * Read in an archived set of resources, and merge the entries into the specified site, and set site creator name
	 * 
	 * @param archiveUrl
	 *        The archive xml file Url.
	 * @param siteId
	 *        The id of the site to merge the content into.
	 * @param siteCreatorId
	 *        the site creator Id
	 * @return A log of messages from the merge.
	 */
	String merge(String archiveUrl, String siteId, String siteCreatorId);
}
