public void delete(SSOToken token,String objName) throws SMSException, SSOException {
  if ((objName == null) || (objName.length() == 0)) {
    throw new IllegalArgumentException("SMSFlatFileObject.delete: object name is null or empty.");
  }
  String objKey=objName.toLowerCase();
  String filepath=null;
  mRWLock.readRequest();
  try {
    filepath=mNameMap.getProperty(objKey);
    if ((filepath == null) && mDebug.messageEnabled()) {
      mDebug.message("SMSFlatFileObject.delete: " + objName + ": object not found.");
    }
  }
  finally {
    mRWLock.readDone();
  }
  if (filepath != null) {
    mRWLock.writeRequest();
    try {
      filepath=mNameMap.getProperty(objKey);
      if (filepath == null) {
        if (mDebug.messageEnabled()) {
          mDebug.message("SMSFlatFileObject.delete: " + objName + ": object not found.");
        }
      }
 else {
        File filehandle=new File(filepath);
        File parentDir=filehandle.getParentFile();
        deleteDir(parentDir);
        objName=objName.toLowerCase();
        Enumeration keysEnum=mNameMap.keys();
        while (keysEnum.hasMoreElements()) {
          String key=(String)keysEnum.nextElement();
          if (key.endsWith(objName)) {
            mNameMap.remove(key);
          }
        }
        saveProperties(mNameMap,mNameMapHandle,null);
      }
    }
  finally {
      mRWLock.writeDone();
    }
  }
}

public void delete ( SSOToken token , String objName ) throws SMSException , SSOException { if ( ( objName == null ) || ( objName . length ( ) == 0 ) ) { throw new IllegalArgumentException ( "SMSFlatFileObject.delete: object name is null or empty." ) ; } String objKey = objName . toLowerCase ( ) ; String filepath = null ; mRWLock . readRequest ( ) ; try { filepath = mNameMap . getProperty ( objKey ) ; if ( ( filepath == null ) && mDebug . messageEnabled ( ) ) { mDebug . message ( "SMSFlatFileObject.delete: " + objName + ": object not found." ) ; } } finally { mRWLock . readDone ( ) ; } if ( filepath != null ) { mRWLock . writeRequest ( ) ; try { filepath = mNameMap . getProperty ( objKey ) ; if ( filepath == null ) { if ( mDebug . messageEnabled ( ) ) { mDebug . message ( "SMSFlatFileObject.delete: " + objName + ": object not found." ) ; } } else { File filehandle = new File ( filepath ) ; File parentDir = filehandle . getParentFile ( ) ; deleteDir ( parentDir ) ; objName = objName . toLowerCase ( ) ; Enumeration keysEnum = mNameMap . keys ( ) ; while ( keysEnum . hasMoreElements ( ) ) { String key = ( String ) keysEnum . nextElement ( ) ; if ( key . endsWith ( objName ) ) { mNameMap . remove ( key ) ; } } saveProperties ( mNameMap , mNameMapHandle , null ) ; } } finally { mRWLock . writeDone ( ) ; } } }
deletes the configuration object and all objects below it .
