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/06/28 05:25:47 UTC
[isis] branch ISIS-2772 created (now 2c7f9ca)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a change to branch ISIS-2772
in repository https://gitbox.apache.org/repos/asf/isis.git.
at 2c7f9ca ISIS-2772: just renames some parameter names for factory methods of ApplicationFeatureId
This branch includes the following new commits:
new 41e342f ISIS-2772: adds new factory method for ApplicationFeatureId, using LogicalType
new 2c7f9ca ISIS-2772: just renames some parameter names for factory methods of ApplicationFeatureId
The 2 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] 02/02: ISIS-2772: just renames some parameter names for
factory methods of ApplicationFeatureId
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2772
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 2c7f9cade5a69c09961bcfee44e5d48ddcfb94ed
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Jun 28 06:25:22 2021 +0100
ISIS-2772: just renames some parameter names for factory methods of ApplicationFeatureId
---
.../applib/services/appfeat/ApplicationFeatureId.java | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/appfeat/ApplicationFeatureId.java b/api/applib/src/main/java/org/apache/isis/applib/services/appfeat/ApplicationFeatureId.java
index 66fe82e..e5018cf 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/appfeat/ApplicationFeatureId.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/appfeat/ApplicationFeatureId.java
@@ -31,6 +31,7 @@ import javax.annotation.Nullable;
import org.apache.isis.applib.Identifier;
import org.apache.isis.applib.annotation.Programmatic;
import org.apache.isis.applib.annotation.Value;
+import org.apache.isis.applib.id.LogicalType;
import org.apache.isis.applib.util.Equality;
import org.apache.isis.applib.util.Hashing;
import org.apache.isis.applib.util.ObjectContracts;
@@ -90,15 +91,15 @@ implements
public static ApplicationFeatureId newFeature(
final @NonNull ApplicationFeatureSort featureSort,
- final @NonNull String qualifiedName) {
+ final @NonNull String qualifiedLogicalName) {
switch (featureSort) {
case NAMESPACE:
- return newNamespace(qualifiedName);
+ return newNamespace(qualifiedLogicalName);
case TYPE:
- return newType(qualifiedName);
+ return newType(qualifiedLogicalName);
case MEMBER:
- return newMember(qualifiedName);
+ return newMember(qualifiedLogicalName);
}
throw _Exceptions.illegalArgument("Unknown feature sort '%s'", featureSort);
}
@@ -143,14 +144,14 @@ implements
return featureId;
}
- public static ApplicationFeatureId newMember(String fullyQualifiedName) {
+ public static ApplicationFeatureId newMember(String fullyQualifiedLogicalName) {
val featureId = new ApplicationFeatureId(ApplicationFeatureSort.MEMBER);
- final int i = fullyQualifiedName.lastIndexOf("#");
+ val i = fullyQualifiedLogicalName.lastIndexOf("#");
if(i == -1) {
- throw new IllegalArgumentException("Malformed, expected a '#': " + fullyQualifiedName);
+ throw new IllegalArgumentException("Malformed, expected a '#': " + fullyQualifiedLogicalName);
}
- val logicalTypeName = fullyQualifiedName.substring(0, i);
- val memberName = fullyQualifiedName.substring(i + 1);
+ val logicalTypeName = fullyQualifiedLogicalName.substring(0, i);
+ val memberName = fullyQualifiedLogicalName.substring(i + 1);
initType(featureId, logicalTypeName);
initMember(featureId, memberName);
return featureId;
[isis] 01/02: ISIS-2772: adds new factory method for
ApplicationFeatureId, using LogicalType
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2772
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 41e342f95a2d7cf3f36a3da1b7bf1367ed1a022c
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Jun 28 06:24:58 2021 +0100
ISIS-2772: adds new factory method for ApplicationFeatureId, using LogicalType
---
.../org/apache/isis/applib/services/appfeat/ApplicationFeatureId.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/appfeat/ApplicationFeatureId.java b/api/applib/src/main/java/org/apache/isis/applib/services/appfeat/ApplicationFeatureId.java
index 16d9e50..66fe82e 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/appfeat/ApplicationFeatureId.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/appfeat/ApplicationFeatureId.java
@@ -132,6 +132,10 @@ implements
return featureId;
}
+ public static ApplicationFeatureId newType(final LogicalType logicalType) {
+ return newType(logicalType.getLogicalTypeName());
+ }
+
public static ApplicationFeatureId newMember(final String logicalTypeName, final String memberLogicalName) {
val featureId = new ApplicationFeatureId(ApplicationFeatureSort.MEMBER);
initType(featureId, logicalTypeName);