You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2024/03/11 16:40:17 UTC

(causeway) branch CAUSEWAY-3676 updated (84b77a95bf -> 197f1bcd86)

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

danhaywood pushed a change to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git


    from 84b77a95bf CAUSEWAY-3676: renames 'asciiName' to 'asciiId' wherever
     add a59149ce77 Merge pull request #2266 from apache/CAUSEWAY-3676
     new 2f745316e4 CAUSEWAY-3676: adds docs for asciiId
     new 197f1bcd86 CAUSEWAY-3676: updates docs

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.


Summary of changes:
 .../applib/pages/index/annotation/Action.adoc      | 13 +++++
 .../applib/pages/index/annotation/Collection.adoc  | 13 +++++
 .../applib/pages/index/annotation/Parameter.adoc   | 13 +++++
 .../applib/pages/index/annotation/Property.adoc    | 13 +++++
 .../index/restfulobjects/client/RestfulClient.adoc |  4 +-
 core/adoc/modules/_overview/pages/about.adoc       | 60 +++++++++++++++-------
 viewers/graphql/adoc/modules/ROOT/pages/i18n.adoc  | 31 +++++++++++
 .../adoc/modules/ROOT/partials/module-nav.adoc     |  1 +
 8 files changed, 128 insertions(+), 20 deletions(-)
 create mode 100644 viewers/graphql/adoc/modules/ROOT/pages/i18n.adoc


(causeway) 02/02: CAUSEWAY-3676: updates docs

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

danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 197f1bcd8607b22fb71de5a7632393df22345993
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Mar 11 16:39:00 2024 +0000

    CAUSEWAY-3676: updates docs
---
 .../applib/pages/index/annotation/Action.adoc      | 13 +++++
 .../applib/pages/index/annotation/Collection.adoc  | 13 +++++
 .../applib/pages/index/annotation/Parameter.adoc   | 13 +++++
 .../applib/pages/index/annotation/Property.adoc    | 13 +++++
 .../index/restfulobjects/client/RestfulClient.adoc |  4 +-
 core/adoc/modules/_overview/pages/about.adoc       | 60 +++++++++++++++-------
 6 files changed, 96 insertions(+), 20 deletions(-)

diff --git a/antora/components/refguide-index/modules/applib/pages/index/annotation/Action.adoc b/antora/components/refguide-index/modules/applib/pages/index/annotation/Action.adoc
index d365729b78..a577e21260 100644
--- a/antora/components/refguide-index/modules/applib/pages/index/annotation/Action.adoc
+++ b/antora/components/refguide-index/modules/applib/pages/index/annotation/Action.adoc
@@ -19,6 +19,7 @@ Groups together all domain-specific metadata for an invokable action on a domain
   Class<?> typeOf() default // represents unspecified
 void.class;     // <.>
   String fileAccept() default "";     // <.>
+  String asciiId() default "";     // <.>
 }
 ----
 
@@ -67,6 +68,11 @@ If the action returns a collection, then this hints as to the run-time type of t
 --
 For downloading xref:refguide:applib:index/value/Blob.adoc[Blob] or xref:refguide:applib:index/value/Clob.adoc[Clob] , optionally restrict the files accepted (eg `.xslx` ).
 --
+<.> xref:#asciiId[asciiId]
++
+--
+Returns an alternative id for the action, using only ASCII characters.
+--
 
 == Members
 
@@ -148,6 +154,13 @@ For downloading xref:refguide:applib:index/value/Blob.adoc[Blob] or xref:refguid
 
 The value should be of the form "file_extension|audio/*|video/*|image/*|media_type".
 
+[#asciiId]
+=== asciiId
+
+Returns an alternative id for the action, using only ASCII characters.
+
+Although Java itself allows the full UTF character set for identifiers, some integrations (such as GraphQL) have restrictions to only allow a more limited set of characters, in essence ASCII. This attribute allows a version of the action's Id using only the ASCII character set to be provided.
+
 include::hooks/Action_010-examples-and-usage.adoc[]
 
 include::hooks/Action_021-associating.adoc[]
diff --git a/antora/components/refguide-index/modules/applib/pages/index/annotation/Collection.adoc b/antora/components/refguide-index/modules/applib/pages/index/annotation/Collection.adoc
index bdfa1e5993..bb8c72702a 100644
--- a/antora/components/refguide-index/modules/applib/pages/index/annotation/Collection.adoc
+++ b/antora/components/refguide-index/modules/applib/pages/index/annotation/Collection.adoc
@@ -12,6 +12,7 @@ Domain semantics for domain object collection.
   Class<? extends CollectionDomainEvent<?, ?>> domainEvent() default CollectionDomainEvent.Default.class;     // <.>
   Class<?> typeOf() default // represents unspecified
 void.class;     // <.>
+  String asciiId() default "";     // <.>
 }
 ----
 
@@ -25,6 +26,11 @@ Indicates that changes to the collection that should be posted to the _org.apach
 --
 The type-of the elements held within the collection.
 --
+<.> xref:#asciiId[asciiId]
++
+--
+Returns an alternative id for the collection, using only ASCII characters.
+--
 
 == Members
 
@@ -56,6 +62,13 @@ The type-of the elements held within the collection.
 
 This is only provided as a fallback; usually the framework can infer the element type of the collection from the collection method's generic type.
 
+[#asciiId]
+=== asciiId
+
+Returns an alternative id for the collection, using only ASCII characters.
+
+Although Java itself allows the full UTF character set for identifiers, some integrations (such as GraphQL) have restrictions to only allow a more limited set of characters, in essence ASCII. This attribute allows a version of the collection's Id using only the ASCII character set to be provided.
+
 include::hooks/Collection_010-examples-and-usage.adoc[]
 
 include::hooks/Collection_021_domainEvent.adoc[]
diff --git a/antora/components/refguide-index/modules/applib/pages/index/annotation/Parameter.adoc b/antora/components/refguide-index/modules/applib/pages/index/annotation/Parameter.adoc
index eec25060ce..15e404ee45 100644
--- a/antora/components/refguide-index/modules/applib/pages/index/annotation/Parameter.adoc
+++ b/antora/components/refguide-index/modules/applib/pages/index/annotation/Parameter.adoc
@@ -17,6 +17,7 @@ Collects together all domain semantics of an action parameter within a single an
   int regexPatternFlags() default 0;     // <.>
   String regexPatternReplacement() default "Doesn't match pattern";     // <.>
   PrecedingParamsPolicy precedingParamsPolicy() default PrecedingParamsPolicy.AS_CONFIGURED;     // <.>
+  String asciiId() default "";     // <.>
 }
 ----
 
@@ -60,6 +61,11 @@ Replacement text for the pattern in generated error message.
 --
 Whether parameter values should be reset to their default if an earlier parameter changes its value, or whether instead a parameter value, once changed by the end-user, should never be overwritten even if the end-user changes an earlier parameter value.
 --
+<.> xref:#asciiId[asciiId]
++
+--
+Returns an alternative id for the parameter, using only ASCII characters.
+--
 
 == Members
 
@@ -115,6 +121,13 @@ Replacement text for the pattern in generated error message.
 
 Whether parameter values should be reset to their default if an earlier parameter changes its value, or whether instead a parameter value, once changed by the end-user, should never be overwritten even if the end-user changes an earlier parameter value.
 
+[#asciiId]
+=== asciiId
+
+Returns an alternative id for the parameter, using only ASCII characters.
+
+Although Java itself allows the full UTF character set for identifiers, some integrations (such as GraphQL) have restrictions to only allow a more limited set of characters, in essence ASCII. This attribute allows a version of the parameter's Id using only the ASCII character set to be provided.
+
 include::hooks/Parameter_010-examples-and-usage.adoc[]
 
 include::hooks/Parameter_021-optionality.adoc[]
diff --git a/antora/components/refguide-index/modules/applib/pages/index/annotation/Property.adoc b/antora/components/refguide-index/modules/applib/pages/index/annotation/Property.adoc
index 6793a7beeb..573f350737 100644
--- a/antora/components/refguide-index/modules/applib/pages/index/annotation/Property.adoc
+++ b/antora/components/refguide-index/modules/applib/pages/index/annotation/Property.adoc
@@ -28,6 +28,7 @@ Publishing entityChangePublishing() default Publishing.NOT_SPECIFIED;     // <.>
   String regexPattern() default "";     // <.>
   int regexPatternFlags() default 0;     // <.>
   String regexPatternReplacement() default "Doesn't match pattern";     // <.>
+  String asciiId() default "";     // <.>
 }
 ----
 
@@ -111,6 +112,11 @@ Pattern flags, as per _java.util.regex.Pattern#compile(String, int)_ .
 --
 Replacement text for the pattern in generated error message.
 --
+<.> xref:#asciiId[asciiId]
++
+--
+Returns an alternative id for the property, using only ASCII characters.
+--
 
 == Members
 
@@ -236,6 +242,13 @@ The default value, `0` , means that no flags have been specified.
 
 Replacement text for the pattern in generated error message.
 
+[#asciiId]
+=== asciiId
+
+Returns an alternative id for the property, using only ASCII characters.
+
+Although Java itself allows the full UTF character set for identifiers, some integrations (such as GraphQL) have restrictions to only allow a more limited set of characters, in essence ASCII. This attribute allows a version of the property's Id using only the ASCII character set to be provided.
+
 include::hooks/Property_010-examples-and-usage.adoc[]
 
 include::hooks/Property_021-optionality.adoc[]
diff --git a/antora/components/refguide-index/modules/viewer/pages/index/restfulobjects/client/RestfulClient.adoc b/antora/components/refguide-index/modules/viewer/pages/index/restfulobjects/client/RestfulClient.adoc
index e2e5a1183d..100923f195 100644
--- a/antora/components/refguide-index/modules/viewer/pages/index/restfulobjects/client/RestfulClient.adoc
+++ b/antora/components/refguide-index/modules/viewer/pages/index/restfulobjects/client/RestfulClient.adoc
@@ -10,8 +10,8 @@ For example:
 val clientConfig = RestfulClientConfig.builder();
     .restfulBaseUrl("http://localhost:8080/helloworld/restful/")
         .authenticationMode(AuthenticationMode.BASIC)
-        .restfulAuthUser("sven")
-        .restfulAuthPassword("pass")
+        .basicAuthUser("sven")
+        .basicAuthPassword("pass")
 .useRequestDebugLogging(true) // default = false
 .build();
 
diff --git a/core/adoc/modules/_overview/pages/about.adoc b/core/adoc/modules/_overview/pages/about.adoc
index 42308f85b8..4d73a42336 100644
--- a/core/adoc/modules/_overview/pages/about.adoc
+++ b/core/adoc/modules/_overview/pages/about.adoc
@@ -2771,6 +2771,12 @@ skinparam rectangle<<RestfulObjects.ApacheCausewayViewerRORendering>> {
   BorderColor #2e6295
   shadowing false
 }
+skinparam rectangle<<RestfulObjects.ApacheCausewayViewerROTest>> {
+  BackgroundColor #438dd5
+  FontColor #fffffe
+  BorderColor #2e6295
+  shadowing false
+}
 skinparam rectangle<<RestfulObjects.ApacheCausewayViewerROTesting>> {
   BackgroundColor #438dd5
   FontColor #fffffe
@@ -2795,16 +2801,18 @@ rectangle "Restful Objects\n<size:10>[Software System]</size>" <<RestfulObjects>
   rectangle "==Apache Causeway Viewer - RO (Client)\n<size:10>[Container: packaging: jar]</size>" <<RestfulObjects.ApacheCausewayViewerROClient>> as RestfulObjects.ApacheCausewayViewerROClient
   rectangle "==Apache Causeway Viewer - RO (JAX-RS Resteasy)\n<size:10>[Container: packaging: jar]</size>" <<RestfulObjects.ApacheCausewayViewerROJAXRSResteasy>> as RestfulObjects.ApacheCausewayViewerROJAXRSResteasy
   rectangle "==Apache Causeway Viewer - RO (Rendering)\n<size:10>[Container: packaging: jar]</size>" <<RestfulObjects.ApacheCausewayViewerRORendering>> as RestfulObjects.ApacheCausewayViewerRORendering
+  rectangle "==Apache Causeway Viewer - RO (Test)\n<size:10>[Container: packaging: jar]</size>" <<RestfulObjects.ApacheCausewayViewerROTest>> as RestfulObjects.ApacheCausewayViewerROTest
   rectangle "==Apache Causeway Viewer - RO (Testing)\n<size:10>[Container: packaging: jar]</size>" <<RestfulObjects.ApacheCausewayViewerROTesting>> as RestfulObjects.ApacheCausewayViewerROTesting
   rectangle "==Apache Causeway Viewer - RO (Viewer)\n<size:10>[Container: packaging: jar]</size>" <<RestfulObjects.ApacheCausewayViewerROViewer>> as RestfulObjects.ApacheCausewayViewerROViewer
 }
 
+RestfulObjects.ApacheCausewayViewerRO .[#707070,thickness=2].> RestfulObjects.ApacheCausewayViewerROAppLib : "<color:#707070>"
 RestfulObjects.ApacheCausewayViewerRO .[#707070,thickness=2].> RestfulObjects.ApacheCausewayViewerROClient : "<color:#707070>"
 RestfulObjects.ApacheCausewayViewerRO .[#707070,thickness=2].> RestfulObjects.ApacheCausewayViewerROJAXRSResteasy : "<color:#707070>"
 RestfulObjects.ApacheCausewayViewerRO .[#707070,thickness=2].> RestfulObjects.ApacheCausewayViewerRORendering : "<color:#707070>"
+RestfulObjects.ApacheCausewayViewerRO .[#707070,thickness=2].> RestfulObjects.ApacheCausewayViewerROTest : "<color:#707070>"
 RestfulObjects.ApacheCausewayViewerRO .[#707070,thickness=2].> RestfulObjects.ApacheCausewayViewerROTesting : "<color:#707070>"
 RestfulObjects.ApacheCausewayViewerRO .[#707070,thickness=2].> RestfulObjects.ApacheCausewayViewerROViewer : "<color:#707070>"
-RestfulObjects.ApacheCausewayViewerRO .[#707070,thickness=2].> RestfulObjects.ApacheCausewayViewerROAppLib : "<color:#707070>"
 @enduml
 ----
 
@@ -2933,6 +2941,38 @@ org.apache.causeway.viewer:causeway-viewer-restfulobjects-applib:jar:<managed> +
 xref:refguide:viewer:index/restfulobjects/rendering/CausewayModuleRestfulObjectsRendering.adoc[CausewayModuleRestfulObjectsRendering], xref:refguide:viewer:index/restfulobjects/rendering/IResourceContext.adoc[IResourceContext], xref:refguide:viewer:index/restfulobjects/rendering/service/RepresentationService.adoc[RepresentationService], xref:refguide:viewer:index/restfulobjects/rendering/service/acceptheader/AcceptHeaderServiceForRest.adoc[AcceptHeaderServiceForRest], xref:refguide:viewe [...]
 ****
 
+|Apache Causeway Viewer - RO (Test)
+[source,yaml]
+----
+Group: org.apache.causeway.viewer
+Artifact: causeway-viewer-restfulobjects-test
+Type: jar
+Directory: /viewers/restfulobjects/test
+----
+|.Dependencies
+****
+com.approvaltests:approvaltests:jar:<managed> +
+com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:<managed> +
+com.github.gavlyukovskiy:datasource-proxy-spring-boot-starter:jar:<managed> +
+com.github.vertical-blank:sql-formatter:jar:<managed> +
+com.h2database:h2:jar:<managed> +
+org.apache.causeway.core:causeway-core-internaltestsupport:jar:<managed> +
+org.apache.causeway.core:causeway-core-runtimeservices:jar:<managed> +
+org.apache.causeway.core:causeway-core-webapp:jar:<managed> +
+org.apache.causeway.persistence:causeway-persistence-jpa-eclipselink:jar:<managed> +
+org.apache.causeway.security:causeway-security-bypass:jar:<managed> +
+org.apache.causeway.testing:causeway-testing-fixtures-applib:jar:<managed> +
+org.apache.causeway.viewer:causeway-viewer-commons-services:jar:<managed> +
+org.apache.causeway.viewer:causeway-viewer-restfulobjects-client:jar:<managed> +
+org.apache.causeway.viewer:causeway-viewer-restfulobjects-jaxrsresteasy:jar:<managed> +
+org.apache.causeway.viewer:causeway-viewer-restfulobjects-rendering:jar:<managed> +
+org.apache.causeway.viewer:causeway-viewer-restfulobjects-viewer:jar:<managed> +
+org.glassfish.jersey.core:jersey-client:jar:<managed> +
+org.glassfish.jersey.inject:jersey-hk2:jar:<managed> +
+org.springframework.boot:spring-boot-starter-web:jar:<managed> +
+org.springframework.boot:spring-boot-test-autoconfigure:jar:<managed> +
+****
+
 |Apache Causeway Viewer - RO (Testing)
 [source,yaml]
 ----
@@ -6010,7 +6050,7 @@ org.apache.causeway.extensions:causeway-extensions-executionoutbox-persistence-j
 org.apache.causeway.mavendeps:causeway-mavendeps-webapp:pom:<managed> +
 org.apache.causeway.security:causeway-security-bypass:jar:<managed> +
 org.apache.causeway.testing:causeway-testing-fixtures-applib:jar:<managed> +
-org.apache.causeway.viewer:causeway-viewer-restfulobjects-client:jar:2.0.0-SNAPSHOT +
+org.apache.causeway.viewer:causeway-viewer-restfulobjects-client:jar:<managed> +
 org.apache.causeway.viewer:causeway-viewer-restfulobjects-jaxrsresteasy:jar:<managed> +
 ****
 
@@ -7283,12 +7323,6 @@ Directory: /incubator/extensions/core/commandreplay/primary
 ----
 |A module for obtaining commands from a primary
 
-.Components
-****
-o.a.i.extensions.commandreplay.primary.config.PrimaryConfig +
-o.a.i.extensions.commandreplay.primary.spiimpl.CaptureResultOfCommand +
-****
-
 .Dependencies
 ****
 org.apache.causeway.core:causeway-core-config:jar:<managed> +
@@ -7314,16 +7348,6 @@ Directory: /incubator/extensions/core/commandreplay/secondary
 |A module providing a Quartz Job to run on a secondary system,
 for obtaining commands from a primary and saving them so that they are replayed.
 
-.Components
-****
-o.a.i.extensions.commandreplay.secondary.analyser.CommandReplayAnalyserException +
-o.a.i.extensions.commandreplay.secondary.analyser.CommandReplayAnalyserResult +
-o.a.i.extensions.commandreplay.secondary.analysis.CommandReplayAnalysisService +
-o.a.i.extensions.commandreplay.secondary.config.SecondaryConfig +
-o.a.i.extensions.commandreplay.secondary.fetch.CommandFetcher +
-o.a.i.extensions.commandreplay.secondary.job.ReplicateAndReplayJob +
-****
-
 .Dependencies
 ****
 org.apache.causeway.core:causeway-core-config:jar:<managed> +


(causeway) 01/02: CAUSEWAY-3676: adds docs for asciiId

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

danhaywood pushed a commit to branch CAUSEWAY-3676
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit 2f745316e4a72dc13f0099df0acfd38a1533142a
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Mar 11 15:15:47 2024 +0000

    CAUSEWAY-3676: adds docs for asciiId
---
 viewers/graphql/adoc/modules/ROOT/pages/i18n.adoc  | 31 ++++++++++++++++++++++
 .../adoc/modules/ROOT/partials/module-nav.adoc     |  1 +
 2 files changed, 32 insertions(+)

diff --git a/viewers/graphql/adoc/modules/ROOT/pages/i18n.adoc b/viewers/graphql/adoc/modules/ROOT/pages/i18n.adoc
new file mode 100644
index 0000000000..3559769d2a
--- /dev/null
+++ b/viewers/graphql/adoc/modules/ROOT/pages/i18n.adoc
@@ -0,0 +1,31 @@
+= i18n Concerns
+
+: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 [...]
+
+
+The GraphQL Specification (link:https://spec.graphql.org/June2018/#sec-Names[]) requires that names of fields and types use only a subset of ASCII characters.
+On the other hand the GraphQL viewer will infer these fields from the Java domain objects, which permits a wider range of characters.
+
+To ensure that only permitted characters are used in the GraphQL model, use the xref:refguide:applib:index/annotation/Property.adoc#asciiId[@Property#asciiId], xref:refguide:applib:index/annotation/Collection.adoc#asciiId[@Collection#asciiId], xref:refguide:applib:index/annotation/Action.adoc#asciiId[@Action#asciiId] and xref:refguide:applib:index/annotation/Parameter.adoc#asciiId[@Parameter#asciiId].
+
+For example:
+
+[source,java]
+.I18nCalculator
+----
+@Named("university.calc.I18nCalculator")
+@DomainService(nature= NatureOfService.VIEW)
+@Priority(PriorityPrecedence.EARLY)
+@RequiredArgsConstructor(onConstructor_ = {@Inject})
+public class I18nCalculator {
+
+    @Action(semantics = SemanticsOf.SAFE, asciiId = "concat")
+    public String concät(
+            @Parameter(asciiId = "a1")
+            String ä1,
+            @Parameter(asciiId = "a2")
+            String ä2) {
+        return ä1 + ä2;
+    }
+}
+----
diff --git a/viewers/graphql/adoc/modules/ROOT/partials/module-nav.adoc b/viewers/graphql/adoc/modules/ROOT/partials/module-nav.adoc
index 00f1fac590..cac18d5ba9 100644
--- a/viewers/graphql/adoc/modules/ROOT/partials/module-nav.adoc
+++ b/viewers/graphql/adoc/modules/ROOT/partials/module-nav.adoc
@@ -2,4 +2,5 @@
 * xref:gqlv:ROOT:setup-and-configuration.adoc[]
 * xref:gqlv:ROOT:testsupport.adoc[]
 * xref:gqlv:ROOT:spi-services.adoc[]
+* xref:gqlv:ROOT:i18n.adoc[]