@Singleton public static synchronized void loadDirectories(String firstOption) throws InvalidConfigException {
  if (userIdDirectories == null) {
    userIdDirectories=new TreeMap<String,String>();
    userIdDirectories.put("",(firstOption == null) ? "-" : firstOption);
    Properties properties=directoriesProperties();
    for (    Map.Entry<Object,Object> entry : properties.entrySet()) {
      String key=StringUtils.trim((String)entry.getKey());
      String value=StringUtils.trim((String)entry.getValue());
      if (key != null && value != null) {
        userIdDirectories.put(key,value);
      }
 else {
        String error=DIRECTORIES_PROPFILE_PATH + " has been been configured wrong.";
        LOG.error(error);
        throw new InvalidConfigException(InvalidConfigException.TYPE.INVALID_PROPERTIES_FILE,error);
      }
    }
    if ((userIdDirectories.size() - 1) == 0) {
      String error="No licenses could be loaded from " + DIRECTORIES_PROPFILE_PATH + ". Please check configuration.";
      LOG.error(error);
      throw new InvalidConfigException(InvalidConfigException.TYPE.INVALID_PROPERTIES_FILE,error);
    }
  }
}

@ Singleton public static synchronized void loadDirectories ( String firstOption ) throws InvalidConfigException { if ( userIdDirectories == null ) { userIdDirectories = new TreeMap < String , String > ( ) ; userIdDirectories . put ( "" , ( firstOption == null ) ? "-" : firstOption ) ; Properties properties = directoriesProperties ( ) ; for ( Map . Entry < Object , Object > entry : properties . entrySet ( ) ) { String key = StringUtils . trim ( ( String ) entry . getKey ( ) ) ; String value = StringUtils . trim ( ( String ) entry . getValue ( ) ) ; if ( key != null && value != null ) { userIdDirectories . put ( key , value ) ; } else { String error = DIRECTORIES_PROPFILE_PATH + " has been been configured wrong." ; LOG . error ( error ) ; throw new InvalidConfigException ( InvalidConfigException . TYPE . INVALID_PROPERTIES_FILE , error ) ; } } if ( ( userIdDirectories . size ( ) - 1 ) == 0 ) { String error = "No licenses could be loaded from " + DIRECTORIES_PROPFILE_PATH + ". Please check configuration." ; LOG . error ( error ) ; throw new InvalidConfigException ( InvalidConfigException . TYPE . INVALID_PROPERTIES_FILE , error ) ; } } }
load directories map used to populate select on basic metadata page
