private void addIdRepo(String orgName,String name) throws IdRepoException, SSOException {
  if (debug.messageEnabled()) {
    debug.message("IdRepoPluginsCache.addIdRepo called for orgName: " + orgName + " IdRepo Name: "+ name);
  }
  Map configMap=null;
  try {
    ServiceConfig sc=idRepoServiceConfigManager.getOrganizationConfig(orgName,null);
    if (sc == null) {
      debug.error("IdRepoPluginsCache.addIdRepo orgName: " + orgName + " does not exisit");
      Object[] args={orgName};
      throw new IdRepoException(IdRepoBundle.BUNDLE_NAME,IdRepoErrorCode.REALM_DOESNT_EXIST,args);
    }
    sc=sc.getSubConfig(name);
    if (sc == null) {
      debug.error("IdRepoPluginsCache.addIdRepo orgName: " + orgName + " subConfig does not exisit: "+ name);
      Object[] args={orgName + ":" + name};
      throw new IdRepoException(IdRepoBundle.BUNDLE_NAME,IdRepoErrorCode.REALM_DOESNT_EXIST,args);
    }
    configMap=sc.getAttributes();
  }
 catch (  SMSException smse) {
    if (debug.warningEnabled()) {
      debug.warning("IdRepoPluginsCache.addIdRepo SMSException " + "for orgName: " + orgName + " sc name: "+ name,smse);
    }
    return;
  }
  IdRepo repo=constructIdRepoPlugin(orgName,configMap,name);
  orgName=DNUtils.normalizeDN(orgName);
synchronized (idrepoPlugins) {
    clearReadOnlyPlugins(orgName);
    Map repos=(Map)idrepoPlugins.get(orgName);
    boolean addInternalRepos=false;
    if (repos == null) {
      repos=new LinkedHashMap();
      idrepoPlugins.put(orgName,repos);
      addInternalRepos=true;
    }
    repos.put(name,repo);
    if (addInternalRepos) {
      addInternalRepo(repos,orgName);
    }
  }
}

private void addIdRepo ( String orgName , String name ) throws IdRepoException , SSOException { if ( debug . messageEnabled ( ) ) { debug . message ( "IdRepoPluginsCache.addIdRepo called for orgName: " + orgName + " IdRepo Name: " + name ) ; } Map configMap = null ; try { ServiceConfig sc = idRepoServiceConfigManager . getOrganizationConfig ( orgName , null ) ; if ( sc == null ) { debug . error ( "IdRepoPluginsCache.addIdRepo orgName: " + orgName + " does not exisit" ) ; Object [ ] args = { orgName } ; throw new IdRepoException ( IdRepoBundle . BUNDLE_NAME , IdRepoErrorCode . REALM_DOESNT_EXIST , args ) ; } sc = sc . getSubConfig ( name ) ; if ( sc == null ) { debug . error ( "IdRepoPluginsCache.addIdRepo orgName: " + orgName + " subConfig does not exisit: " + name ) ; Object [ ] args = { orgName + ":" + name } ; throw new IdRepoException ( IdRepoBundle . BUNDLE_NAME , IdRepoErrorCode . REALM_DOESNT_EXIST , args ) ; } configMap = sc . getAttributes ( ) ; } catch ( SMSException smse ) { if ( debug . warningEnabled ( ) ) { debug . warning ( "IdRepoPluginsCache.addIdRepo SMSException " + "for orgName: " + orgName + " sc name: " + name , smse ) ; } return ; } IdRepo repo = constructIdRepoPlugin ( orgName , configMap , name ) ; orgName = DNUtils . normalizeDN ( orgName ) ; synchronized ( idrepoPlugins ) { clearReadOnlyPlugins ( orgName ) ; Map repos = ( Map ) idrepoPlugins . get ( orgName ) ; boolean addInternalRepos = false ; if ( repos == null ) { repos = new LinkedHashMap ( ) ; idrepoPlugins . put ( orgName , repos ) ; addInternalRepos = true ; } repos . put ( name , repo ) ; if ( addInternalRepos ) { addInternalRepo ( repos , orgName ) ; } } }
adds an idrepo plugin to an organization given the configuration
