fr.ird.observe.services.service.DataSourceService Maven / Gradle / Ivy
package fr.ird.observe.services.service;
/*
* #%L
* ObServe Toolkit :: Service
* %%
* Copyright (C) 2017 - 2021 Ultreia.io
* %%
* This program 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.
*
* This program 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 this program. If not, see
* .
* #L%
*/
import fr.ird.observe.dto.BusinessDto;
import fr.ird.observe.dto.db.BabModelVersionException;
import fr.ird.observe.dto.db.DataSourceUserDto;
import fr.ird.observe.dto.db.DatabaseConnexionNotAuthorizedException;
import fr.ird.observe.dto.db.DatabaseNotFoundException;
import fr.ird.observe.dto.db.configuration.DataSourceCreateConfigurationDto;
import fr.ird.observe.dto.db.configuration.DataSourceCreateWithNoReferentialImportException;
import fr.ird.observe.dto.db.configuration.IncompatibleDataSourceCreateConfigurationException;
import fr.ird.observe.dto.db.configuration.ObserveDataSourceConfiguration;
import fr.ird.observe.dto.db.configuration.ObserveDataSourceConnection;
import fr.ird.observe.dto.db.configuration.ObserveDataSourceInformation;
import io.ultreia.java4all.http.spi.Get;
import java.io.File;
import java.util.Date;
import java.util.Set;
/**
* Created on 21/08/15.
*
* @author Tony Chemit - [email protected]
*/
public interface DataSourceService extends ObserveService {
@Get(addAuthtoken = false)
ObserveDataSourceInformation checkCanConnect(ObserveDataSourceConfiguration config) throws DatabaseNotFoundException, DatabaseConnexionNotAuthorizedException, BabModelVersionException;
@Get(addAuthtoken = false)
ObserveDataSourceInformation checkCanConnectOrBeEmpty(ObserveDataSourceConfiguration config) throws DatabaseNotFoundException, DatabaseConnexionNotAuthorizedException, BabModelVersionException;
@Get(addAuthtoken = false)
ObserveDataSourceConnection create(ObserveDataSourceConfiguration config, DataSourceCreateConfigurationDto createConfiguration)
throws IncompatibleDataSourceCreateConfigurationException, DataSourceCreateWithNoReferentialImportException,
BabModelVersionException, DatabaseConnexionNotAuthorizedException, DatabaseNotFoundException;
@Get(addAuthtoken = false)
ObserveDataSourceConnection open(ObserveDataSourceConfiguration config) throws DatabaseNotFoundException, DatabaseConnexionNotAuthorizedException, BabModelVersionException;
@Get(addAuthtoken = false)
Set getUsers(ObserveDataSourceConfiguration config);
@Get(addAuthtoken = false, timeOut = 100)
void applySecurity(ObserveDataSourceConfiguration config, Set users);
@Get(addAuthtoken = false, timeOut = 100)
void migrateData(ObserveDataSourceConfiguration config);
@Get
void close();
@Get
void backup(File backupFile);
@Get
boolean isIdValid(Class type, String id);
@Get
String generateHomeId();
@Get
Date getLastUpdateDate(String type);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy