public static Subject getSubject(String id, String type)
public static Subject getSubject(String id)
  public static Subject getSubject(String id, String type)     throws SubjectNotFoundException   {    SubjectFactory.init();    boolean cached  = false;    Subject subj    = null;    try {      subj = cache.get(id, type);      cached = true;      log.debug("Found cached subject " + id + "/" + type);    } catch (SubjectNotFoundException e0) {      if (types.containsKey(type)) {        Iterator iter = mgr.getSources(SubjectTypeEnum.valueOf(type)).iterator();        while (iter.hasNext()) {          Source sa = (Source) iter.next();          // FIXME Actually, I should probably gather a list.  If           //       one entry found, return it.  Otherwise, throw an          //       exception.          try {            subj = sa.getSubject(id);            log.debug("Found subject " + id + "/" + type + " in " + sa.getName());            break;          } catch (SubjectNotFoundException e1) {            log.debug("Did not find subject " + id + "/" + type + " in " + sa.getName());            /*             * Don't worry about not finding subjects in              * particular adapters.             */            continue;          }        }      }      if (subj != null) {        if (cached == false) {          cache.put(id, type, subj);          log.debug("Caching subject " + id + "/" + type);        }      } else {        // TODO Do I want a negative cache?        log.debug("Unable to find subject " + id + "/" + type);        throw new SubjectNotFoundException(          "Could not get " + id + "/" + type        );      }    }    return subj;  }