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

fr.ird.observe.services.ObserveServiceInitializerConfig Maven / Gradle / Ivy

The newest version!
package fr.ird.observe.services;

/*-
 * #%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.db.DataSourceValidationMode;
import fr.ird.observe.dto.referential.ReferentialLocale;
import io.ultreia.java4all.util.Version;

import java.io.File;
import java.util.Locale;

/**
 * Contains the service configuration.
 * 

* Created on 05/03/2021. * * @author Tony Chemit - [email protected] * @since 5.0.7 */ public class ObserveServiceInitializerConfig { /** * La locale à utiliser pour faire des traductions. */ private final Locale applicationLocale; /** * La locale à utiliser pour la source de données. */ private final ReferentialLocale referentialLocale; /** * Le répertoire où créer les répertoires temporaires. */ private final File temporaryDirectoryRoot; /** * Le temps en millisecondes maximum de tentative de connection http. * * @since 6.0 */ private final int httpTimeout; /** * Persistence model version. */ private final Version persistenceModelVersion; /** * Application build version. */ private final Version applicationBuildVersion; /** * Validation mode. */ private DataSourceValidationMode validationMode; public ObserveServiceInitializerConfig(Locale applicationLocale, ReferentialLocale referentialLocale, File temporaryDirectoryRoot, int httpTimeout, Version persistenceModelVersion, Version applicationBuildVersion) { this.applicationLocale = applicationLocale; this.referentialLocale = referentialLocale; this.temporaryDirectoryRoot = temporaryDirectoryRoot; this.httpTimeout = httpTimeout; this.persistenceModelVersion = persistenceModelVersion; this.applicationBuildVersion = applicationBuildVersion; } public Locale getApplicationLocale() { return applicationLocale; } public ReferentialLocale getReferentialLocale() { return referentialLocale; } public File getTemporaryDirectoryRoot() { return temporaryDirectoryRoot; } public int getHttpTimeout() { return httpTimeout; } public boolean withApplicationLocale() { return getApplicationLocale() != null; } public boolean withReferentialLocale() { return getReferentialLocale() != null; } public Version getPersistenceModelVersion() { return persistenceModelVersion; } public Version getApplicationBuildVersion() { return applicationBuildVersion; } public DataSourceValidationMode getValidationMode() { return validationMode; } public void setValidationMode(DataSourceValidationMode validationMode) { this.validationMode = validationMode; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy