public void deleteCircleOfTrust(String realm,String cotName) throws COTException {
  String classMethod="COTManager.deleteCircleOfTrust:";
  if (realm == null) {
    realm="/";
  }
  String[] data={cotName,realm};
  isValidCOTName(realm,cotName);
  try {
    Set trustProviders=null;
    Map attrs=configInst.getConfiguration(realm,cotName);
    if (attrs != null) {
      CircleOfTrustDescriptor cotDesc=new CircleOfTrustDescriptor(cotName,realm,attrs);
      trustProviders=cotDesc.getTrustedProviders();
    }
    if (attrs == null || trustProviders == null || trustProviders.isEmpty()) {
      configInst.deleteConfiguration(realm,cotName,null);
      LogUtil.access(Level.INFO,LogUtil.COT_DESCRIPTOR_DELETED,data);
    }
 else {
      debug.error(classMethod + "Delete circle of trust" + " is not allowed since it contains members.");
      LogUtil.error(Level.INFO,LogUtil.HAS_ENTITIES_DELETE_COT_DESCRIPTOR,data);
      String[] args={cotName,realm};
      throw new COTException("deleteCOTFailedHasMembers",args);
    }
  }
 catch (  ConfigurationException e) {
    debug.error(classMethod,e);
    String[] args={e.getMessage(),cotName,realm};
    LogUtil.error(Level.INFO,LogUtil.CONFIG_ERROR_DELETE_COT_DESCRIPTOR,args);
    throw new COTException(e);
  }
}

public void deleteCircleOfTrust ( String realm , String cotName ) throws COTException { String classMethod = "COTManager.deleteCircleOfTrust:" ; if ( realm == null ) { realm = "/" ; } String [ ] data = { cotName , realm } ; isValidCOTName ( realm , cotName ) ; try { Set trustProviders = null ; Map attrs = configInst . getConfiguration ( realm , cotName ) ; if ( attrs != null ) { CircleOfTrustDescriptor cotDesc = new CircleOfTrustDescriptor ( cotName , realm , attrs ) ; trustProviders = cotDesc . getTrustedProviders ( ) ; } if ( attrs == null || trustProviders == null || trustProviders . isEmpty ( ) ) { configInst . deleteConfiguration ( realm , cotName , null ) ; LogUtil . access ( Level . INFO , LogUtil . COT_DESCRIPTOR_DELETED , data ) ; } else { debug . error ( classMethod + "Delete circle of trust" + " is not allowed since it contains members." ) ; LogUtil . error ( Level . INFO , LogUtil . HAS_ENTITIES_DELETE_COT_DESCRIPTOR , data ) ; String [ ] args = { cotName , realm } ; throw new COTException ( "deleteCOTFailedHasMembers" , args ) ; } } catch ( ConfigurationException e ) { debug . error ( classMethod , e ) ; String [ ] args = { e . getMessage ( ) , cotName , realm } ; LogUtil . error ( Level . INFO , LogUtil . CONFIG_ERROR_DELETE_COT_DESCRIPTOR , args ) ; throw new COTException ( e ) ; } }
deletes the circle of trust under the realm .
