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

150 lines
3.2 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***
enum REPOSITORIES {
REPO ("svn.repository"),
MAIN_ALGO ("svn.algo.main.repo");
private String type;
private REPOSITORIES(String type) {
this.type = type;
***REMOVED***
@Override
public String toString() {
return this.type;
***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 getSVNWCDepsList() {
return this.cache.getConfiguration(this.type).getDepsWindowsCompiled();
***REMOVED***
@Override
public String getSVNRepository()
{
return this.cache.getRepository(REPOSITORIES.REPO);
***REMOVED***
@Override
public String getSVNMainAlgoRepo() {
return this.cache.getRepository(REPOSITORIES.MAIN_ALGO);
***REMOVED***
@Override
public String getGhostAlgoDirectory() {
return this.cache.getConfiguration(this.type).getGhostRepo();
***REMOVED***
***REMOVED***