/*
 * Copyright
 *   2008 axYus - www.axyus.com
 *   2008 C.Bosquet - charles.bosquet@axyus.com
 *
 * This file is part of XEMELIOS.
 *
 * XEMELIOS 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 2 of the License, or
 * (at your option) any later version.
 *
 * XEMELIOS 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 XEMELIOS; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package fr.gouv.finances.dgfip.xemelios.web.gwt.client.service;

import com.google.gwt.user.client.rpc.RemoteService;
import fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto.ConfigExportDTO;
import fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto.InitParametersDTO;
import fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto.CritereItemDTO;
import fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto.DocumentsDTO;
import fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto.LabelValueDTO;
import fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto.ListResultatDTO;
import fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto.SearchInitParametersDTO;
import fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto.SearchParameterDTO;
import fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto.SearchResultDTO;
import fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto.SearchSessionDTO;
import fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto.SelectOneCritereItemDTO;
import fr.gouv.finances.dgfip.xemelios.web.gwt.client.dto.StoredSearchDTO;
import java.util.List;
import java.util.Map;

/**
 * @author CBO
 */
public interface XemeliosService extends RemoteService {

    public InitParametersDTO initSearchWindow(String documentId, String etatId, String elementId);

    public void destroySearchSession(String searchSessionId);

    public List<LabelValueDTO> getBudgets(String searchSessionId, String collectiviteId);

    public List<CritereItemDTO> getCritereItems(String searchSessionId, String collectiviteId, String budgetId, String criteriaId, String pluginId);

    public SelectOneCritereItemDTO getUpdatedSelectOneCritereItemDTO(String searchSessionId, String collectiviteId, String budgetId, String critereId, String selectId, Map<String, String>inputValuesById, String pluginId);

    public SearchResultDTO search(String searchSessionId, String collectiviteId, String budgetId, List<SearchParameterDTO> searchParams, String pluginId);

    public SearchResultDTO loadPage(String searchSessionId, int pageNumber);

    public List<StoredSearchDTO> getStoredSearchs(String searchSessionId);

    public List<StoredSearchDTO> getSavedPrivateSearchs(String searchSessionId);

    public SearchInitParametersDTO getSearchInitParameters(String searchSessionId, String storedSearchId);

    public boolean isPjAvailable(String collectivite, String pjNom);

    public String saveRequest(String searchSessionId, List<SearchParameterDTO> searchParams, String requestName);

    public String saveRequest(String searchSessionId, List<SearchParameterDTO> searchParams, String requestName, String requestId);

    public SearchInitParametersDTO getSearchInitParametersForSavedSearch(String searchSessionId, String searchId);

    public String processPluginExport(String searchSessionId, String collectiviteId, String budgetId, String pluginId, List<SearchParameterDTO> searchParams);

    public ListResultatDTO getListResultatDTO(String searchSessionId);

    public String setListResultatDTO(String searchSessionId, ListResultatDTO lr);

    public List<String> getDistinctValues(String searchSessionId, String collectivite, String budget, String path);

    public DocumentsDTO getDocuments();

    public List<ConfigExportDTO> getListeConfigExport(String docId, String etatId);

    public ConfigExportDTO getExportModel(String docId, String etatId, String id);

    public String saveExportModel(ConfigExportDTO config);

    public String deleteExportModel(String docId, String etatId, String id);

    public ConfigExportDTO createExportModel(String docId, String etatId);

    public SearchSessionDTO getSearchSessionInformations(String searchSessionId);

    public String createExportRequest(String searchSessionId, String exportConfigId, String fileName, String exportName);

    public String getDocumentType(String searchSessionId);
}
