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

io.deepsense.neptune.clientlibrary.config.user.EnvironmentUserConfiguration Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
/**
 * Copyright (c) 2016, CodiLime Inc.
 */

package io.deepsense.neptune.clientlibrary.config.user;

import com.google.common.base.Preconditions;

import java.util.Map;

public class EnvironmentUserConfiguration extends StaticUserConfiguration {

    public static final String USERNAME_ENVIRONMENT_VARIABLE_NAME = "NEPTUNE_USER";

    public static final String PASSWORD_ENVIRONMENT_VARIABLE_NAME = "NEPTUNE_PASSWORD";

    public EnvironmentUserConfiguration(Map environment) {
        super(Preconditions.checkNotNull(environment).get(USERNAME_ENVIRONMENT_VARIABLE_NAME),
                Preconditions.checkNotNull(environment).get(PASSWORD_ENVIRONMENT_VARIABLE_NAME));
    }

    public EnvironmentUserConfiguration() {
        this(System.getenv());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy