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/07/09 08:38:34 UTC

[isis] branch ISIS-2754 created (now ae02590)

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

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


      at ae02590  ISIS-2754: adds AliasFor to DomainService and DomainObject

This branch includes the following new commits:

     new ae02590  ISIS-2754: adds AliasFor to DomainService and DomainObject

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[isis] 01/01: ISIS-2754: adds AliasFor to DomainService and DomainObject

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ae02590e5a11d62d94bf797cd30099b57356f70d
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jul 9 09:38:13 2021 +0100

    ISIS-2754: adds AliasFor to DomainService and DomainObject
    
    for @Named and logicalTypeName; also objectType
---
 .../main/java/org/apache/isis/applib/annotation/DomainObject.java    | 2 ++
 .../main/java/org/apache/isis/applib/annotation/DomainService.java   | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
index 4c7d68d..a911bf8 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java
@@ -25,6 +25,7 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 import org.springframework.context.annotation.Scope;
+import org.springframework.core.annotation.AliasFor;
 import org.springframework.stereotype.Component;
 
 import org.apache.isis.applib.events.domain.ActionDomainEvent;
@@ -172,6 +173,7 @@ public @interface DomainObject {
      *
      * @see #logicalTypeName()
      */
+    @AliasFor(annotation = DomainObject.class, value = "logicalTypeName")
     String objectType()
             default "";
 
diff --git a/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainService.java b/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainService.java
index 8ea7c22..8dcbc23 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainService.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/annotation/DomainService.java
@@ -25,8 +25,10 @@ import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import javax.inject.Named;
 import javax.inject.Singleton;
 
+import org.springframework.core.annotation.AliasFor;
 import org.springframework.stereotype.Service;
 
 import org.apache.isis.applib.services.bookmark.Bookmark;
@@ -47,6 +49,7 @@ import org.apache.isis.applib.services.bookmark.Bookmark;
  *
  * @since 1.x {@index}
  */
+@Named()
 @Inherited
 @Target({
         ElementType.TYPE,
@@ -71,6 +74,7 @@ public @interface DomainService {
      *
      * @see #logicalTypeName()
      */
+    @AliasFor(annotation = DomainService.class, value = "logicalTypeName")
     String objectType()
             default "";
 
@@ -87,6 +91,7 @@ public @interface DomainService {
      *
      * @see DomainObject#logicalTypeName()
      */
+    @AliasFor(annotation = Named.class, attribute = "value")
     String logicalTypeName()
             default "";