You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by ah...@apache.org on 2023/03/15 14:39:39 UTC
[causeway] branch master updated: CAUSEWAY-3378: remove deprecated DomainService#logicalTypeName
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/causeway.git
The following commit(s) were added to refs/heads/master by this push:
new 7148b591d1 CAUSEWAY-3378: remove deprecated DomainService#logicalTypeName
7148b591d1 is described below
commit 7148b591d1b1171053576bcf59563cdcfb140ac9
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Mar 15 15:39:32 2023 +0100
CAUSEWAY-3378: remove deprecated DomainService#logicalTypeName
---
.../pages/index/annotation/DomainService.adoc | 28 ----------------------
.../causeway/applib/annotation/DomainService.java | 20 ----------------
.../org/apache/causeway/applib/id/LogicalType.java | 11 ---------
.../beans/CausewayBeanTypeClassifierDefault.java | 15 +-----------
4 files changed, 1 insertion(+), 73 deletions(-)
diff --git a/antora/components/refguide-index/modules/applib/pages/index/annotation/DomainService.adoc b/antora/components/refguide-index/modules/applib/pages/index/annotation/DomainService.adoc
index b73455da1c..3e732b01b9 100644
--- a/antora/components/refguide-index/modules/applib/pages/index/annotation/DomainService.adoc
+++ b/antora/components/refguide-index/modules/applib/pages/index/annotation/DomainService.adoc
@@ -13,8 +13,6 @@ Also indicates whether the domain service acts as a repository for an entity, an
@interface DomainService {
String[] aliased() default {}; // <.>
NatureOfService nature() default NatureOfService.VIEW; // <.>
- @Deprecated(forRemoval = true, since = "2.0.0-M8")
-String logicalTypeName() default ""; // <.>
}
----
@@ -28,18 +26,6 @@ Alternative logical type name(s) for the annotated type.
--
The nature of this service, either in the UI or REST only
--
-<.> xref:#logicalTypeName[logicalTypeName]
-+
---
-[WARNING]
-====
-[red]#_deprecated:_#
-
-use Spring semantics instead, eg. _Named_ or equivalent
-====
-
-The logical name of this object's type, that uniquely and fully qualifies it. The logical name is analogous to - but independent of - the actual fully qualified class name. eg. _sales.CustomerService_ for a class 'org.mycompany.services.CustomerService'
---
== Members
@@ -53,20 +39,6 @@ Alternative logical type name(s) for the annotated type.
The nature of this service, either in the UI or REST only
-[#logicalTypeName]
-=== logicalTypeName
-
-[WARNING]
-====
-[red]#_deprecated:_#
-
-use Spring semantics instead, eg. _Named_ or equivalent
-====
-
-The logical name of this object's type, that uniquely and fully qualifies it. The logical name is analogous to - but independent of - the actual fully qualified class name. eg. _sales.CustomerService_ for a class 'org.mycompany.services.CustomerService'
-
-This value, if specified, is used in the serialized form of the object's xref:refguide:applib:index/services/bookmark/Bookmark.adoc[Bookmark] . A xref:refguide:applib:index/services/bookmark/Bookmark.adoc[Bookmark] is used by the framework to uniquely identify an object over time (same concept as a URN). Otherwise, if not specified, the default Spring Bean name is used instead.
-
include::hooks/DomainService_010-examples-and-usage.adoc[]
include::hooks/DomainService_021-objectType.adoc[]
diff --git a/api/applib/src/main/java/org/apache/causeway/applib/annotation/DomainService.java b/api/applib/src/main/java/org/apache/causeway/applib/annotation/DomainService.java
index f15b2c0b96..f1b632d2d9 100644
--- a/api/applib/src/main/java/org/apache/causeway/applib/annotation/DomainService.java
+++ b/api/applib/src/main/java/org/apache/causeway/applib/annotation/DomainService.java
@@ -72,24 +72,4 @@ public @interface DomainService {
NatureOfService nature()
default NatureOfService.VIEW;
- /**
- * The logical name of this object's type, that uniquely and fully qualifies it.
- * The logical name is analogous to - but independent of - the actual fully qualified class name.
- * eg. {@code sales.CustomerService} for a class 'org.mycompany.services.CustomerService'
- * <p>
- * This value, if specified, is used in the serialized form of the object's {@link Bookmark}.
- * A {@link Bookmark} is used by the framework to uniquely identify an object over time
- * (same concept as a URN).
- * Otherwise, if not specified, the default Spring Bean name is used instead.
- * </p>
- * @deprecated use Spring semantics instead, eg. {@link Named} or equivalent
- * @see Named
- */
- @Deprecated(forRemoval = true, since = "2.0.0-M8")
- // commented out: let the CausewayBeanFactoryPostProcessorForSpring take care of that!
- //@AliasFor(annotation = Named.class, attribute = "value")
- String logicalTypeName()
- default "";
-
-
}
diff --git a/api/applib/src/main/java/org/apache/causeway/applib/id/LogicalType.java b/api/applib/src/main/java/org/apache/causeway/applib/id/LogicalType.java
index bdb5d66c9d..bf8c4c2a74 100644
--- a/api/applib/src/main/java/org/apache/causeway/applib/id/LogicalType.java
+++ b/api/applib/src/main/java/org/apache/causeway/applib/id/LogicalType.java
@@ -32,7 +32,6 @@ import javax.persistence.Table;
import org.springframework.lang.Nullable;
import org.apache.causeway.applib.annotation.DomainObject;
-import org.apache.causeway.applib.annotation.DomainService;
import org.apache.causeway.applib.annotation.Value;
import org.apache.causeway.commons.internal.base._Strings;
import org.apache.causeway.commons.internal.exceptions._Exceptions;
@@ -141,16 +140,6 @@ implements
}
}
- {
- val logicalTypeName = _Strings.emptyToNull(
- _Annotations.synthesize(correspondingClass, DomainService.class)
- .map(DomainService::logicalTypeName)
- .orElse(null));
- if(logicalTypeName!=null) {
- return eager(correspondingClass, logicalTypeName);
- }
- }
-
{
val logicalTypeName = _Strings.emptyToNull(
_Annotations.synthesize(correspondingClass, Value.class)
diff --git a/core/config/src/main/java/org/apache/causeway/core/config/beans/CausewayBeanTypeClassifierDefault.java b/core/config/src/main/java/org/apache/causeway/core/config/beans/CausewayBeanTypeClassifierDefault.java
index 7ae4302e2a..c6789ad558 100644
--- a/core/config/src/main/java/org/apache/causeway/core/config/beans/CausewayBeanTypeClassifierDefault.java
+++ b/core/config/src/main/java/org/apache/causeway/core/config/beans/CausewayBeanTypeClassifierDefault.java
@@ -32,7 +32,6 @@ import org.apache.causeway.applib.annotation.DomainService;
import org.apache.causeway.applib.id.LogicalType;
import org.apache.causeway.applib.services.metamodel.BeanSort;
import org.apache.causeway.commons.collections.Can;
-import org.apache.causeway.commons.internal.base._Strings;
import org.apache.causeway.commons.internal.reflection._Annotations;
import org.apache.causeway.commons.internal.reflection._ClassCache;
import org.apache.causeway.core.config.progmodel.ProgrammingModelConstants;
@@ -109,19 +108,7 @@ implements CausewayBeanTypeClassifier {
val aDomainService = _Annotations.synthesize(type, DomainService.class);
if(aDomainService.isPresent()) {
val logicalType = LogicalType.infer(type);
-
- // whether overrides Spring naming strategy
- @SuppressWarnings("removal")
- val namedByCauseway = aDomainService
- .map(DomainService::logicalTypeName)
- .map(_Strings::emptyToNull)
- .map(logicalType.getLogicalTypeName()::equals)
- .orElse(false);
-
- return namedByCauseway
- ? CausewayBeanMetaData
- .injectableNamedByCauseway(BeanSort.MANAGED_BEAN_CONTRIBUTING, logicalType)
- : CausewayBeanMetaData
+ return CausewayBeanMetaData
.injectable(BeanSort.MANAGED_BEAN_CONTRIBUTING, logicalType);
}