This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch CAUSEWAY-2485
in repository https://gitbox.apache.org/repos/asf/causeway.git
The following commit(s) were added to refs/heads/CAUSEWAY-2485 by this push:
new 17a5c38b36 CAUSEWAY-2485: simplifies @Property#mustSatisfy
17a5c38b36 is described below
commit 17a5c38b369818b41d29fe1d13406da6a0026f0a
Author: danhaywood <[email protected]>
AuthorDate: Thu Apr 20 07:13:16 2023 +0100
CAUSEWAY-2485: simplifies @Property#mustSatisfy
---
.../domain/properties/Property/PropertyMenu.java | 4 +-
.../PropertyMaxLengthPage-description.adoc | 11 ++-
.../MustSatisfyOfWorkingAgeMetaAnnotation.java | 46 ---------
.../mustSatisfy/OfRetirementAgeSpecification.java | 32 -------
.../PropertyMustSatisfyPage-description.adoc | 104 ++++-----------------
.../mustSatisfy/PropertyMustSatisfyPage.java | 32 +------
.../mustSatisfy/PropertyMustSatisfyPage.layout.xml | 7 +-
...PropertyMustSatisfyPage_updateCustomerAge.java} | 21 ++---
...tyMustSatisfyPage_updateWithMetaAnnotation.java | 58 ------------
...sfyPage_updateWithMetaAnnotationOverridden.java | 61 ------------
10 files changed, 37 insertions(+), 339 deletions(-)
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/PropertyMenu.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/PropertyMenu.java
index 2697746f14..795588030d 100644
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/PropertyMenu.java
+++
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/PropertyMenu.java
@@ -110,9 +110,7 @@ public class PropertyMenu {
@ActionLayout(cssClassFa="fa-star-half-alt", describedAs = "Regular
expressions, such as email")
public PropertyMustSatisfyPage mustSatisfy(){
val vm = new PropertyMustSatisfyPage();
- vm.setCustomerAgePropertyUsingAnnotation(18);
- vm.setCustomerAgePropertyUsingMetaAnnotation(65);
- vm.setCustomerAgePropertyUsingMetaAnnotationButOverridden(66);
+ vm.setCustomerAge(18);
return vm;
}
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/maxLength/PropertyMaxLengthPage-description.adoc
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/maxLength/PropertyMaxLengthPage-description.adoc
index 33a2fef81b..d7610f9ff8 100644
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/maxLength/PropertyMaxLengthPage-description.adoc
+++
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/maxLength/PropertyMaxLengthPage-description.adoc
@@ -22,11 +22,11 @@ For domain entities this semantic should be accompanied
with `@Column(maxLength=
== How this demo works
This page object has a single `name` property.
-This can be edited directly, and can also be updated using an action.
+This can be edited directly, or can also be updated using an action.
Either way, a maximum length for the string is enforced.
-To edit the property directly:
-
+* To edit the property directly:
++
[source,java,indent=0]
.PropertyMaxLengthPage.java
----
@@ -35,9 +35,10 @@ include::PropertyMaxLengthPage.java[tags=name]
<.> explicitly specifies the maximum length that can be entered for the
property
-To update using an action:
-
+* To update using an action:
++
[source,java,indent=0]
+.PropertyMaxLengthPage_updateName.java
----
include::PropertyMaxLengthPage_updateName.java[tags=annotation]
----
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/MustSatisfyOfWorkingAgeMetaAnnotation.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/MustSatisfyOfWorkingAgeMetaAnnotation.java
deleted file mode 100644
index aefd280cfc..0000000000
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/MustSatisfyOfWorkingAgeMetaAnnotation.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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 agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package demoapp.dom.domain.properties.Property.mustSatisfy;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.apache.causeway.applib.annotation.Parameter;
-import org.apache.causeway.applib.annotation.Property;
-
-//tag::class[]
-@Property(
- mustSatisfy = OfWorkingAgeSpecification.class // <.>
-)
-@Parameter(
- mustSatisfy = OfWorkingAgeSpecification.class // <.>
-)
-@Inherited
-@Target({
- ElementType.METHOD, ElementType.FIELD, // <.>
- ElementType.PARAMETER, // <.>
-})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface MustSatisfyOfWorkingAgeMetaAnnotation {
-
-}
-//end::class[]
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/OfRetirementAgeSpecification.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/OfRetirementAgeSpecification.java
deleted file mode 100644
index fef9dfd3d0..0000000000
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/OfRetirementAgeSpecification.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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 agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package demoapp.dom.domain.properties.Property.mustSatisfy;
-
-import org.apache.causeway.applib.spec.AbstractSpecification;
-
-//tag::class[]
-public class OfRetirementAgeSpecification extends
AbstractSpecification<Integer> {
- @Override
- public String satisfiesSafely(Integer candidate) {
- return candidate > 65
- ? null
- : "Not of retirement age (66 and older)";
- }
-}
-//end::class[]
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage-description.adoc
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage-description.adoc
index cefe9846f4..10c8472c2f 100644
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage-description.adoc
+++
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage-description.adoc
@@ -1,114 +1,48 @@
: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 `mustSatisfy` attribute specifies an arbitrary constraint that the value
entered into the property must satisfy:
+The
link:https://causeway.apache.org/refguide/2.0.0-SNAPSHOT/applib/index/annotation/Property.html#mustsatisfy[@Property#mustSatisfy]
attribute specifies an arbitrary constraint that the value entered into the
property must satisfy:
* for properties, the attribute can be specified using the `@Property`
annotation
* for parameters, the attribute can be specified using the `@Parameter`
annotation
-The constraint is provided as a concrete class that implements the
`org.apache.causeway.applib.spec.Specification` interface.
-This is usually done by subclassing `AbstractSpecification` or
`AbstractSpecification2`:
+The constraint is provided as a concrete class that implements the
link:https://causeway.apache.org/refguide/2.0.0-RC1/applib/index/spec/Specification.html[Specification].
+This is usually done by subclassing
link:https://causeway.apache.org/refguide/2.0.0-RC1/applib/index/spec/AbstractSpecification.html[AbstractSpecification].
+(There are also i18n versions of these classes,
link:https://causeway.apache.org/refguide/2.0.0-RC1/applib/index/spec/Specification2.html[Specification2]
and
link:https://causeway.apache.org/refguide/2.0.0-RC1/applib/index/spec/AbstractSpecification2.html[AbstractSpecification2]).
-[source,java,indent=0]
-----
-include::OfWorkingAgeSpecification.java[tags=class]
-----
-
-TIP: it is possible to inject domain services into ``Specification``S.
-
-This semantic can apply to all types, although the provided `Specification`
must be compatible, in other words accept the same data type (or a supertype)
of the property.
+TIP: See the
link:https://causeway.apache.org/refguide/2.0.0-RC1/applib-classes/spec.html[reference
guide] for more background on the specification pattern.
+== How this demo works
-== Annotated
+This page has a single `customerAge` property, which is of type `Integer`.
+This can be edited directly, or can also be updated using an action.
-The `mustSatisfy` attribute can be specified explicitly using an annotation:
+We also have a rule that a customer must be aged between 18 and 65.
+This is expressed using a `Specification`:
-* for properties, using `@Property#mustSatisfy()`:
-+
-[source,java,indent=0]
-----
-include::PropertyMustSatisfyPage.java[tags=annotation]
-----
-<.> explicitly specifies that the property holds an integer in the range 18 to
65
-+
-where `OfWorkingAgeSpecification` is:
-+
[source,java,indent=0]
----
include::OfWorkingAgeSpecification.java[tags=class]
----
-* for parameters, using `@Parameter#mustSatisfy()`:
-+
-[source,java,indent=0]
-----
-include::PropertyMustSatisfyVm_updateWithParameterLayout.java[tags=annotation]
-----
-<.> explicitly specifies that the parameter holds an integer in the range 18
to 65
-
-The annotation could also be applied to a mixin, but would have little effect
because mixin properties are always read-only.
-
-== Meta-annotated
+To enforce this rule, we use the `mustSatisfy` attribute.
-CAUTION: this feature is currently broken, see
link:https://issues.apache.org/jira/browse/CAUSEWAY-2415[CAUSEWAY-2415].
-
-The `mustSatisfy` attribute can also be specified using a custom
meta-annotation:
-
-* the meta-annotation is defined as:
-+
-[source,java]
-----
-include::MustSatisfyOfWorkingAgeMetaAnnotation.java[tags=class]
-----
-<.> annotated for a property ...
-<.> \... and for a parameter.
-<.> annotation can be applied to a property (either its getter or the field
directly)
-<.> annotation can be applied to a parameter
-
-* and can be applied to a property:
-+
-[source,java,indent=0]
-----
-include::PropertyMustSatisfyPage.java[tags=meta-annotated]
-----
-<.> semantic is inherited from the meta-annotation
-
-* or can be applied to a parameter:
+* to edit the property directly:
+
[source,java,indent=0]
+.PropertyMustSatisfyPage.java
----
-include::PropertyMustSatisfyVm_updateWithMetaAnnotation.java[tags=meta-annotation]
+include::PropertyMustSatisfyPage.java[tags=annotation]
----
-<.> semantic is inherited from the meta-annotation
-
-
-=== Meta-annotated Overridden
-
-CAUTION: this feature is currently broken, see
link:https://issues.apache.org/jira/browse/CAUSEWAY-2415[CAUSEWAY-2415].
-
-The meta-annotation can itself be overridden:
+<.> explicitly specifies that the property holds an integer in the range 18 to
65
-* in a property:
-+
-[source,java,indent=0]
-----
-include::PropertyMustSatisfyPage.java[tags=meta-annotated-overridden]
-----
-<.> semantic from meta-annotation ...
-<.> \... is overridden by the `@Property` annotation
-* or a parameter:
+* To update using an action:
+
[source,java,indent=0]
+.PropertyMustSatisfyPage_updateCustomerAge.java
----
-include::PropertyMustSatisfyVm_updateWithMetaAnnotationOverridden.java[tags=meta-annotation-overridden]
+include::PropertyMustSatisfyPage_updateCustomerAge.java[tags=annotation]
----
-<.> semantic from meta-annotation ...
-<.> \... is overridden by the `@Parameter` annotation
+<.> explicitly specifies that the parameter holds an integer in the range 18
to 65
-* where `OfRetirementAgeSpecification` is:
-+
-[source,java,indent=0]
-----
-include::OfRetirementAgeSpecification.java[tags=class]
-----
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage.java
index 889290c4a6..8fa317cc15 100644
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage.java
+++
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage.java
@@ -55,40 +55,10 @@ public class PropertyMustSatisfyPage implements
HasAsciiDocDescription {
@Property(
mustSatisfy = OfWorkingAgeSpecification.class // <.>
)
- @PropertyLayout(
- describedAs =
- "mustSatisfy = OfWorkingAgeSpecification.class",
- fieldSetId = "annotation", sequence = "1")
@XmlElement(required = true)
@Getter @Setter
- private Integer customerAgePropertyUsingAnnotation;
+ private Integer customerAge;
//end::annotation[]
-//tag::meta-annotated[]
- @MustSatisfyOfWorkingAgeMetaAnnotation // <.>
- @Property()
- @PropertyLayout(
- describedAs = "@MustSatisfyOfWorkingAgeMetaAnnotation",
- fieldSetId = "meta-annotated", sequence = "1")
- @XmlElement(required = true)
- @Getter @Setter
- private Integer customerAgePropertyUsingMetaAnnotation;
-//end::meta-annotated[]
-
-//tag::meta-annotated-overridden[]
- @MustSatisfyOfWorkingAgeMetaAnnotation // <.>
- @Property(
- mustSatisfy = OfRetirementAgeSpecification.class // <.>
- )
- @PropertyLayout(
- describedAs =
- "@MustSatisfyOfWorkingAgeMetaAnnotation " +
- "@PropertyLayout(mustSatisfy =
OfRetirementAgeSpecification.class)",
- fieldSetId = "meta-annotated-overridden", sequence = "1")
- @XmlElement(required = true)
- @Getter @Setter
- private Integer customerAgePropertyUsingMetaAnnotationButOverridden;
-//end::meta-annotated-overridden[]
-
}
//end::class[]
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage.layout.xml
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage.layout.xml
index 790c10145c..4fb42d74eb 100644
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage.layout.xml
+++
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage.layout.xml
@@ -26,10 +26,9 @@
<bs3:row>
<bs3:col span="6">
- <cpt:fieldSet name="Annotated" id="annotation"/>
- <cpt:fieldSet name="Contributed" id="contributed"/>
- <cpt:fieldSet name="Meta-annotated"
id="meta-annotated"/>
- <cpt:fieldSet name="Meta-annotated Overridden"
id="meta-annotated-overridden"/>
+ <cpt:fieldSet name="General" id="general">
+ <cpt:property id="customerAge"/>
+ </cpt:fieldSet>
<cpt:fieldSet name="Other" id="other"
unreferencedProperties="true"/>
</bs3:col>
<bs3:col span="6">
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage_updateWithParameterLayout.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage_updateCustomerAge.java
similarity index 73%
rename from
examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage_updateWithParameterLayout.java
rename to
examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage_updateCustomerAge.java
index a7ffb95927..c002b0eb94 100644
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage_updateWithParameterLayout.java
+++
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage_updateCustomerAge.java
@@ -27,14 +27,10 @@ import org.apache.causeway.applib.annotation.SemanticsOf;
import lombok.RequiredArgsConstructor;
-@Action(
- semantics = SemanticsOf.IDEMPOTENT
-)
-@ActionLayout(
- associateWith = "customerAgePropertyUsingAnnotation"
- , sequence = "1")
+@Action(semantics = SemanticsOf.IDEMPOTENT)
+@ActionLayout(associateWith = "customerAge", sequence = "1")
@RequiredArgsConstructor
-public class PropertyMustSatisfyPage_updateWithParameterLayout {
+public class PropertyMustSatisfyPage_updateCustomerAge {
private final PropertyMustSatisfyPage page;
@@ -43,17 +39,14 @@ public class
PropertyMustSatisfyPage_updateWithParameterLayout {
@Parameter(
mustSatisfy = OfWorkingAgeSpecification.class // <.>
)
- @ParameterLayout(
- describedAs =
- "@Parameter(mustSatisfy = OfWorkingAgeSpecification.class)"
- )
- final Integer customerAgeParameterUsingAnnotation) {
-
page.setCustomerAgePropertyUsingAnnotation(customerAgeParameterUsingAnnotation);
+ final Integer customerAge) {
+ page.setCustomerAge(customerAge);
return page;
}
//end::annotation[]
+
@MemberSupport public Integer default0Act() {
- return page.getCustomerAgePropertyUsingAnnotation();
+ return page.getCustomerAge();
}
}
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage_updateWithMetaAnnotation.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage_updateWithMetaAnnotation.java
deleted file mode 100644
index 8e24a55b7c..0000000000
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage_updateWithMetaAnnotation.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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 agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package demoapp.dom.domain.properties.Property.mustSatisfy;
-
-import org.apache.causeway.applib.annotation.Action;
-import org.apache.causeway.applib.annotation.ActionLayout;
-import org.apache.causeway.applib.annotation.MemberSupport;
-import org.apache.causeway.applib.annotation.Optionality;
-import org.apache.causeway.applib.annotation.Parameter;
-import org.apache.causeway.applib.annotation.ParameterLayout;
-import org.apache.causeway.applib.annotation.SemanticsOf;
-
-import lombok.RequiredArgsConstructor;
-
-@Action(
- semantics = SemanticsOf.IDEMPOTENT
-)
-@ActionLayout(
- associateWith = "customerAgePropertyUsingMetaAnnotation"
- , sequence = "1")
-@RequiredArgsConstructor
-public class PropertyMustSatisfyPage_updateWithMetaAnnotation {
-
- private final PropertyMustSatisfyPage page;
-
-//tag::meta-annotation[]
- @MemberSupport public PropertyMustSatisfyPage act(
- @MustSatisfyOfWorkingAgeMetaAnnotation
// <.>
- @Parameter(optionality = Optionality.OPTIONAL)
- @ParameterLayout(
- describedAs = "@MustSatisfyOfWorkingAgeMetaAnnotation"
- )
- final Integer customerAgeParameterUsingMetaAnnotation) {
-
page.setCustomerAgePropertyUsingMetaAnnotation(customerAgeParameterUsingMetaAnnotation);
- return page;
- }
-//end::meta-annotation[]
- @MemberSupport public Integer default0Act() {
- return page.getCustomerAgePropertyUsingMetaAnnotation();
- }
-
-}
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage_updateWithMetaAnnotationOverridden.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage_updateWithMetaAnnotationOverridden.java
deleted file mode 100644
index 913e9bc868..0000000000
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/mustSatisfy/PropertyMustSatisfyPage_updateWithMetaAnnotationOverridden.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * 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 agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package demoapp.dom.domain.properties.Property.mustSatisfy;
-
-import org.apache.causeway.applib.annotation.Action;
-import org.apache.causeway.applib.annotation.ActionLayout;
-import org.apache.causeway.applib.annotation.MemberSupport;
-import org.apache.causeway.applib.annotation.Parameter;
-import org.apache.causeway.applib.annotation.ParameterLayout;
-import org.apache.causeway.applib.annotation.SemanticsOf;
-
-import lombok.RequiredArgsConstructor;
-
-@Action(
- semantics = SemanticsOf.IDEMPOTENT
-)
-@ActionLayout(
- associateWith = "customerAgePropertyUsingMetaAnnotationButOverridden"
- , sequence = "1")
-@RequiredArgsConstructor
-public class PropertyMustSatisfyPage_updateWithMetaAnnotationOverridden {
-
- private final PropertyMustSatisfyPage page;
-
-//tag::meta-annotation-overridden[]
- @MemberSupport public PropertyMustSatisfyPage act(
- @MustSatisfyOfWorkingAgeMetaAnnotation // <.>
- @Parameter(
- mustSatisfy = OfRetirementAgeSpecification.class // <.>
- )
- @ParameterLayout(
- describedAs =
- "@MustSatisfyOfWorkingAgeMetaAnnotation " +
- "@ParameterLayout(mustSatisfy =
OfRetirementAgeSpecification.class)"
- )
- final Integer
customerAgeParameterUsingMetaAnnotationButOverridden) {
-
page.setCustomerAgePropertyUsingMetaAnnotationButOverridden(customerAgeParameterUsingMetaAnnotationButOverridden);
- return page;
- }
-//end::meta-annotation-overridden[]
- @MemberSupport public Integer default0Act() {
- return page.getCustomerAgePropertyUsingMetaAnnotationButOverridden();
- }
-
-}