/*
(non-Javadoc)
@see org.springframework.ldap.core.support.DirContextAuthenticationStrategy#setupEnvironment(java.util.Hashtable,
java.lang.String, java.lang.String)
339871
public void setupEnvironment(Hashtable<String, Object> env, String userDn, String password) {
		env.put(Context.SECURITY_AUTHENTICATION, SIMPLE_AUTHENTICATION);
		env.put(Context.SECURITY_PRINCIPAL, userDn);
		env.put(Context.SECURITY_CREDENTIALS, password);
	}
396260
public static void setEnvironment(String otEnv, String otEnvType, String otEnvLocation, String otEnvFlavor) {
        OT_ENV = otEnv;
        OT_ENV_TYPE = otEnvType;
        OT_ENV_LOCATION = otEnvLocation;
        OT_ENV_FLAVOR = otEnvFlavor;
    }
612384
@Override
    public void buildEnvironment(Run<?,?> build, EnvVars env) {
        env.put(name,value);
        env.put(name.toUpperCase(Locale.ENGLISH),value); // backward compatibility pre 1.345
    }
1192542
private void setEnvironmentVariable(String line) {
        Matcher matcher = ENV_VAR_PATTERN.matcher(line);
        if (matcher.matches()) {
            String key = matcher.group("key");
            String value = matcher.group("value");
            log.debug("Env: %s=%s",key,value);
            env.put(key, value);
        }
    }
279070
public Launcher addEnvironmentVariable(final String key, final String value) {
        env.put(key, value);
        return this;
    }
975551
public LaunchConfig withEnvironmentVariables(java.util.Map<String, String> environmentVariables) {
        setEnvironmentVariables(environmentVariables);
        return this;
    }
625023
@Override
    public void buildEnvironment(Run<?,?> build, EnvVars env) {
        env.put(name,originalFileName);
    }
570146
@SuppressWarnings({ "rawtypes", "unchecked" })
   protected DirContext setupKerberosContext(Hashtable<String,Object> env) 
   throws NamingException
   {

      LoginContext lc = null;
      try
      {

    	 lc = new LoginContext(getClass().getName(), new JXCallbackHandler());
         lc.login();

      }
      catch (LoginException ex)
      {
         throw new NamingException("login problem: " + ex);
      }

      DirContext ctx = (DirContext) Subject.doAs(lc.getSubject(), new JndiAction(env));

      if (ctx == null)
         throw new NamingException("another problem with GSSAPI");
      else
         return ctx;
    
   }
1272836
func (s *FunctionConfiguration) SetEnvironment(v *EnvironmentResponse) *FunctionConfiguration {
	s.Environment = v
	return s
}
1064993
@SuppressWarnings("unchecked")
    private Hashtable<String, Object> getEnvironment(int type, String startingURL) {
        Hashtable<String, Object> env = new Hashtable<String, Object>(iEnvironment);
        List<String> urlList = (List<String>) env.remove(ENVKEY_URL_LIST);
        int numURLs = urlList.size();

        // get active URL index
        int startingURLIndex = getURLIndex(startingURL, urlList);

        // generate the sequence
        String ldapUrl = null;
        for (int i = startingURLIndex; i < startingURLIndex + numURLs; i++) {
            if (i > startingURLIndex)
                ldapUrl = ldapUrl + " " + urlList.get(i % numURLs);
            else
                ldapUrl = urlList.get(i % numURLs);

            if (type == URLTYPE_SINGLE)
                break;
        }

        env.put(Context.PROVIDER_URL, ldapUrl);
        env.remove(ENVKEY_ACTIVE_URL);

        return env;
    }
656078
@Override
	public void setEnvironment(ConfigurableEnvironment environment) {
		super.setEnvironment(environment);
		this.reader.setEnvironment(environment);
		this.scanner.setEnvironment(environment);
	}
1136855
func (s *Project) SetEnvironment(v *ProjectEnvironment) *Project {
	s.Environment = v
	return s
}
601140
func (s *ContainerDefinition) SetEnvironment(v map[string]*string) *ContainerDefinition {
	s.Environment = v
	return s
}
379425
public void setEnvironmentVariables(Map<String, String> environment) {
    for (Map.Entry<String, String> entry : environment.entrySet()) {
      setEnvironmentVariable(entry.getKey(), entry.getValue());
    }
  }
750823
func (s *ContainerDetail) SetEnvironment(v []*KeyValuePair) *ContainerDetail {
	s.Environment = v
	return s
}
152952
public DirContext createDirContext() throws NamingException {
        LOGGER.debug("Creating directory service context (DirContext)");
        final Hashtable<String, String> env = new Hashtable<>();
        env.put(Context.SECURITY_PRINCIPAL, BIND_USERNAME);
        env.put(Context.SECURITY_CREDENTIALS, BIND_PASSWORD);
        env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
        env.put(Context.PROVIDER_URL, LDAP_URL);
        if (IS_LDAP_SSLTLS) {
            env.put("java.naming.ldap.factory.socket", "alpine.crypto.RelaxedSSLSocketFactory");
        }
        return new InitialDirContext(env);
    }
1111886
@Override
    public void setEnvironment(Environment env) {
    	if (env instanceof AbstractEnvironment) {
    		this.env = (AbstractEnvironment)env;
    	} else {
    		throw new RuntimeException("env is not an AbstractEnvironment. " + env.getClass().getCanonicalName());
    	}
    	
    }