Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.flexstor.common.io.xfile.webnfs
Class WebNfsDelete  view WebNfsDelete download WebNfsDelete.java

java.lang.Object
  extended bycom.flexstor.common.io.xfile.webnfs.WebNfsDelete
All Implemented Interfaces:
com.flexstor.common.io.xfile.XFileAccessorI, com.flexstor.common.io.xfile.XFileDeleteI

public class WebNfsDelete
extends java.lang.Object
implements com.flexstor.common.io.xfile.XFileDeleteI

WebNfsDelete uses WebNFS to delete files from the filesystem This Class assumes that all paths will be preceded by nfs:// if on another filesystem. It will make no attempt at determining if the path is local or on another server.


Field Summary
private  boolean bConnected
           
private  boolean bDoLogin
           
static java.lang.String IDENTIFIER
           
private  java.lang.String sHost
           
private  java.lang.String sPassword
           
private  java.lang.String sThisService
           
private  java.lang.String sUser
           
private  XFileExtensionAccessor xfeaNFS
           
 
Constructor Summary
WebNfsDelete()
           
 
Method Summary
private  boolean connect(java.lang.String sPath)
           
 boolean connect(java.lang.String sHost, java.lang.String sUser, java.lang.String sPassword)
          Connects to host using the credentials specified.
 boolean deleteDirectory(java.lang.String sDir)
          Deletes the directory specified.
 boolean deleteDirectory(java.lang.String sDir, boolean bDeleteContent)
          Deletes the directory specified.
 boolean deleteFile(java.lang.String sSource)
          Deletes the file specified.
 boolean deleteFile(java.lang.String sSource, boolean bRemoveParentIfEmpty)
          Deletes the file specified.
private  void deleteParent(java.lang.String sParentDir)
           
 void disconnect()
          Disconnects from host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTIFIER

public static final java.lang.String IDENTIFIER
See Also:
Constant Field Values

sThisService

private java.lang.String sThisService

xfeaNFS

private XFileExtensionAccessor xfeaNFS

sHost

private java.lang.String sHost

sUser

private java.lang.String sUser

sPassword

private java.lang.String sPassword

bDoLogin

private boolean bDoLogin

bConnected

private boolean bConnected
Constructor Detail

WebNfsDelete

public WebNfsDelete()
Method Detail

connect

public boolean connect(java.lang.String sHost,
                       java.lang.String sUser,
                       java.lang.String sPassword)
Connects to host using the credentials specified. Returns true if connection was sucessful; false otherwise.

Specified by:
connect in interface com.flexstor.common.io.xfile.XFileAccessorI

connect

private boolean connect(java.lang.String sPath)

disconnect

public void disconnect()
Disconnects from host.

Specified by:
disconnect in interface com.flexstor.common.io.xfile.XFileAccessorI

deleteFile

public boolean deleteFile(java.lang.String sSource)
Description copied from interface: com.flexstor.common.io.xfile.XFileDeleteI
Deletes the file specified. If the file is the only one left, its directory will also be removed.

Specified by:
deleteFile in interface com.flexstor.common.io.xfile.XFileDeleteI

deleteFile

public boolean deleteFile(java.lang.String sSource,
                          boolean bRemoveParentIfEmpty)
Description copied from interface: com.flexstor.common.io.xfile.XFileDeleteI
Deletes the file specified. If the second argument is true, it will remove the directory if it is empty; if false, it will not remove the directory even if it is empty.

Specified by:
deleteFile in interface com.flexstor.common.io.xfile.XFileDeleteI

deleteParent

private void deleteParent(java.lang.String sParentDir)

deleteDirectory

public boolean deleteDirectory(java.lang.String sDir)
Description copied from interface: com.flexstor.common.io.xfile.XFileDeleteI
Deletes the directory specified. This operation will delete any files and subdirectories.

Specified by:
deleteDirectory in interface com.flexstor.common.io.xfile.XFileDeleteI

deleteDirectory

public boolean deleteDirectory(java.lang.String sDir,
                               boolean bDeleteContent)
Description copied from interface: com.flexstor.common.io.xfile.XFileDeleteI
Deletes the directory specified. If the second argument is false, it will remove the directory only if it is empty; if true, it will delete the directory regardless of its content.

Specified by:
deleteDirectory in interface com.flexstor.common.io.xfile.XFileDeleteI