dataminer-pool-manager/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/clients/configuration/ConfigurationImpl.java

153 lines
3.4 KiB
Java
Executable File

package org.gcube.dataanalysis.dataminer.poolmanager.clients.configuration;
import org.gcube.dataanalysis.dataminer.poolmanager.clients.configurations.AbstractConfiguration;
import org.gcube.dataanalysis.dataminer.poolmanager.clients.configurations.Prod;
import org.gcube.dataanalysis.dataminer.poolmanager.clients.configurations.Stage;
public class ConfigurationImpl implements Configuration {
enum CONFIGURATIONS {
STAGE (new Stage ()),
PROD (new Prod ());
private AbstractConfiguration type;
private CONFIGURATIONS(AbstractConfiguration type) {
this.type = type;
***REMOVED***
@Override
public String toString() {
return this.type.getType();
***REMOVED***
public AbstractConfiguration getType ()
{
return this.type;
***REMOVED***
***REMOVED***
***REMOVED*** enum REPOSITORIES {
***REMOVED*** REPO ("svn.repository"),
***REMOVED*** MAIN_ALGO ("svn.algo.main.repo");
***REMOVED***
***REMOVED*** private String type;
***REMOVED***
***REMOVED*** private REPOSITORIES(String type) {
***REMOVED*** this.type = type;
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** @Override
***REMOVED*** public String toString() {
***REMOVED*** return this.type;
***REMOVED*** ***REMOVED***
***REMOVED******REMOVED***
private CONFIGURATIONS type;
private ClientConfigurationCache cache;
public ConfigurationImpl(CONFIGURATIONS type,ClientConfigurationCache cache) {
this.type = type;
this.cache = cache;
***REMOVED***
@Override
public String getHost() {
return this.cache.getConfiguration(this.type).getHost ();
***REMOVED***
@Override
public String getSVNAlgorithmsList() {
return this.cache.getConfiguration(this.type).getAlgorithmsList();
***REMOVED***
@Override
public String getRepository() {
return this.cache.getConfiguration(this.type).getSoftwareRepo();
***REMOVED***
@Override
public String getSVNLinuxCompiledDepsList()
{
return this.cache.getConfiguration(this.type).getDepsLinuxCompiled();
***REMOVED***
@Override
public String getSVNPreInstalledDepsList() {
return this.cache.getConfiguration(this.type).getDepsPreInstalled();
***REMOVED***
@Override
public String getSVNRBDepsList()
{
return this.cache.getConfiguration(this.type).getDepsRBlackbox();
***REMOVED***
@Override
public String getSVNCRANDepsList() {
return this.cache.getConfiguration(this.type).getDepsR();
***REMOVED***
@Override
public String getSVNJavaDepsList() {
return this.cache.getConfiguration(this.type).getDepsJava();
***REMOVED***
@Override
public String getSVNKWDepsList() {
return this.cache.getConfiguration(this.type).getDepsKnimeWorkflow();
***REMOVED***
@Override
public String getSVNOctaveDepsList() {
return this.cache.getConfiguration(this.type).getDepsOctave();
***REMOVED***
@Override
public String getSVNPythonDepsList() {
return this.cache.getConfiguration(this.type).getDepsPython();
***REMOVED***
@Override
public String getSVNPython3_6DepsList() {
return this.cache.getConfiguration(this.type).getDepsPython3_6();
***REMOVED***
@Override
public String getSVNWCDepsList() {
return this.cache.getConfiguration(this.type).getDepsWindowsCompiled();
***REMOVED***
@Override
public SVNRepository getSVNRepository()
{
return this.cache.getSVNRepository();
***REMOVED***
@Override
public String getGhostAlgoDirectory() {
return this.cache.getConfiguration(this.type).getGhostRepo();
***REMOVED***
***REMOVED***