Class FtpRunAs
java.lang.Object
org.genesys.filerepository.service.ftp.FtpRunAs
RunAs for FTP.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFtpRunAs.NoArgMethod<R,T extends Throwable> NoArgMethod. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <R,T extends Throwable>
RasFtpUser(FtpUser ftpUser, FtpRunAs.NoArgMethod<R, T> runnable) Run method as the ftp user.
-
Constructor Details
-
FtpRunAs
public FtpRunAs()
-
-
Method Details
-
asFtpUser
public static <R,T extends Throwable> R asFtpUser(FtpUser ftpUser, FtpRunAs.NoArgMethod<R, T> runnable) throws TRun method as the ftp user. Switches Spring security context toFtpUser.userand back to what it was.- Type Parameters:
R- method return typeT- exception type- Parameters:
ftpUser- the ftp userrunnable- the code to execute as FTP user- Returns:
- the result of runnable
- Throws:
T- the exception
-