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

150 lines
3.5 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 ***REMOVED***
enum CONFIGURATIONS ***REMOVED***
STAGE (new Stage ()),
PROD (new Prod ());
private AbstractConfiguration type;
private CONFIGURATIONS(AbstractConfiguration type) ***REMOVED***
this.type = type;
***REMOVED***
***REMOVED***
public String toString() ***REMOVED***
return this.type.getType();
***REMOVED***
public AbstractConfiguration getType ()
***REMOVED***
return this.type;
***REMOVED***
***REMOVED***
enum REPOSITORIES ***REMOVED***
REPO ("svn.repository"),
MAIN_ALGO ("svn.algo.main.repo");
private String type;
private REPOSITORIES(String type) ***REMOVED***
this.type = type;
***REMOVED***
***REMOVED***
public String toString() ***REMOVED***
return this.type;
***REMOVED***
***REMOVED***
private CONFIGURATIONS type;
private ClientConfigurationCache cache;
public ConfigurationImpl(CONFIGURATIONS type,ClientConfigurationCache cache) ***REMOVED***
this.type = type;
this.cache = cache;
***REMOVED***
***REMOVED***
public String getHost() ***REMOVED***
return this.cache.getConfiguration(this.type).getHost ();
***REMOVED***
***REMOVED***
public String getSVNAlgorithmsList() ***REMOVED***
return this.cache.getConfiguration(this.type).getAlgorithmsList();
***REMOVED***
***REMOVED***
public String getRepository() ***REMOVED***
return this.cache.getConfiguration(this.type).getSoftwareRepo();
***REMOVED***
***REMOVED***
public String getSVNLinuxCompiledDepsList()
***REMOVED***
return this.cache.getConfiguration(this.type).getDepsLinuxCompiled();
***REMOVED***
***REMOVED***
public String getSVNPreInstalledDepsList() ***REMOVED***
return this.cache.getConfiguration(this.type).getDepsPreInstalled();
***REMOVED***
***REMOVED***
public String getSVNRBDepsList()
***REMOVED***
return this.cache.getConfiguration(this.type).getDepsRBlackbox();
***REMOVED***
***REMOVED***
public String getSVNCRANDepsList() ***REMOVED***
return this.cache.getConfiguration(this.type).getDepsR();
***REMOVED***
***REMOVED***
public String getSVNJavaDepsList() ***REMOVED***
return this.cache.getConfiguration(this.type).getDepsJava();
***REMOVED***
***REMOVED***
public String getSVNKWDepsList() ***REMOVED***
return this.cache.getConfiguration(this.type).getDepsKnimeWorkflow();
***REMOVED***
***REMOVED***
public String getSVNOctaveDepsList() ***REMOVED***
return this.cache.getConfiguration(this.type).getDepsOctave();
***REMOVED***
***REMOVED***
public String getSVNPythonDepsList() ***REMOVED***
return this.cache.getConfiguration(this.type).getDepsPython();
***REMOVED***
***REMOVED***
public String getSVNWCDepsList() ***REMOVED***
return this.cache.getConfiguration(this.type).getDepsWindowsCompiled();
***REMOVED***
***REMOVED***
public String getSVNRepository()
***REMOVED***
return this.cache.getRepository(REPOSITORIES.REPO);
***REMOVED***
***REMOVED***
public String getSVNMainAlgoRepo() ***REMOVED***
return this.cache.getRepository(REPOSITORIES.MAIN_ALGO);
***REMOVED***
***REMOVED***
public String getGhostAlgoDirectory() ***REMOVED***
return this.cache.getConfiguration(this.type).getGhostRepo();
***REMOVED***
***REMOVED***