All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.isotrol.impe3.pms.gui.api.service.ISourceMappingsServiceAsync Maven / Gradle / Ivy

The newest version!
/**
 * This file is part of Port@l
 * Port@l 3.0 - Portal Engine and Management System
 * Copyright (C) 2010  Isotrol, SA.  http://www.isotrol.com
 *
 * Port@l is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Port@l is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Port@l.  If not, see .
 */

package com.isotrol.impe3.pms.gui.api.service;


import java.util.List;
import java.util.Set;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.RemoteService;
import com.isotrol.impe3.pms.api.smap.SourceMappingDTO;
import com.isotrol.impe3.pms.api.smap.SourceMappingSelDTO;
import com.isotrol.impe3.pms.api.smap.SourceMappingTemplateDTO;


/**
 * Users asynchronous service
 * @author Manuel Ruiz
 * 
 */
public interface ISourceMappingsServiceAsync extends RemoteService {
	/**
	 * Returns all registered source mappings.
	 * @param callback All registered source mappings.
	 */
	void getSourceMappings(AsyncCallback> callback);

	/**
	 * Returns a template for a new source mapping.
	 * @param callback A template for a new source mapping.
	 */
	void newTemplate(AsyncCallback callback);

	/**
	 * Gets the detail of a source mapping.
	 * @param id ID of the source mapping.
	 * @param callback The requested detail.
	 */
	void get(String id, AsyncCallback callback);

	/**
	 * Saves a source mapping. If the ID is null the operation is considered an insertion. Otherwise, it is considered
	 * an update.
	 * @param dto Object to save.
	 * @param callback The saved object.
	 */
	void save(SourceMappingDTO dto, AsyncCallback callback);

	/**
	 * Deletes a source mapping.
	 * @param callback id Id of the source mapping.
	 */
	void delete(String id, AsyncCallback callback);
	
	/**
	 * Export all mappings.
	 * @param callback URL to download the exported file.
	 */
	void exportAll(AsyncCallback callabck);
	
	/**
	 * Export some mappings.
	 * @param ids Set containing the ids of the mappings to export.
	 * @param callback URL to download the exported file.
	 */
	void exportSome(Set ids, AsyncCallback callback);
	
	/**
	 * Import mapping definitions.
	 * @param fileId Uploaded file id.
	 * @param overwrite Whether to overwrite existing mappings.
	 * @param callback
	 */
	void importMappings(String fileId, boolean overwrite, AsyncCallback callback);
	
	void exportSets(String id, AsyncCallback callback);
	void exportCategories(String id, AsyncCallback callback);
	void exportContentTypes(String id, AsyncCallback callback);

	void importSets(String mappingId, String fileId, AsyncCallback callback);
	void importCategories(String mappingId, String fileId, AsyncCallback callback);
	void importContentTypes(String mappingId, String fileId, AsyncCallback callback);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy