public void init(AuthenticatedUser user,LDAPConnection ldapConnection) throws GuacamoleException {
  userDirectory=new SimpleDirectory<User>(userService.getUsers(ldapConnection));
  connectionDirectory=new SimpleDirectory<Connection>(connectionService.getConnections(user,ldapConnection));
  rootGroup=new SimpleConnectionGroup(LDAPAuthenticationProvider.ROOT_CONNECTION_GROUP,LDAPAuthenticationProvider.ROOT_CONNECTION_GROUP,connectionDirectory.getIdentifiers(),Collections.<String>emptyList());
  connectionGroupDirectory=new SimpleConnectionGroupDirectory(Collections.singleton(rootGroup));
  self=new SimpleUser(user.getIdentifier(),userDirectory.getIdentifiers(),connectionDirectory.getIdentifiers(),connectionGroupDirectory.getIdentifiers());
}

public void init ( AuthenticatedUser user , LDAPConnection ldapConnection ) throws GuacamoleException { userDirectory = new SimpleDirectory < User > ( userService . getUsers ( ldapConnection ) ) ; connectionDirectory = new SimpleDirectory < Connection > ( connectionService . getConnections ( user , ldapConnection ) ) ; rootGroup = new SimpleConnectionGroup ( LDAPAuthenticationProvider . ROOT_CONNECTION_GROUP , LDAPAuthenticationProvider . ROOT_CONNECTION_GROUP , connectionDirectory . getIdentifiers ( ) , Collections . < String > emptyList ( ) ) ; connectionGroupDirectory = new SimpleConnectionGroupDirectory ( Collections . singleton ( rootGroup ) ) ; self = new SimpleUser ( user . getIdentifier ( ) , userDirectory . getIdentifiers ( ) , connectionDirectory . getIdentifiers ( ) , connectionGroupDirectory . getIdentifiers ( ) ) ; }
initializes this usercontext using the provided authenticateduser and ldapconnection .
