Package com.openshift.client

Examples of com.openshift.client.IEnvironmentVariable


    if (environmentVariableDTOs == null) {
      return new LinkedHashMap<String, IEnvironmentVariable>();
    }

    for (EnvironmentVariableResourceDTO environmentVariableResourceDTO : environmentVariableDTOs) {
      final IEnvironmentVariable environmentVariable =
          new EnvironmentVariableResource(environmentVariableResourceDTO, this);
     
      environmentVariablesMap.put(environmentVariable.getName(),environmentVariable);
     
    }
    return environmentVariablesMap;
  }
View Full Code Here


      throw new OpenShiftException("Environment variable with name \"{0}\" already exists.", name);
    }   
   
    EnvironmentVariableResourceDTO environmentVariableResourceDTO =
        new AddEnvironmentVariableRequest().execute(name, value);   
    IEnvironmentVariable environmentVariable = new EnvironmentVariableResource(environmentVariableResourceDTO, this);
   
    environmentVariablesMap.put(environmentVariable.getName(), environmentVariable);
   
    return environmentVariable;
  }
View Full Code Here

  public Map<String, IEnvironmentVariable> addEnvironmentVariables(Map<String, String> environmentVariables)
      throws OpenShiftException {
   
    Map<String,String>variablesCandidateMap = new HashMap<String,String>();
    for(String varCandidateName:environmentVariables.keySet()){
      IEnvironmentVariable tempVar = environmentVariablesMap.get(varCandidateName);
      if(tempVar != null)
      {  if(tempVar.getValue() == environmentVariables.get(varCandidateName))
          variablesCandidateMap.put(varCandidateName,environmentVariables.get(varCandidateName));
      }
      else
          variablesCandidateMap.put(varCandidateName, environmentVariables.get(varCandidateName));
    }
    List<EnvironmentVariableResourceDTO> environmentVariableResourceDTOs = new AddEnvironmentVariablesRequest()
        .execute(variablesCandidateMap);
   
    for (EnvironmentVariableResourceDTO dto : environmentVariableResourceDTOs) {
      IEnvironmentVariable environmentVariable = new EnvironmentVariableResource(dto, this);
      environmentVariablesMap.put(environmentVariable.getName(), environmentVariable);
    }
   
    return environmentVariablesMap;
  }
View Full Code Here

    if (environmentVariableDTOs == null) {
      return new LinkedHashMap<String, IEnvironmentVariable>();
    }

    for (EnvironmentVariableResourceDTO environmentVariableResourceDTO : environmentVariableDTOs) {
      final IEnvironmentVariable environmentVariable =
          new EnvironmentVariableResource(environmentVariableResourceDTO, this);

      environmentVariablesMap.put(environmentVariable.getName(),environmentVariable);

    }
    return environmentVariablesMap;
  }
View Full Code Here

      throw new OpenShiftException("Environment variable with name \"{0}\" already exists.", name);
    }

    EnvironmentVariableResourceDTO environmentVariableResourceDTO =
        new AddEnvironmentVariableRequest().execute(name, value);
    IEnvironmentVariable environmentVariable = new EnvironmentVariableResource(environmentVariableResourceDTO, this);

    environmentVariablesMap.put(environmentVariable.getName(), environmentVariable);

    return environmentVariable;
  }
View Full Code Here

    }
    if (!hasEnvironmentVariable(name)) {
      throw new OpenShiftException("Environment variable with name \"{0}\" does not exist.", name);
    }

    IEnvironmentVariable environmentVariable = getEnvironmentVariable(name);
    environmentVariable.update(value);

    environmentVariablesMap.put(environmentVariable.getName(), environmentVariable);

    return environmentVariable;
  }
View Full Code Here

  public Map<String, IEnvironmentVariable> addEnvironmentVariables(Map<String, String> environmentVariables)
      throws OpenShiftException {

    Map<String,String>variablesCandidateMap = new HashMap<String,String>();
    for(String varCandidateName:environmentVariables.keySet()){
      IEnvironmentVariable tempVar = environmentVariablesMap.get(varCandidateName);
      if(tempVar != null)
      {  if(tempVar.getValue() == environmentVariables.get(varCandidateName))
        variablesCandidateMap.put(varCandidateName,environmentVariables.get(varCandidateName));
      }
      else
        variablesCandidateMap.put(varCandidateName, environmentVariables.get(varCandidateName));
    }
    List<EnvironmentVariableResourceDTO> environmentVariableResourceDTOs = new AddEnvironmentVariablesRequest()
        .execute(variablesCandidateMap);

    for (EnvironmentVariableResourceDTO dto : environmentVariableResourceDTOs) {
      IEnvironmentVariable environmentVariable = new EnvironmentVariableResource(dto, this);
      environmentVariablesMap.put(environmentVariable.getName(), environmentVariable);
    }

    return environmentVariablesMap;
  }
View Full Code Here

    if (environmentVariableDTOs == null) {
      return new LinkedHashMap<String, IEnvironmentVariable>();
    }

    for (EnvironmentVariableResourceDTO environmentVariableResourceDTO : environmentVariableDTOs) {
      final IEnvironmentVariable environmentVariable =
          new EnvironmentVariableResource(environmentVariableResourceDTO, this);

      environmentVariablesMap.put(environmentVariable.getName(),environmentVariable);

    }
    return environmentVariablesMap;
  }
View Full Code Here

      throw new OpenShiftException("Environment variable with name \"{0}\" already exists.", name);
    }

    EnvironmentVariableResourceDTO environmentVariableResourceDTO =
        new AddEnvironmentVariableRequest().execute(name, value);
    IEnvironmentVariable environmentVariable = new EnvironmentVariableResource(environmentVariableResourceDTO, this);

    environmentVariablesMap.put(environmentVariable.getName(), environmentVariable);

    return environmentVariable;
  }
View Full Code Here

    }
    if (!hasEnvironmentVariable(name)) {
      throw new OpenShiftException("Environment variable with name \"{0}\" does not exist.", name);
    }

    IEnvironmentVariable environmentVariable = getEnvironmentVariable(name);
    environmentVariable.update(value);

    environmentVariablesMap.put(environmentVariable.getName(), environmentVariable);

    return environmentVariable;
  }
View Full Code Here

TOP

Related Classes of com.openshift.client.IEnvironmentVariable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.