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 2022/08/26 08:12:10 UTC

[isis] branch master updated: ISIS-3182: include impersonation mixins per default

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 4d38e6761d ISIS-3182: include impersonation mixins per default
4d38e6761d is described below

commit 4d38e6761d187d4e2f39a6b921aed9e371ed39ce
Author: Andi Huber <ah...@apache.org>
AuthorDate: Fri Aug 26 10:12:05 2022 +0200

    ISIS-3182: include impersonation mixins per default
    
    - these are prototyping only anyway
---
 .../main/java/demoapp/dom/DemoModuleCommon.java    |  2 --
 .../applib/IsisModuleViewerCommonsApplib.java      |  7 +++++
 .../IsisModuleViewerCommonsApplibMixins.java       | 36 ----------------------
 .../commons/applib/mixins/Object_impersonate.java  |  2 +-
 .../services/IsisModuleViewerCommonsServices.java  |  4 +++
 5 files changed, 12 insertions(+), 39 deletions(-)

diff --git a/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleCommon.java b/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleCommon.java
index 6aee405a5e..772e990e08 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleCommon.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/DemoModuleCommon.java
@@ -29,13 +29,11 @@ import org.apache.isis.applib.IsisModuleApplibMixins;
 import org.apache.isis.core.config.presets.IsisPresets;
 import org.apache.isis.core.runtimeservices.IsisModuleCoreRuntimeServices;
 import org.apache.isis.testing.fixtures.applib.IsisModuleTestingFixturesApplib;
-import org.apache.isis.viewer.commons.applib.IsisModuleViewerCommonsApplibMixins;
 
 @Configuration
 @Import({
     IsisModuleApplibChangeAndExecutionLoggers.class,
     IsisModuleApplibMixins.class,
-    IsisModuleViewerCommonsApplibMixins.class, // basically adds object impersonation mixins
     IsisModuleCoreRuntimeServices.class,
     IsisModuleTestingFixturesApplib.class,
 })
diff --git a/viewers/commons/applib/src/main/java/org/apache/isis/viewer/commons/applib/IsisModuleViewerCommonsApplib.java b/viewers/commons/applib/src/main/java/org/apache/isis/viewer/commons/applib/IsisModuleViewerCommonsApplib.java
index 866b02368e..16a41cfa78 100644
--- a/viewers/commons/applib/src/main/java/org/apache/isis/viewer/commons/applib/IsisModuleViewerCommonsApplib.java
+++ b/viewers/commons/applib/src/main/java/org/apache/isis/viewer/commons/applib/IsisModuleViewerCommonsApplib.java
@@ -21,9 +21,16 @@ package org.apache.isis.viewer.commons.applib;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
 
+import org.apache.isis.viewer.commons.applib.mixins.Object_impersonate;
+import org.apache.isis.viewer.commons.applib.mixins.Object_impersonateWithRoles;
+
 @Configuration
 @Import({
 
+    // Mixins (prototyping)
+    Object_impersonate.class,
+    Object_impersonateWithRoles.class,
+
 })
 public class IsisModuleViewerCommonsApplib {
 }
diff --git a/viewers/commons/applib/src/main/java/org/apache/isis/viewer/commons/applib/IsisModuleViewerCommonsApplibMixins.java b/viewers/commons/applib/src/main/java/org/apache/isis/viewer/commons/applib/IsisModuleViewerCommonsApplibMixins.java
deleted file mode 100644
index 9f931ec82f..0000000000
--- a/viewers/commons/applib/src/main/java/org/apache/isis/viewer/commons/applib/IsisModuleViewerCommonsApplibMixins.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.viewer.commons.applib;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-
-import org.apache.isis.viewer.commons.applib.mixins.Object_impersonate;
-import org.apache.isis.viewer.commons.applib.mixins.Object_impersonateWithRoles;
-
-@Configuration
-@Import({
-
-    // @Mixin's
-    Object_impersonate.class,
-    Object_impersonateWithRoles.class,
-
-})
-public class IsisModuleViewerCommonsApplibMixins {
-}
diff --git a/viewers/commons/applib/src/main/java/org/apache/isis/viewer/commons/applib/mixins/Object_impersonate.java b/viewers/commons/applib/src/main/java/org/apache/isis/viewer/commons/applib/mixins/Object_impersonate.java
index ed666fabe8..bed5ed6b12 100644
--- a/viewers/commons/applib/src/main/java/org/apache/isis/viewer/commons/applib/mixins/Object_impersonate.java
+++ b/viewers/commons/applib/src/main/java/org/apache/isis/viewer/commons/applib/mixins/Object_impersonate.java
@@ -35,7 +35,7 @@ import org.apache.isis.applib.services.user.ImpersonateMenu;
 import lombok.RequiredArgsConstructor;
 
 /**
- * Same as {@link ImpersonateMenu.impersonate#act(String)},
+ * Same as {@link org.apache.isis.applib.services.user.ImpersonateMenu.impersonate#act(String)},
  * but implemented as a mixin so that can be invoked while accessing an object.
  *
  * @since 2.0 {@index}
diff --git a/viewers/commons/services/src/main/java/org/apache/isis/viewer/commons/services/IsisModuleViewerCommonsServices.java b/viewers/commons/services/src/main/java/org/apache/isis/viewer/commons/services/IsisModuleViewerCommonsServices.java
index 4c5b095eff..5e6fb2548e 100644
--- a/viewers/commons/services/src/main/java/org/apache/isis/viewer/commons/services/IsisModuleViewerCommonsServices.java
+++ b/viewers/commons/services/src/main/java/org/apache/isis/viewer/commons/services/IsisModuleViewerCommonsServices.java
@@ -21,6 +21,7 @@ package org.apache.isis.viewer.commons.services;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
 
+import org.apache.isis.viewer.commons.applib.IsisModuleViewerCommonsApplib;
 import org.apache.isis.viewer.commons.services.branding.BrandingUiServiceDefault;
 import org.apache.isis.viewer.commons.services.header.HeaderUiServiceDefault;
 import org.apache.isis.viewer.commons.services.menu.MenuUiServiceDefault;
@@ -29,6 +30,9 @@ import org.apache.isis.viewer.commons.services.userprof.UserProfileUiServiceDefa
 @Configuration
 @Import({
 
+    // adds object impersonation mixins
+    IsisModuleViewerCommonsApplib.class,
+
     // @Service's
     BrandingUiServiceDefault.class,
     UserProfileUiServiceDefault.class,