@SuppressWarnings({"unchecked"})
    public void setEnvironment(Map env) {
        this.environment = env;
    }
Sets the base JNDI environment template to use when acquiring LDAP connections.  It is typically more common
to use the other get/set methods in this class to set individual environment settings rather than use
this method, but it is available for advanced users that want full control over the base JNDI environment
settings.
<p/>
Note that this template only represents the base/default environment settings.  It is then merged with
appropriate runtime values as necessary in the {@link #getLdapContext(Object, Object)} implementation.
The merged environment instance is what is used to acquire the connection ({@link LdapContext}) at runtime.

@param env the base JNDI environment template to use when acquiring LDAP connections.
core/src/main/java/org/apache/shiro/realm/ldap/JndiLdapContextFactory.java