private boolean validateProperties() throws PolicyException {
  if ((properties == null) || (properties.keySet() == null)) {
    throw new PolicyException(ResBundleUtils.rbName,"properties_can_not_be_null_or_empty",null,null);
  }
  Set keySet=properties.keySet();
  if (!keySet.contains(AUTHENTICATE_TO_SERVICE)) {
    String args[]={AUTHENTICATE_TO_SERVICE};
    throw new PolicyException(ResBundleUtils.rbName,"property_value_not_defined",args,null);
  }
  Iterator keys=keySet.iterator();
  while (keys.hasNext()) {
    String key=(String)keys.next();
    if (!AUTHENTICATE_TO_SERVICE.equals(key)) {
      String args[]={key};
      throw new PolicyException(ResBundleUtils.rbName,"attempt_to_set_invalid_property ",args,null);
    }
  }
  Set authnToServiceSet=null;
  try {
    authnToServiceSet=(Set)properties.get(AUTHENTICATE_TO_SERVICE);
  }
 catch (  ClassCastException e) {
    String args[]={REQUEST_AUTHENTICATED_TO_SERVICES};
    throw new PolicyException(ResBundleUtils.rbName,"property_is_not_a_Set",args,e);
  }
  if (authnToServiceSet != null) {
    validateAuthnToServices(authnToServiceSet);
  }
  return true;
}

private boolean validateProperties ( ) throws PolicyException { if ( ( properties == null ) || ( properties . keySet ( ) == null ) ) { throw new PolicyException ( ResBundleUtils . rbName , "properties_can_not_be_null_or_empty" , null , null ) ; } Set keySet = properties . keySet ( ) ; if ( ! keySet . contains ( AUTHENTICATE_TO_SERVICE ) ) { String args [ ] = { AUTHENTICATE_TO_SERVICE } ; throw new PolicyException ( ResBundleUtils . rbName , "property_value_not_defined" , args , null ) ; } Iterator keys = keySet . iterator ( ) ; while ( keys . hasNext ( ) ) { String key = ( String ) keys . next ( ) ; if ( ! AUTHENTICATE_TO_SERVICE . equals ( key ) ) { String args [ ] = { key } ; throw new PolicyException ( ResBundleUtils . rbName , "attempt_to_set_invalid_property " , args , null ) ; } } Set authnToServiceSet = null ; try { authnToServiceSet = ( Set ) properties . get ( AUTHENTICATE_TO_SERVICE ) ; } catch ( ClassCastException e ) { String args [ ] = { REQUEST_AUTHENTICATED_TO_SERVICES } ; throw new PolicyException ( ResBundleUtils . rbName , "property_is_not_a_Set" , args , e ) ; } if ( authnToServiceSet != null ) { validateAuthnToServices ( authnToServiceSet ) ; } return true ; }
checks the properties set using setproperties ( ) method for validity like , not null , presence of authenticate_to_service property , and no other invalid property .
