Class GrouperSftpSession

java.lang.Object
edu.internet2.middleware.grouper.app.file.GrouperSftpSession

public class GrouperSftpSession extends Object
object to do operations in sftp
  • Constructor Details

    • GrouperSftpSession

      public GrouperSftpSession()
  • Method Details

    • setConfigId

      public void setConfigId(String configId1)
      config id of session
      Parameters:
      configId1 - the configId to set
    • setDebugMap

      public void setDebugMap(Map<String,Object> debugMap1)
      debug map to put debug info
      Parameters:
      debugMap1 - the debugMap to set
    • setSysManager

      public void setSysManager(org.apache.commons.vfs2.impl.StandardFileSystemManager sysManager1)
      sftp sys manager
      Parameters:
      sysManager1 - the sysManager to set
    • setPrivateKeyFilePath

      public void setPrivateKeyFilePath(String privateKeyFilePath)
      Parameters:
      privateKeyFilePath - the privateKeyFilePath to set
    • setKnownHostsFile

      public void setKnownHostsFile(File knownHostsFile1)
      known hosts file
      Parameters:
      knownHostsFile1 - the knownHostsFile to set
    • setHost

      public void setHost(String host1)
      host to connect to
      Parameters:
      host1 - the host to set
    • setUser

      public void setUser(String user1)
      user to connect as
      Parameters:
      user1 - the user to set
    • setPassphrase

      public void setPassphrase(String passphrase1)
      passphrase of private key (if not using password)
      Parameters:
      passphrase1 - the passphrase to set
    • setPassword

      public void setPassword(String password1)
      password of user
      Parameters:
      password1 - the password to set
    • setFileSystemOptions

      public void setFileSystemOptions(org.apache.commons.vfs2.FileSystemOptions fileSystemOptions1)
      file system options of remote system
      Parameters:
      fileSystemOptions1 - the fileSystemOptions to set
    • sendFile

      public void sendFile(File fileToSend, String filenameRemote)
      send file
      Parameters:
      fileToSend -
      filenameRemote -
    • receiveFile

      public void receiveFile(String filenameRemote, File fileToReceive)
      receive file
      Parameters:
      fileToReceive -
      filenameRemote -
    • deleteFile

      public boolean deleteFile(String filenameRemote)
      delete file
      Parameters:
      filenameRemote -
      Returns:
      true if object deleted
    • existsFile

      public boolean existsFile(String filenameRemote)
      exists file
      Parameters:
      filenameRemote -
      Returns:
      true if object exists
    • listFiles

      public List<String> listFiles(String filenameRemote)
      list files in directory
      Parameters:
      filenameRemote -
      Returns:
      the list of paths doesnt return null;
    • moveFile

      public void moveFile(String filenameRemoteFrom, String filenameRemoteTo)
      rename file
      Parameters:
      filenameRemoteFrom -
      filenameRemoteTo -
    • copyFile

      public void copyFile(String filenameRemoteFrom, String filenameRemoteTo)
      copy file
      Parameters:
      filenameRemoteFrom -
      filenameRemoteTo -