private void validateDynamicAttribute(Set dynamicSet) throws PolicyException {
  if (DEBUG.messageEnabled()) {
    DEBUG.message("IDRepoResponseProvider.validateDynamicAttribute():" + "entering with dynamicSet=" + dynamicSet);
  }
  responseAttrNames=new HashSet();
  repoAttrNames=new HashSet();
  responseAttrToRepoAttr=new HashMap();
  if (DEBUG.messageEnabled()) {
    DEBUG.message("IDRepoResponseProvider.validateDynamicAttribute():" + "valid dynamic attributes:" + validDynamicAttrNames);
  }
  Set dynamicAttrs=((Set)properties.get(DYNAMIC_ATTRIBUTE));
  if (DEBUG.messageEnabled()) {
    DEBUG.message("IDRepoResponseProvider.validateDynamicAttribute():" + "selected dynamic attributes:" + dynamicAttrs);
  }
  Iterator dynamicAttrsIter=dynamicAttrs.iterator();
  while (dynamicAttrsIter.hasNext()) {
    String attr=(String)dynamicAttrsIter.next();
    if (!validDynamicAttrNames.contains(attr)) {
      if (DEBUG.warningEnabled()) {
        DEBUG.warning("IDReporesponseProvider." + "validateDynamicAttribute():Invalid dynamic property " + "encountered:"+ attr);
      }
      continue;
    }
    String[] attrNames=parseDynamicAttrName(attr);
    String responseAttrName=attrNames[0];
    String repoAttrName=attrNames[1];
    responseAttrNames.add(responseAttrName);
    repoAttrNames.add(repoAttrName);
    addToResponseAttrToRepoAttrMap(responseAttrName,repoAttrName);
    if (DEBUG.messageEnabled()) {
      DEBUG.message("IDRepoResponseProvider." + "validateDynamicAttribute():" + "responseAttrName=" + responseAttrName + ", repoAttrName="+ repoAttrName);
    }
  }
  if (DEBUG.messageEnabled()) {
    DEBUG.message("IDRepoResponseProvider.validateDynamicAttribute():" + "responseAttrToRepoAttr=" + responseAttrToRepoAttr);
    DEBUG.message("IDRepoResponseProvider.validateDynamicAttribute():" + "returning");
  }
}

private void validateDynamicAttribute ( Set dynamicSet ) throws PolicyException { if ( DEBUG . messageEnabled ( ) ) { DEBUG . message ( "IDRepoResponseProvider.validateDynamicAttribute():" + "entering with dynamicSet=" + dynamicSet ) ; } responseAttrNames = new HashSet ( ) ; repoAttrNames = new HashSet ( ) ; responseAttrToRepoAttr = new HashMap ( ) ; if ( DEBUG . messageEnabled ( ) ) { DEBUG . message ( "IDRepoResponseProvider.validateDynamicAttribute():" + "valid dynamic attributes:" + validDynamicAttrNames ) ; } Set dynamicAttrs = ( ( Set ) properties . get ( DYNAMIC_ATTRIBUTE ) ) ; if ( DEBUG . messageEnabled ( ) ) { DEBUG . message ( "IDRepoResponseProvider.validateDynamicAttribute():" + "selected dynamic attributes:" + dynamicAttrs ) ; } Iterator dynamicAttrsIter = dynamicAttrs . iterator ( ) ; while ( dynamicAttrsIter . hasNext ( ) ) { String attr = ( String ) dynamicAttrsIter . next ( ) ; if ( ! validDynamicAttrNames . contains ( attr ) ) { if ( DEBUG . warningEnabled ( ) ) { DEBUG . warning ( "IDReporesponseProvider." + "validateDynamicAttribute():Invalid dynamic property " + "encountered:" + attr ) ; } continue ; } String [ ] attrNames = parseDynamicAttrName ( attr ) ; String responseAttrName = attrNames [ 0 ] ; String repoAttrName = attrNames [ 1 ] ; responseAttrNames . add ( responseAttrName ) ; repoAttrNames . add ( repoAttrName ) ; addToResponseAttrToRepoAttrMap ( responseAttrName , repoAttrName ) ; if ( DEBUG . messageEnabled ( ) ) { DEBUG . message ( "IDRepoResponseProvider." + "validateDynamicAttribute():" + "responseAttrName=" + responseAttrName + ", repoAttrName=" + repoAttrName ) ; } } if ( DEBUG . messageEnabled ( ) ) { DEBUG . message ( "IDRepoResponseProvider.validateDynamicAttribute():" + "responseAttrToRepoAttr=" + responseAttrToRepoAttr ) ; DEBUG . message ( "IDRepoResponseProvider.validateDynamicAttribute():" + "returning" ) ; } }
this method validates the dynamic_attribute data for format and caches parsed responseattrnames , repoattrnames strings in the set need to be in " responseattr = repoattr " format else , throws policyexception
