You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2019/09/13 11:32:30 UTC
[isis] branch v2 updated: ISIS-2158 simplifies SvenApplicationUser
persona
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/v2 by this push:
new 08ae903 ISIS-2158 simplifies SvenApplicationUser persona
08ae903 is described below
commit 08ae903a710a0c1cec14629fcb3460b6afd544b2
Author: Andi Huber <ah...@apache.org>
AuthorDate: Fri Sep 13 13:32:22 2019 +0200
ISIS-2158 simplifies SvenApplicationUser persona
---
.../org/apache/isis/testdomain/jdo/JdoTestDomainPersona.java | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/examples/smoketests/src/main/java/org/apache/isis/testdomain/jdo/JdoTestDomainPersona.java b/examples/smoketests/src/main/java/org/apache/isis/testdomain/jdo/JdoTestDomainPersona.java
index ef87904..70f53f3 100644
--- a/examples/smoketests/src/main/java/org/apache/isis/testdomain/jdo/JdoTestDomainPersona.java
+++ b/examples/smoketests/src/main/java/org/apache/isis/testdomain/jdo/JdoTestDomainPersona.java
@@ -67,8 +67,6 @@ implements PersonaWithBuilderScript<BuilderScriptAbstract<? extends Object>> {
public BuilderScriptAbstract<?> builder() {
return new BuilderScriptWithResult<Inventory>() {
- private Inventory inventory;
-
@Override
protected Inventory buildResult(ExecutionContext ec) {
@@ -78,7 +76,7 @@ implements PersonaWithBuilderScript<BuilderScriptAbstract<? extends Object>> {
"Sample Book", "A sample book for testing.", 99.,
"Sample Author", "Sample ISBN", "Sample Publisher"));
- inventory = Inventory.of("Sample Inventory", products);
+ val inventory = Inventory.of("Sample Inventory", products);
repository.persist(inventory);
return inventory;
@@ -94,12 +92,10 @@ implements PersonaWithBuilderScript<BuilderScriptAbstract<? extends Object>> {
SvenApplicationUser {
@Override
public BuilderScriptAbstract<?> builder() {
- return new BuilderScriptWithResult<Inventory>() {
-
- private Inventory inventory;
+ return new BuilderScriptWithoutResult() {
@Override
- protected Inventory buildResult(ExecutionContext ec) {
+ protected void execute(ExecutionContext ec) {
val regularUserRoleName = securityConfig.getRegularUserRoleName();
val regularUserRole = applicationRoleRepository.findByName(regularUserRoleName);
@@ -113,8 +109,6 @@ implements PersonaWithBuilderScript<BuilderScriptAbstract<? extends Object>> {
applicationUserRepository.enable(svenUser);
}
- return inventory;
-
}
@Inject private ApplicationUserRepository applicationUserRepository;