diff --git a/li.strolch.service/src/main/java/li/strolch/execution/policy/SimpleExecution.java b/li.strolch.service/src/main/java/li/strolch/execution/policy/SimpleExecution.java index a33632405..a3b67ca0e 100644 --- a/li.strolch.service/src/main/java/li/strolch/execution/policy/SimpleExecution.java +++ b/li.strolch.service/src/main/java/li/strolch/execution/policy/SimpleExecution.java @@ -1,12 +1,17 @@ package li.strolch.execution.policy; -import li.strolch.model.log.LogMessage; +import java.util.function.BiConsumer; +import java.util.function.Consumer; + +import li.strolch.exception.StrolchException; import li.strolch.handler.operationslog.OperationsLog; import li.strolch.model.State; import li.strolch.model.activity.Action; +import li.strolch.model.log.LogMessage; import li.strolch.model.timevalue.impl.FloatValue; import li.strolch.model.timevalue.impl.ValueChange; import li.strolch.persistence.api.StrolchTransaction; +import li.strolch.privilege.model.PrivilegeContext; /** *
@@ -88,4 +93,44 @@ public class SimpleExecution extends ExecutionPolicy {
addMessage(message);
getController().asyncToWarning(message.getLocator());
}
+
+ protected StrolchTransaction openLocalTx(PrivilegeContext ctx, boolean readOnly) throws StrolchException {
+ return getContainer().getRealm(ctx.getCertificate()).openTx(ctx.getCertificate(), getClass(), readOnly);
+ }
+
+ protected void runWithFreshAction(Consumer