
fr.ird.observe.services.service.DataSourceService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-service Show documentation
Show all versions of common-service Show documentation
ObServe Toolkit Common Service module
The newest version!
package fr.ird.observe.services.service;
/*
* #%L
* ObServe Toolkit :: Common Service
* %%
* Copyright (C) 2017 - 2020 IRD, 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 com.google.common.collect.ImmutableSet;
import fr.ird.observe.dto.db.ObserveDbUserDto;
import fr.ird.observe.dto.reference.ReferentialDtoReference;
import fr.ird.observe.dto.referential.ReferentialDto;
import fr.ird.observe.services.configuration.DataSourceCreateConfigurationDto;
import fr.ird.observe.services.configuration.DataSourceCreateWithNoReferentialImportException;
import fr.ird.observe.services.configuration.IncompatibleDataSourceCreateConfigurationException;
import fr.ird.observe.services.configuration.ObserveDataSourceConfiguration;
import fr.ird.observe.services.configuration.ObserveDataSourceConnection;
import fr.ird.observe.services.configuration.ObserveDataSourceInformation;
import io.ultreia.java4all.http.spi.Get;
import java.io.Closeable;
import java.io.File;
import java.util.Set;
/**
* Created on 21/08/15.
*
* @author Tony Chemit - [email protected]
*/
public interface DataSourceService extends ObserveService, Closeable {
@Get(addAuthtoken = false)
ObserveDataSourceInformation checkCanConnect(ObserveDataSourceConfiguration dataSourceConfiguration) throws DatabaseNotFoundException, DatabaseConnexionNotAuthorizedException;
@Get(addAuthtoken = false)
ObserveDataSourceInformation checkCanConnectOrBeEmpty(ObserveDataSourceConfiguration dataSourceConfiguration) throws DatabaseNotFoundException, DatabaseConnexionNotAuthorizedException;
@Get(addAuthtoken = false)
ObserveDataSourceConnection create(ObserveDataSourceConfiguration dataSourceConfiguration, DataSourceCreateConfigurationDto dataSourceCreateConfiguration)
throws IncompatibleDataSourceCreateConfigurationException, DataSourceCreateWithNoReferentialImportException,
BabModelVersionException, DatabaseConnexionNotAuthorizedException, DatabaseNotFoundException;
@Get(addAuthtoken = false)
ObserveDataSourceConnection open(ObserveDataSourceConfiguration dataSourceConfiguration) throws DatabaseNotFoundException, DatabaseConnexionNotAuthorizedException, BabModelVersionException;
@Get(addAuthtoken = false)
Set getUsers(ObserveDataSourceConfiguration dataSourceConfiguration);
@Get(addAuthtoken = false)
void applySecurity(ObserveDataSourceConfiguration dataSourceConfiguration, ImmutableSet users);
@Get(addAuthtoken = false, timeOut = 1000)
void migrateData(ObserveDataSourceConfiguration dataSourceConfiguration);
@Get
ImmutableSet> getReferentialTypesInShell();
@Get
@Override
void close();
@Get
void destroy() throws DatabaseDestroyNotAuthorizedException;
@Get
void backup(File backupFile);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy