]> git.argeo.org Git - lgpl/argeo-commons.git/blob - SystemExecutionService.java
eba5d49d9a1794de14bc0d1b6c4badf5fba689d2
[lgpl/argeo-commons.git] / SystemExecutionService.java
1 package org.argeo.security;
2
3 import java.util.concurrent.Executor;
4
5 import org.springframework.core.task.TaskExecutor;
6
7 /**
8 * Allows to execute code authenticated as a system user (that is not a real
9 * person). The {@link Executor} interface interface is not used directly in
10 * order to allow future extension of this interface and to simplify its
11 * publication (e.g. as an OSGi service) and interception. Support for Spring's
12 * {@link TaskExecutor} will be dropped when upgrading to Spring 3, since it is
13 * only to ensure compatibility with versions of Java before 1.5.
14 */
15 public interface SystemExecutionService extends Executor, TaskExecutor {
16 /**
17 * Executes this Runnable within a system authenticated context.
18 * Implementations should make sure that this method is properly secured via
19 * Java permissions since it could access to everything without credentials.
20 */
21 public void execute(Runnable runnable);
22 }