protected void removeDomain(SSOToken token,String orgDN) throws AMException {
  try {
    PersistentObject po=UMSObject.getObject(token,new Guid(orgDN));
    if (!(po instanceof com.iplanet.ums.Organization)) {
      if (debug.messageEnabled()) {
        debug.message("DCTree.removeDomain-> " + orgDN + " is not an organization");
      }
      return;
    }
    String domainName=getCanonicalDomain(token,orgDN);
    if (debug.messageEnabled()) {
      debug.message("DCTree.removeDomain-> " + "Obtained canon domain " + domainName);
    }
    if ((domainName != null) && (domainName.length() > 0)) {
      DomainComponentTree dcTree=new DomainComponentTree(token,new Guid(DCTREE_START_DN));
      if (debug.messageEnabled()) {
        debug.message("DCTree.removeDomain: removing domain: " + domainName);
      }
      dcTree.removeDomain(domainName);
    }
 else {
      if (debug.warningEnabled()) {
        debug.warning("DCTree.removeDomain(): " + " unable to get domain for " + orgDN);
      }
    }
  }
 catch (  UMSException ue) {
    if (debug.warningEnabled()) {
      debug.warning("DCTree.removeDomain(): ",ue);
    }
  }
}

protected void removeDomain ( SSOToken token , String orgDN ) throws AMException { try { PersistentObject po = UMSObject . getObject ( token , new Guid ( orgDN ) ) ; if ( ! ( po instanceof com . iplanet . ums . Organization ) ) { if ( debug . messageEnabled ( ) ) { debug . message ( "DCTree.removeDomain-> " + orgDN + " is not an organization" ) ; } return ; } String domainName = getCanonicalDomain ( token , orgDN ) ; if ( debug . messageEnabled ( ) ) { debug . message ( "DCTree.removeDomain-> " + "Obtained canon domain " + domainName ) ; } if ( ( domainName != null ) && ( domainName . length ( ) > 0 ) ) { DomainComponentTree dcTree = new DomainComponentTree ( token , new Guid ( DCTREE_START_DN ) ) ; if ( debug . messageEnabled ( ) ) { debug . message ( "DCTree.removeDomain: removing domain: " + domainName ) ; } dcTree . removeDomain ( domainName ) ; } else { if ( debug . warningEnabled ( ) ) { debug . warning ( "DCTree.removeDomain(): " + " unable to get domain for " + orgDN ) ; } } } catch ( UMSException ue ) { if ( debug . warningEnabled ( ) ) { debug . warning ( "DCTree.removeDomain(): " , ue ) ; } } }
method which removes the dc tree corresponding to the org
