ArchiveService.java :  » ERP-CRM-Financial » sakai-2.6.2 » org » sakaiproject » archive » api » Java Open Source

Java Open Source » ERP CRM Financial » sakai 2.6.2 
sakai 2.6.2 » org » sakaiproject » archive » api » ArchiveService.java
/**********************************************************************************
 * $URL: https://source.sakaiproject.org/svn/archive/tags/sakai-2.6.2/archive-api/api/src/java/org/sakaiproject/archive/api/ArchiveService.java $
 * $Id: ArchiveService.java 60507 2009-04-21 21:17:44Z arwhyte@umich.edu $
 ***********************************************************************************
 *
 * Copyright (c) 2003, 2004, 2005, 2006, 2008 The Sakai Foundation
 *
 * Licensed under the Educational Community License, Version 2.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.osedu.org/licenses/ECL-2.0
 *
 * 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);
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.