hardtokenissuers = new TreeMap(); HashSet authorizedcaids = new HashSet(this.authorizationsession.getAuthorizedCAIds(admin)); TreeMap allhardtokenissuers = this.hardtokensession.getHardTokenIssuers(admin); Iterator iter = allhardtokenissuers.keySet().iterator(); while(iter.hasNext()){ String alias = (String) iter.next(); if(authorizedcaids.contains(new Integer(((HardTokenIssuerData) allhardtokenissuers.get(alias)).getIssuerDN().hashCode()))){ hardtokenissuers.put(alias,allhardtokenissuers.get(alias)); } }
hardtokenissuers = new TreeMap(); Iterator iter = authorizationsession.getAuthorizedAdminGroupNames(admin).iterator(); HashSet authadmingroupids = new HashSet(); while(iter.hasNext()){ AdminGroup next = (AdminGroup) iter.next(); authadmingroupids.add(new Integer(next.getAdminGroupId())); } TreeMap allhardtokenissuers = this.hardtokensession.getHardTokenIssuers(admin); iter = allhardtokenissuers.keySet().iterator(); while(iter.hasNext()){ String alias = (String) iter.next(); if(authadmingroupids.contains(new Integer(((HardTokenIssuerData) allhardtokenissuers.get(alias)).getAdminGroupId()))){ hardtokenissuers.put(alias,allhardtokenissuers.get(alias)); } }
    public TreeMap getHardTokenIssuers(){        if(hardtokenissuers==null){            		hardtokenissuers = new TreeMap();                        HashSet authorizedcaids = new HashSet(this.authorizationsession.getAuthorizedCAIds(admin));        TreeMap allhardtokenissuers = this.hardtokensession.getHardTokenIssuers(admin);        Iterator iter = allhardtokenissuers.keySet().iterator();        while(iter.hasNext()){                    String alias = (String) iter.next();          if(authorizedcaids.contains(new Integer(((HardTokenIssuerData) allhardtokenissuers.get(alias)).getIssuerDN().hashCode()))){                    		     hardtokenissuers.put(alias,allhardtokenissuers.get(alias));          }           }              }            return hardtokenissuers;      }