public void canonicalizeResources(Subject adminSubject,String realm) throws EntitlementException {
  origMapApplNameToResources=deepCopyMap(mapApplNameToResources);
  for (  String appName : mapApplNameToResources.keySet()) {
    ResourceName resComp=getResourceComparator(adminSubject,realm,appName);
    Set<String> resources=mapApplNameToResources.get(appName);
    Set<String> temp=new HashSet<String>();
    for (    String r : resources) {
      temp.add(resComp.canonicalize(r));
    }
    mapApplNameToResources.put(appName,temp);
  }
}

public void canonicalizeResources ( Subject adminSubject , String realm ) throws EntitlementException { origMapApplNameToResources = deepCopyMap ( mapApplNameToResources ) ; for ( String appName : mapApplNameToResources . keySet ( ) ) { ResourceName resComp = getResourceComparator ( adminSubject , realm , appName ) ; Set < String > resources = mapApplNameToResources . get ( appName ) ; Set < String > temp = new HashSet < String > ( ) ; for ( String r : resources ) { temp . add ( resComp . canonicalize ( r ) ) ; } mapApplNameToResources . put ( appName , temp ) ; } }
canonicalizes resource name before persistence .
