Class Sudo
- java.lang.Object
-
- ch.ivyteam.ivy.security.exec.Sudo
-
public final class Sudo extends Object
Executes code without
permission
checking.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:
- 8.0.20
- API:
- This is a public API.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
call(Callable<T> callable)
static void
execute(Executable executable)
Executes theexecute
method of the givenExecutable
.static <T> T
get(Supplier<T> supplier)
static void
run(Runnable runnable)
-
-
-
Method Detail
-
get
public static <T> T get(Supplier<T> supplier)
Executes the
get
method of the givenSupplier
and returns the returned value.Checking of
permissions
are disabled while calling theget
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:
supplier
-- Returns:
- value returned by the given supplier
- Since:
- 8.0.20
- 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
call
method of the givenCallable
and returns the returned value.Checking of
permissions
are 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
- ifexecute
method throws an Exception- Since:
- 8.0.20
- See Also:
get(Supplier)
- API:
- This public API is available in Java.
-
run
public static void run(Runnable runnable)
Executes the
run
method of the givenRunnable
.Checking of
permissions
are 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:
- 8.0.20
- See Also:
execute(Executable)
- API:
- This public API is available in Java.
-
execute
public static void execute(Executable executable) throws Exception
Executes the
execute
method of the givenExecutable
.Checking of
permissions
are 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
- ifexecute
method throws an Exception- Since:
- 8.0.20
- See Also:
run(Runnable)
- API:
- This public API is available in Java.
-
-