You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2021/03/01 09:58:00 UTC

[isis] 02/03: ISIS-2444: renames CommandDtoServiceInternalDefault to CommandDtoFactoryDefault

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

danhaywood pushed a commit to branch ISIS-2444
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 21f7dccc317df1fe8dc4035f3f6576fdf4dccafa
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Mar 1 06:28:30 2021 +0000

    ISIS-2444: renames CommandDtoServiceInternalDefault to CommandDtoFactoryDefault
---
 .../AuthenticationSessionProvider.adoc             | 33 ----------------------
 .../IsisModuleCoreRuntimeServices.java             | 10 +++----
 ...lDefault.java => CommandDtoFactoryDefault.java} | 26 ++++++++---------
 .../bootstrapping/builtin-domain-services.list     |  4 +--
 4 files changed, 20 insertions(+), 53 deletions(-)

diff --git a/antora/components/refguide-index/modules/core/pages/index/runtimeservices/hooks/pages-to-update/AuthenticationSessionProvider.adoc b/antora/components/refguide-index/modules/core/pages/index/runtimeservices/hooks/pages-to-update/AuthenticationSessionProvider.adoc
deleted file mode 100644
index cd6060f..0000000
--- a/antora/components/refguide-index/modules/core/pages/index/runtimeservices/hooks/pages-to-update/AuthenticationSessionProvider.adoc
+++ /dev/null
@@ -1,33 +0,0 @@
-= `AuthenticationSessionProvider`
-
-:Notice: 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 ag [...]
-
-WARNING: TODO: this content has not yet been reviewed/updated for v2.0
-
-The (internal) `AuthenticationSessionProvider` domain service is simply responsible for obtaining the `AuthenticationSession` (being the framework's internal representation of the currently logged in user).
-
-
-
-
-== SPI and Implementation
-
-The SPI of the service is:
-
-[source,java]
-----
-public interface AuthenticationSessionProvider {
-    AuthenticationSession getAuthenticationSession();
-}
-----
-
-
-The framework provides a default implementation of the service, `AuthenticationSessionProviderDefault`, which looks up
-the current `AuthenticationSession` from `IsisSessionFactory` singleton service:
-
-[source,java]
-----
-isisSessionFactory.getCurrentSession().getAuthenticationSession();
-----
-
-
-If xref:refguide:applib:index/services/sudo/SudoService.adoc[SudoService] has been used to temporarily override the user and/or roles, then this service will report the overridden values.
diff --git a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/IsisModuleCoreRuntimeServices.java b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/IsisModuleCoreRuntimeServices.java
index 6f827b9..16e93c2 100644
--- a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/IsisModuleCoreRuntimeServices.java
+++ b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/IsisModuleCoreRuntimeServices.java
@@ -30,7 +30,7 @@ import org.apache.isis.core.codegen.bytebuddy.IsisModuleCoreCodegenByteBuddy;
 import org.apache.isis.core.runtime.IsisModuleCoreRuntime;
 import org.apache.isis.core.runtimeservices.bookmarks.BookmarkServiceDefault;
 import org.apache.isis.core.runtimeservices.clock.ClockServiceDefault;
-import org.apache.isis.core.runtimeservices.command.CommandDtoServiceInternalDefault;
+import org.apache.isis.core.runtimeservices.command.CommandDtoFactoryDefault;
 import org.apache.isis.core.runtimeservices.command.CommandExecutorServiceDefault;
 import org.apache.isis.core.runtimeservices.confmenu.ConfigurationViewServiceDefault;
 import org.apache.isis.core.runtimeservices.email.EmailServiceDefault;
@@ -77,7 +77,7 @@ import org.apache.isis.core.runtimeservices.xmlsnapshot.XmlSnapshotServiceDefaul
         EntityChangesPublisherDefault.class,
         EntityPropertyChangePublisherDefault.class,
         ClockServiceDefault.class,
-        CommandDtoServiceInternalDefault.class,
+        CommandDtoFactoryDefault.class,
         CommandExecutorServiceDefault.class,
         CommandPublisherDefault.class,
         ConfigurationViewServiceDefault.class,
@@ -106,7 +106,7 @@ import org.apache.isis.core.runtimeservices.xmlsnapshot.XmlSnapshotServiceDefaul
         WrapperFactoryDefault.class,
         XmlServiceDefault.class,
         XmlSnapshotServiceDefault.class,
-        
+
         // @Controller
         RoutingServiceDefault.class,
 
@@ -115,7 +115,7 @@ import org.apache.isis.core.runtimeservices.xmlsnapshot.XmlSnapshotServiceDefaul
 
         // @DomainService's
         TranslationServicePoMenu.class,
-        
+
         // Exception Recognizers
         ExceptionRecognizerForDataAccessException.class,
 
@@ -126,5 +126,5 @@ public class IsisModuleCoreRuntimeServices {
     public OrderComparator orderComparator() {
         return new AnnotationAwareOrderComparator();
     }
-    
+
 }
diff --git a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/command/CommandDtoServiceInternalDefault.java b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/command/CommandDtoFactoryDefault.java
similarity index 93%
rename from core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/command/CommandDtoServiceInternalDefault.java
rename to core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/command/CommandDtoFactoryDefault.java
index 82d9bfb..3c03111 100644
--- a/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/command/CommandDtoServiceInternalDefault.java
+++ b/core/runtimeservices/src/main/java/org/apache/isis/core/runtimeservices/command/CommandDtoFactoryDefault.java
@@ -54,11 +54,11 @@ import org.apache.isis.schema.common.v2.OidsDto;
 import lombok.val;
 
 @Service
-@Named("isis.runtimeservices.CommandDtoServiceInternalDefault")
+@Named("isis.runtimeservices.CommandDtoFactoryDefault")
 @Order(OrderPrecedence.MIDPOINT)
 @Primary
 @Qualifier("Default")
-public class CommandDtoServiceInternalDefault implements CommandDtoFactory {
+public class CommandDtoFactoryDefault implements CommandDtoFactory {
 
     @Inject BookmarkService bookmarkService;
     @Inject ClockService clockService;
@@ -112,24 +112,24 @@ public class CommandDtoServiceInternalDefault implements CommandDtoFactory {
         val actionParameters = objectAction.getParameters();
         for (int paramNum = 0; paramNum < actionParameters.size(); paramNum++) {
             final ObjectActionParameter actionParameter = actionParameters.getElseFail(paramNum);
-            
+
             final Object arg = argAdapters.get(paramNum)
                     .map(argAdapter->argAdapter != null? argAdapter.getPojo(): null)
                     .orElse(null);
-            
+
             // in case of non-scalar params returns the element type
             val paramTypeOrElementType = actionParameter.getSpecification().getCorrespondingClass();
-            
+
             val paramDto = actionParameter.getFeatureType() == FeatureType.ACTION_PARAMETER_COLLECTION
                     ? CommonDtoUtils.newParamDtoNonScalar(
-                            actionParameter.getName(), 
-                            paramTypeOrElementType, 
-                            arg, 
+                            actionParameter.getName(),
+                            paramTypeOrElementType,
+                            arg,
                             bookmarkService)
                     : CommonDtoUtils.newParamDto(
-                            actionParameter.getName(), 
-                            paramTypeOrElementType, 
-                            arg, 
+                            actionParameter.getName(),
+                            paramTypeOrElementType,
+                            arg,
                             bookmarkService);
 
             CommandDtoUtils.parametersFor(actionDto)
@@ -156,7 +156,7 @@ public class CommandDtoServiceInternalDefault implements CommandDtoFactory {
     }
 
     // -- HELPER
-    
+
     private CommandDto asCommandDto(final UUID uniqueId, final Can<ManagedObject> targetAdapters) {
 
         val dto = new CommandDto();
@@ -174,6 +174,6 @@ public class CommandDtoServiceInternalDefault implements CommandDtoFactory {
         }
         return dto;
     }
-    
+
 
 }
diff --git a/regressiontests/stable/src/test/resources/org/apache/isis/testdomain/bootstrapping/builtin-domain-services.list b/regressiontests/stable/src/test/resources/org/apache/isis/testdomain/bootstrapping/builtin-domain-services.list
index 3f31129..d47e452 100644
--- a/regressiontests/stable/src/test/resources/org/apache/isis/testdomain/bootstrapping/builtin-domain-services.list
+++ b/regressiontests/stable/src/test/resources/org/apache/isis/testdomain/bootstrapping/builtin-domain-services.list
@@ -30,11 +30,11 @@ org.apache.isis.extensions.fixtures.fixturescripts.FixtureScripts
 ServiceRegistryDefault
 UserServiceDefault$SudoServiceSpi
 org.apache.isis.persistence.jdo.datanucleus5.metrics.MetricsServiceForJdo
-org.apache.isis.core.runtimeservices.command.CommandDtoServiceInternalDefault
+CommandDtoFactoryDefault
 org.apache.isis.core.runtimeservices.confmenu.ConfigurationViewServiceDefault
 org.apache.isis.core.runtimeservices.email.EmailServiceDefault
 org.apache.isis.core.runtimeservices.i18n.po.TranslationServicePoMenu
 org.apache.isis.core.runtimeservices.ixn.InteractionDtoServiceInternalDefault
 org.apache.isis.core.runtimeservices.sudo.SudoServiceDefault
 org.apache.isis.core.runtimeservices.userprof.UserProfileServiceDefault
-org.apache.isis.core.runtimeservices.userreg.EmailNotificationServiceDefault
\ No newline at end of file
+org.apache.isis.core.runtimeservices.userreg.EmailNotificationServiceDefault