
io.sealights.agents.plugin.upgrade.UpgradeConfigurationManager Maven / Gradle / Ivy
package io.sealights.agents.plugin.upgrade;
import io.sealights.agents.plugin.upgrade.entities.UpgradeConfiguration;
/**
* Created by shahar on 7/31/2016.
*/
public class UpgradeConfigurationManager {
public static UpgradeConfiguration updateConfigurationFromSysProperties(UpgradeConfiguration configuration){
String value;
if (!isNullOrEmpty(value = System.getProperty("sl.customerId"))){
configuration.setCustomerId(value);
}
if (!isNullOrEmpty(value = System.getProperty("sl.appName"))){
configuration.setAppName(value);
}
if (!isNullOrEmpty(value = System.getProperty("sl.branchName"))){
configuration.setBranchName(value);
}
if (!isNullOrEmpty(value = System.getProperty("sl.environmentName"))){
configuration.setEnvironmentName(value);
}
if (!isNullOrEmpty(value = System.getProperty("sl.server"))){
configuration.setServer(value);
}
if (!isNullOrEmpty(value = System.getProperty("sl.proxy"))){
configuration.setProxy(value);
}
if (!isNullOrEmpty(value = System.getProperty("sl.fileStorage"))){
configuration.setFilesStorage(value);
}
return configuration;
}
private static boolean isNullOrEmpty(String str){
return str == null || "".equals(str);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy