Exemplo n.º 1
0
  public String toString() {
    StringBuffer sb = new StringBuffer();
    sb.append("\n----------- START CACHE BLOCK -----------");
    sb.append("\nEntry DN: ").append(entryDN);
    sb.append(" Valid Entry: ").append(isValidEntry);
    sb.append("\nOrganization: ").append(organizationDN);
    sb.append("\nString Attributes: ");
    if ((stringAttributes != null) && (!stringAttributes.isEmpty())) {
      sb.append(MiscUtils.mapSetToString(stringAttributes));
    }
    sb.append("\nByte Attributes: ");
    sb.append(MiscUtils.mapSetToString(byteAttributes));
    sb.append("\nByte Negative Attributes: ");
    if ((byteAttributes != null) && (!byteAttributes.isEmpty())) {
      sb.append(byteAttributes.getNegativeByteAttrClone().toString());
    }
    sb.append("\nCache Entries: ");

    if (cacheEntries != null && !cacheEntries.isEmpty()) {
      Iterator itr = cacheEntries.keySet().iterator();
      while (itr.hasNext()) {
        String principal = (String) itr.next();
        CacheEntry ce = (CacheEntry) cacheEntries.get(principal);
        sb.append("\nPrincipal: ").append(principal);
        sb.append(ce.toString());
      }
    } else {
      sb.append("<empty>");
    }
    sb.append("\n----------- END CACHE BLOCK -----------");
    return sb.toString();
  }
Exemplo n.º 2
0
 public synchronized void removeAttributes(Set attrNames) {
   if ((attrNames != null) && (!attrNames.isEmpty())) {
     stringAttributes.removeKeys(attrNames);
     byteAttributes.removeKeys(attrNames);
     // Remove them from the list of readble attributes of each principal
     Iterator itr = cacheEntries.keySet().iterator();
     while (itr.hasNext()) {
       String principalDN = (String) itr.next();
       removeAttributes(principalDN, attrNames);
     }
   }
 }