Class Sudo
- java.lang.Object
-
- ch.ivyteam.ivy.security.exec.Sudo
-
public final class Sudo extends Object
Executes code without
permissionchecking.You as process developer are responsible to check security permission of the current user in your process when using this method! Ensure that only authorized user can execute the process calling this method.
Use with care, since this can cause severe security problems!
- Since:
- 9.3
- API:
- This is a public API.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Tcall(Callable<T> callable)static voidexecute(Executable executable)Executes theexecutemethod of the givenExecutable.static <T> Tget(Supplier<T> supplier)static voidrun(Runnable runnable)
-
-
-
Method Detail
-
get
public static <T> T get(Supplier<T> supplier)
Executes the
getmethod of the givenSupplierand returns the returned value.Checking of
permissionsare disabled while calling thegetmethod.You as process developer are responsible to check security permission of the current user in your process when using this method! Ensure that only authorized user can execute the process calling this method.
Use with care, since this can cause severe security problems!
- Type Parameters:
T-- Parameters:
supplier-- Returns:
- value returned by the given supplier
- Since:
- 9.3
- See Also:
call(Callable)- API:
- This public API is available in Java.
-
call
public static <T> T call(Callable<T> callable) throws Exception
Executes the
callmethod of the givenCallableand returns the returned value.Checking of
permissionsare disabled while calling the {Callable#call() call} method.You as process developer are responsible to check security permission of the current user in your process when using this method! Ensure that only authorized user can execute the process calling this method.
Use with care, since this can cause severe security problems!
- Type Parameters:
T-- Parameters:
callable-- Returns:
- value returned by the given callable
- Throws:
Exception- ifexecutemethod throws an Exception- Since:
- 9.3
- See Also:
get(Supplier)- API:
- This public API is available in Java.
-
run
public static void run(Runnable runnable)
Executes the
runmethod of the givenRunnable.Checking of
permissionsare disabled while calling the {Runnable#run() run} method.You as process developer are responsible to check security permission of the current user in your process when using this method! Ensure that only authorized user can execute the process calling this method.
Use with care, since this can cause severe security problems!
- Parameters:
runnable-- Since:
- 9.3
- See Also:
execute(Executable)- API:
- This public API is available in Java.
-
execute
public static void execute(Executable executable) throws Exception
Executes the
executemethod of the givenExecutable.Checking of
permissionsare disabled while calling the {Executable#execute() execute} method.You as process developer are responsible to check security permission of the current user in your process when using this method! Ensure that only authorized user can execute the process calling this method.
Use with care, since this can cause severe security problems!
- Parameters:
executable-- Throws:
Exception- ifexecutemethod throws an Exception- Since:
- 9.3
- See Also:
run(Runnable)- API:
- This public API is available in Java.
-
-