java.lang.Object
com.flexstor.common.io.xfile.XFileAccessorFactory
- Direct Known Subclasses:
- XFileCopy, XFileDelete, XFileMove
- public class XFileAccessorFactory
- extends java.lang.Object
XFileAccessor verifies that a file can be reached.
It checks that the file protocol is valid and that credentials, if set, are also valid.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPY
protected static final int COPY
- See Also:
- Constant Field Values
DELETE
protected static final int DELETE
- See Also:
- Constant Field Values
MOVE
protected static final int MOVE
- See Also:
- Constant Field Values
UNC_PROTOCOL
protected static final java.lang.String UNC_PROTOCOL
- See Also:
- Constant Field Values
UNC_PROTOCOL_PACKAGE
protected static final java.lang.String UNC_PROTOCOL_PACKAGE
- See Also:
- Constant Field Values
BASE_PROTOCOL_PACKAGE
protected static final java.lang.String BASE_PROTOCOL_PACKAGE
sUser
private java.lang.String sUser
sPassword
private java.lang.String sPassword
sValidatedUser
private java.lang.String sValidatedUser
sValidatedPassword
private java.lang.String sValidatedPassword
sValidatedHost
private java.lang.String sValidatedHost
sProtocol
private java.lang.String sProtocol
sProtocolPackage
private java.lang.String sProtocolPackage
bCredentialsSet
private boolean bCredentialsSet
bCredentialsValidated
private boolean bCredentialsValidated
nOperation
private int nOperation
fAccessor
protected XFileAccessorI fAccessor
XFileAccessorFactory
protected XFileAccessorFactory(int nOperation)
setCredentials
public void setCredentials(java.lang.String sUser,
java.lang.String sPassword)
- Set the credentials for deleting a file. Before deleting the file, this class attempts
to validate the credentials with the file system. The credentials will be checked once,
unless they are changed by invoking this method again.
disconnect
public void disconnect()
validateOperation
protected boolean validateOperation(java.lang.String sPath)
- This method validates the operation if the file protocol is valid and if the credentials
set are valid.
validateOperation
protected boolean validateOperation(java.lang.String sPath1,
java.lang.String sPath2)
validateProtocol
private boolean validateProtocol(java.lang.String sPath)
- Validates the protocol
validateCredentials
private boolean validateCredentials(java.lang.String sPath)
- Validates the credentials against the remote server
setInstance
private void setInstance(java.lang.String sPath)
- Sets fAccessor to the proper instance of XFileDeleteI depending on the file protocol specified.
getOperation
private java.lang.String getOperation()