static void policyChanged(String serviceTypeName,PolicyEvent pe){
  if (DEBUG.messageEnabled()) {
    DEBUG.message("PolicyEvaulator.policyChanged():serviceTypeName=" + serviceTypeName);
  }
  resourceNamesMap.remove(serviceTypeName);
  Cache resourceNamesCache=(Cache)resourceNamesMap.get(serviceTypeName);
  if ((resourceNamesCache == null) || (resourceNamesCache.isEmpty())) {
    return;
  }
  try {
    DEBUG.error("PolicyEvaluator.policyChanged: enterred try block");
    ServiceTypeManager stm=ServiceTypeManager.getServiceTypeManager();
    ServiceType serviceType=stm.getServiceType(serviceTypeName);
    Set resourceNamesToRemove=new HashSet();
synchronized (resourceNamesCache) {
      Enumeration resourceNames=resourceNamesCache.keys();
      while (resourceNames.hasMoreElements()) {
        String resourceName=(String)resourceNames.nextElement();
        if (resourceNamesToRemove.contains(resourceName)) {
          continue;
        }
        Set affectedResourceNames=pe.getResourceNames();
        Iterator iter=affectedResourceNames.iterator();
        while (iter.hasNext()) {
          String affectedResourceName=(String)iter.next();
          if (serviceType.compare(resourceName,affectedResourceName) != ResourceMatch.NO_MATCH) {
            resourceNamesToRemove.add(resourceName);
          }
        }
      }
      Iterator iter1=resourceNamesToRemove.iterator();
      while (iter1.hasNext()) {
        String resourceNameToRemove=(String)iter1.next();
        resourceNamesCache.remove(resourceNameToRemove);
      }
    }
  }
 catch (  SSOException e) {
    DEBUG.error("PolicyEvaluator.policyChanged:",e);
  }
catch (  PolicyException pex) {
    DEBUG.error("PolicyEvaluator.policyChanged:",pex);
  }
  if (DEBUG.messageEnabled()) {
    DEBUG.message("PolicyEvaulator.policyChanged():serviceTypeName=" + serviceTypeName + ", new cached resoruceNames="+ resourceNamesMap.get(serviceTypeName));
  }
}

static void policyChanged ( String serviceTypeName , PolicyEvent pe ) { if ( DEBUG . messageEnabled ( ) ) { DEBUG . message ( "PolicyEvaulator.policyChanged():serviceTypeName=" + serviceTypeName ) ; } resourceNamesMap . remove ( serviceTypeName ) ; Cache resourceNamesCache = ( Cache ) resourceNamesMap . get ( serviceTypeName ) ; if ( ( resourceNamesCache == null ) || ( resourceNamesCache . isEmpty ( ) ) ) { return ; } try { DEBUG . error ( "PolicyEvaluator.policyChanged: enterred try block" ) ; ServiceTypeManager stm = ServiceTypeManager . getServiceTypeManager ( ) ; ServiceType serviceType = stm . getServiceType ( serviceTypeName ) ; Set resourceNamesToRemove = new HashSet ( ) ; synchronized ( resourceNamesCache ) { Enumeration resourceNames = resourceNamesCache . keys ( ) ; while ( resourceNames . hasMoreElements ( ) ) { String resourceName = ( String ) resourceNames . nextElement ( ) ; if ( resourceNamesToRemove . contains ( resourceName ) ) { continue ; } Set affectedResourceNames = pe . getResourceNames ( ) ; Iterator iter = affectedResourceNames . iterator ( ) ; while ( iter . hasNext ( ) ) { String affectedResourceName = ( String ) iter . next ( ) ; if ( serviceType . compare ( resourceName , affectedResourceName ) != ResourceMatch . NO_MATCH ) { resourceNamesToRemove . add ( resourceName ) ; } } } Iterator iter1 = resourceNamesToRemove . iterator ( ) ; while ( iter1 . hasNext ( ) ) { String resourceNameToRemove = ( String ) iter1 . next ( ) ; resourceNamesCache . remove ( resourceNameToRemove ) ; } } } catch ( SSOException e ) { DEBUG . error ( "PolicyEvaluator.policyChanged:" , e ) ; } catch ( PolicyException pex ) { DEBUG . error ( "PolicyEvaluator.policyChanged:" , pex ) ; } if ( DEBUG . messageEnabled ( ) ) { DEBUG . message ( "PolicyEvaulator.policyChanged():serviceTypeName=" + serviceTypeName + ", new cached resoruceNames=" + resourceNamesMap . get ( serviceTypeName ) ) ; } }
handles policychanged notifications - clears the cached resource names for the service type name
