Class GrouperSftp
java.lang.Object
edu.internet2.middleware.grouper.app.file.GrouperSftp
sftp files. use the callback to do multiple operations, or a static call to do one operation https://spaces.at.internet2.edu/display/Grouper/Grouper+Sftp+files GrouperSftp.callback("depot", new GrouperSftpCallback() { public Object callback(GrouperSftpSession grouperSftpSession) { grouperSftpSession.sendFile(new File("d:/temp/temp/PennUsers.csv"), "/data01/isc/bplogix/PennUsers.csv"); grouperSftpSession.deleteFile("/data01/isc/bplogix/whatever.txt"); return null; } });
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
callback
(String configId, GrouperSftpCallback grouperSftpCallback) call this to do sftp stuffstatic void
copy filestatic boolean
deleteFile
(String configId, String filenameRemote) delete filestatic boolean
existsFile
(String configId, String filenameRemote) exists filelist files in directorystatic void
static void
rename filestatic void
receiveFile
(String configId, String filenameRemote, File fileToReceive) receive filestatic void
send file
-
Constructor Details
-
GrouperSftp
public GrouperSftp()
-
-
Method Details
-
main
- Parameters:
args
-
-
callback
call this to do sftp stuff- Parameters:
configId
- from grouper.propertiesgrouperSftpCallback
- use anonymous inner class to tranfer files- Returns:
- object to caller (null if none)
-
copyFile
copy file- Parameters:
configId
-filenameRemoteFrom
-filenameRemoteTo
-
-
deleteFile
delete file- Parameters:
configId
-filenameRemote
-- Returns:
- true if object deleted
-
existsFile
exists file- Parameters:
configId
-filenameRemote
-- Returns:
- true if object exists
-
listFiles
list files in directory- Parameters:
configId
-filenameRemote
-- Returns:
- the list of paths doesnt return null;
-
moveFile
rename file- Parameters:
configId
-filenameRemoteFrom
-filenameRemoteTo
-
-
receiveFile
receive file- Parameters:
configId
-fileToReceive
-filenameRemote
-
-
sendFile
send file- Parameters:
configId
-fileToSend
-filenameRemote
-
-