public Map parsedUserSpecifiedOps(Set userSpecifiedOpsSet){
  if (debug.messageEnabled()) {
    debug.message("RepoConfigHelper.parsedUserSpecifiedOps entry:" + " userSpecifiedOpsSet:" + userSpecifiedOpsSet);
  }
  IdType idTypeRead=null;
  Set opsREAD=null;
  Map supportedOps=new HashMap();
  Iterator it=userSpecifiedOpsSet.iterator();
  while (it.hasNext()) {
    idTypeRead=null;
    Set opsRead=null;
    String curr=(String)it.next();
    StringTokenizer st=new StringTokenizer(curr,"= ,");
    if (st.hasMoreTokens()) {
      String idtypeToken=st.nextToken();
      if (debug.messageEnabled()) {
        debug.message("    idtypeToken:" + idtypeToken);
      }
      if (idtypeToken.equalsIgnoreCase("user")) {
        idTypeRead=IdType.USER;
        opsRead=parseInputedOps(st,true);
      }
 else       if (idtypeToken.equalsIgnoreCase("group")) {
        idTypeRead=IdType.GROUP;
        opsRead=parseInputedOps(st,false);
      }
 else       if (idtypeToken.equalsIgnoreCase("agent")) {
        idTypeRead=IdType.AGENT;
        opsRead=parseInputedOps(st,false);
      }
 else       if (idtypeToken.equalsIgnoreCase("role")) {
        idTypeRead=IdType.ROLE;
        opsRead=parseInputedOps(st,false);
      }
 else       if (idtypeToken.equalsIgnoreCase("filteredrole")) {
        idTypeRead=IdType.FILTEREDROLE;
        opsRead=parseInputedOps(st,false);
      }
 else       if (idtypeToken.equalsIgnoreCase("realm")) {
        idTypeRead=IdType.REALM;
        opsRead=parseInputedOps(st,true);
      }
 else {
        idTypeRead=null;
      }
    }
    if ((idTypeRead != null) && (opsRead != null) && (!opsRead.isEmpty())) {
      supportedOps.put(idTypeRead,opsRead);
      if (debug.messageEnabled()) {
        debug.message("RepoConfigHelper.parsedUserSpecifiedOps" + " called supportedOps:" + supportedOps + "; idTypeRead:"+ idTypeRead+ "; opsRead:"+ opsRead);
      }
    }
  }
  return supportedOps;
}

public Map parsedUserSpecifiedOps ( Set userSpecifiedOpsSet ) { if ( debug . messageEnabled ( ) ) { debug . message ( "RepoConfigHelper.parsedUserSpecifiedOps entry:" + " userSpecifiedOpsSet:" + userSpecifiedOpsSet ) ; } IdType idTypeRead = null ; Set opsREAD = null ; Map supportedOps = new HashMap ( ) ; Iterator it = userSpecifiedOpsSet . iterator ( ) ; while ( it . hasNext ( ) ) { idTypeRead = null ; Set opsRead = null ; String curr = ( String ) it . next ( ) ; StringTokenizer st = new StringTokenizer ( curr , "= ," ) ; if ( st . hasMoreTokens ( ) ) { String idtypeToken = st . nextToken ( ) ; if ( debug . messageEnabled ( ) ) { debug . message ( "    idtypeToken:" + idtypeToken ) ; } if ( idtypeToken . equalsIgnoreCase ( "user" ) ) { idTypeRead = IdType . USER ; opsRead = parseInputedOps ( st , true ) ; } else if ( idtypeToken . equalsIgnoreCase ( "group" ) ) { idTypeRead = IdType . GROUP ; opsRead = parseInputedOps ( st , false ) ; } else if ( idtypeToken . equalsIgnoreCase ( "agent" ) ) { idTypeRead = IdType . AGENT ; opsRead = parseInputedOps ( st , false ) ; } else if ( idtypeToken . equalsIgnoreCase ( "role" ) ) { idTypeRead = IdType . ROLE ; opsRead = parseInputedOps ( st , false ) ; } else if ( idtypeToken . equalsIgnoreCase ( "filteredrole" ) ) { idTypeRead = IdType . FILTEREDROLE ; opsRead = parseInputedOps ( st , false ) ; } else if ( idtypeToken . equalsIgnoreCase ( "realm" ) ) { idTypeRead = IdType . REALM ; opsRead = parseInputedOps ( st , true ) ; } else { idTypeRead = null ; } } if ( ( idTypeRead != null ) && ( opsRead != null ) && ( ! opsRead . isEmpty ( ) ) ) { supportedOps . put ( idTypeRead , opsRead ) ; if ( debug . messageEnabled ( ) ) { debug . message ( "RepoConfigHelper.parsedUserSpecifiedOps" + " called supportedOps:" + supportedOps + "; idTypeRead:" + idTypeRead + "; opsRead:" + opsRead ) ; } } } return supportedOps ; }
* parseduserspecifiedops and parseinputedops methods are copied from ldapv3repo . java and changed a bit to be reuseable . changed are : parseduserspecifiedops - - changed method to public to make accessible - - changed to return a map supportedops instead of operate on a local field - - changed debug print out - - commented out dead code line map oldsupportedops = new hashmap ( supportedops ) ; - - commented out some code at the end which was always adding realm support , since i dont think it is needed parseinputedops - - changed method to public to make accessible - - changed debug print out
