Class FtpRunAs

java.lang.Object
org.genesys.filerepository.service.ftp.FtpRunAs

public class FtpRunAs extends Object
RunAs for FTP.
  • Constructor Details

    • FtpRunAs

      public FtpRunAs()
  • Method Details

    • asFtpUser

      public static <R, T extends Throwable> R asFtpUser(FtpUser ftpUser, FtpRunAs.NoArgMethod<R,T> runnable) throws T
      Run method as the ftp user. Switches Spring security context to FtpUser.user and back to what it was.
      Type Parameters:
      R - method return type
      T - exception type
      Parameters:
      ftpUser - the ftp user
      runnable - the code to execute as FTP user
      Returns:
      the result of runnable
      Throws:
      T - the exception