This is an automated email from the ASF dual-hosted git repository.
danhaywood 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 daf791df13 CAUSEWAY-2485: reworks @Property#fileAccept
daf791df13 is described below
commit daf791df138cdd1694cd05416a662ff9ddfc6096
Author: danhaywood <[email protected]>
AuthorDate: Thu Apr 20 06:26:37 2023 +0100
CAUSEWAY-2485: reworks @Property#fileAccept
---
.../domain/properties/Property/PropertyMenu.java | 12 +--
.../fileAccept/FileAcceptPdfMetaAnnotation.java | 42 ----------
.../PropertyFileAcceptPage-description.adoc | 95 +++++-----------------
.../fileAccept/PropertyFileAcceptPage.java | 50 ++----------
.../fileAccept/PropertyFileAcceptPage.layout.xml | 8 +-
....java => PropertyFileAcceptPage_updatePdf.java} | 31 +++----
....java => PropertyFileAcceptPage_updateTxt.java} | 31 +++----
...rtyFileAcceptPage_updateWithMetaAnnotation.java | 58 -------------
...eptPage_updateWithMetaAnnotationOverridden.java | 62 --------------
9 files changed, 56 insertions(+), 333 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 667a5311d2..b78e9b7887 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
@@ -91,14 +91,10 @@ public class PropertyMenu {
@Action(semantics = SemanticsOf.SAFE)
@ActionLayout(cssClassFa="fa-file-upload", describedAs = "Length of text
fields")
public PropertyFileAcceptPage fileAccept(){
- val vm = new PropertyFileAcceptPage();
-
- setSampleBlob(".pdf", vm::setPdfPropertyUsingAnnotation);
- setSampleBlob(".pdf", vm::setPdfPropertyUsingMetaAnnotation);
- setSampleBlob(".docx",
vm::setDocxPropertyUsingMetaAnnotationButOverridden);
- setSampleClob(".txt", vm::setTxtPropertyUsingAnnotation);
-
- return vm;
+ val page = new PropertyFileAcceptPage();
+ setSampleBlob(".pdf", page::setPdfProperty);
+ setSampleClob(".txt", page::setTxtProperty);
+ return page;
}
@Action(semantics = SemanticsOf.SAFE)
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/FileAcceptPdfMetaAnnotation.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/FileAcceptPdfMetaAnnotation.java
deleted file mode 100644
index 31714fe58d..0000000000
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/FileAcceptPdfMetaAnnotation.java
+++ /dev/null
@@ -1,42 +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.fileAccept;
-
-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(fileAccept = "pdf") // <.>
-@Parameter(fileAccept = "pdf") // <.>
-@Inherited
-@Target({
- ElementType.METHOD, ElementType.FIELD, // <.>
- ElementType.PARAMETER // <.>
-})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface FileAcceptPdfMetaAnnotation {
-
-}
-//end::class[]
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage-description.adoc
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage-description.adoc
index 7f571aad4b..eece6a29f8 100644
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage-description.adoc
+++
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage-description.adoc
@@ -1,113 +1,58 @@
: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 `fileAccept` element specifies the file extension allowed when browsing
for a file to upload:
+The
link:https://causeway.apache.org/refguide/2.0.0-SNAPSHOT/applib/index/annotation/Property.html#fileaccept[@Property#fileAccept]
attribute is used to indicate a file extension when browsing for a file to
upload:
* for properties, the element can be specified using either the `@Property`
annotation, or a meta-annotation
* for parameters, the element can be specified using either the `@Parameter`
annotation, or a meta-annotation.
-This semantic applies only to ``Blob``s and ``Clob``s.
+This attribute applies only to ``Blob``s and ``Clob``s.
-== Annotated
+== How this demo works
-The `fileAccept` element can be specified explicitly using an annotation (on a
`Blob` property):
+This page object has two properties, `pdfProperty` and `txtProperty`.
+The first is a `Blob` which is intended to hold only PDF files, while the
second is a `Clob` that is intended to hold just `.txt` files.
-* for properties, using `@Property#fileAccept()`:
-+
-[source,java,indent=0]
-.PropertyFileAcceptPage.java
-----
-include::PropertyFileAcceptPage.java[tags=annotation]
-----
-<.> explicitly specifies that only PDFs can be accepted for the property
+Both properties can be edited directly, and can also be updated using an
action.
-* for parameters, using `@Parameter#fileAccept()`:
-+
-[source,java,indent=0]
-.PropertyFileAcceptPage_updateWithParameterLayout.java
-----
-include::PropertyFileAcceptPage_updateWithParameterLayout.java[tags=annotation]
-----
-<.> explicitly specifies that only PDFs can be accepted for the parameter
+* for the `pdfProperty`:
-This also works for ``Clob``s:
-
-* for properties, using `@Property#fileAccept()`:
+** to edit it directly:
+
[source,java,indent=0]
.PropertyFileAcceptPage.java
----
-include::PropertyFileAcceptPage.java[tags=annotation-clob]
+include::PropertyFileAcceptPage.java[tags=pdf]
----
<.> explicitly specifies that only PDFs can be accepted for the property
-* for parameters, using `@Parameter#fileAccept()`:
+** to update using an action:
+
[source,java,indent=0]
-.PropertyFileAcceptPage_updateClobWithParameterLayout.java
+.PropertyFileAcceptPage_updatePdf.java
----
-include::PropertyFileAcceptPage_updateClobWithParameterLayout.java[tags=annotation]
+include::PropertyFileAcceptPage_updatePdf.java[tags=pdf]
----
<.> explicitly specifies that only PDFs can be accepted for the parameter
-The annotation could also be applied to a mixin, but would have little effect
because mixin properties are always read-only.
-
-== Meta-annotated
+* for the `txtProperty` similarly:
-The `fileAccept` element can also be specified using a custom meta-annotation:
-
-* the meta-annotation is defined as:
-+
-[source,java]
-----
-include::FileAcceptPdfMetaAnnotation.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]
-.PropertyFileAcceptPage.java
-----
-include::PropertyFileAcceptPage.java[tags=meta-annotated]
-----
-<.> semantic is inherited from the meta-annotation
-
-* or can be applied to a parameter:
-+
-[source,java,indent=0]
-.PropertyFileAcceptPage_updateWithMetaAnnotation.java
-----
-include::PropertyFileAcceptPage_updateWithMetaAnnotation.java[tags=meta-annotation]
-----
-<.> semantic is inherited from the meta-annotation
-
-
-=== Meta-annotated Overridden
-
-The meta-annotation can itself be overridden:
-
-* in a property:
+** to edit it directly:
+
[source,java,indent=0]
.PropertyFileAcceptPage.java
----
-include::PropertyFileAcceptPage.java[tags=meta-annotated-overridden]
+include::PropertyFileAcceptPage.java[tags=txt]
----
-<.> semantic from meta-annotation ...
-<.> \... is overridden by the `@Property` annotation
+<.> explicitly specifies that only PDFs can be accepted for the property
-* or a parameter:
+** to update using an action:
+
[source,java,indent=0]
-.PropertyFileAcceptPage_updateWithMetaAnnotationOverridden.java
+.PropertyFileAcceptPage_updateTxt.java
----
-include::PropertyFileAcceptPage_updateWithMetaAnnotationOverridden.java[tags=meta-annotation-overridden]
+include::PropertyFileAcceptPage_updateTxt.java[tags=txt]
----
-<.> semantic from meta-annotation ...
-<.> \... is overridden by the `@Parameter` annotation
+<.> explicitly specifies that only `.txt` files can be accepted for the
parameter
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage.java
index 7f0178d516..e59dcbb972 100644
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage.java
+++
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage.java
@@ -30,7 +30,6 @@ import org.apache.causeway.applib.annotation.Editing;
import org.apache.causeway.applib.annotation.Nature;
import org.apache.causeway.applib.annotation.ObjectSupport;
import org.apache.causeway.applib.annotation.Property;
-import org.apache.causeway.applib.annotation.PropertyLayout;
import org.apache.causeway.applib.value.Blob;
import org.apache.causeway.applib.value.Clob;
@@ -53,56 +52,23 @@ public class PropertyFileAcceptPage implements
HasAsciiDocDescription {
return "@Property#fileAccept";
}
-//tag::annotation[]
+//tag::pdf[]
@Property(
- fileAccept = ".pdf" // <.>
+ fileAccept = ".pdf" // <.>
)
- @PropertyLayout(
- describedAs =
- "@Property(fileAccept = \".pdf\")",
- fieldSetId = "annotation", sequence = "1")
@XmlElement(required = true)
@Getter @Setter
- private Blob pdfPropertyUsingAnnotation;
-//end::annotation[]
+ private Blob pdfProperty;
+//end::pdf[]
-//tag::annotation-clob[]
+//tag::txt[]
@Property(
- fileAccept = ".txt" // <.>
+ fileAccept = ".txt" // <.>
)
- @PropertyLayout(
- describedAs =
- "@Property(fileAccept = \".txt\")",
- fieldSetId = "annotation", sequence = "1")
@XmlElement(required = true)
@Getter @Setter
- private Clob txtPropertyUsingAnnotation;
-//end::annotation-clob[]
-
-//tag::meta-annotated[]
- @Property()
- @FileAcceptPdfMetaAnnotation // <.>
- @PropertyLayout(
- describedAs = "@FileAcceptPdfMetaAnnotation",
- fieldSetId = "meta-annotated", sequence = "1")
- @XmlElement(required = true)
- @Getter @Setter
- private Blob pdfPropertyUsingMetaAnnotation;
-//end::meta-annotated[]
-
-//tag::meta-annotated-overridden[]
- @FileAcceptPdfMetaAnnotation // <.>
- @Property(
- fileAccept = ".docx" // <.>
- )
- @PropertyLayout(
- describedAs =
- "@FileAcceptPdfMetaAnnotation @PropertyLayout(...)",
- fieldSetId = "meta-annotated-overridden", sequence = "1")
- @XmlElement(required = true)
- @Getter @Setter
- private Blob docxPropertyUsingMetaAnnotationButOverridden;
-//end::meta-annotated-overridden[]
+ private Clob txtProperty;
+//end::txt[]
}
//end::class[]
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage.layout.xml
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage.layout.xml
index 790c10145c..6c306cf897 100644
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage.layout.xml
+++
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage.layout.xml
@@ -26,10 +26,10 @@
<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="Annotated" id="annotation">
+ <cpt:property id="pdfProperty"/>
+ <cpt:property id="txtProperty"/>
+ </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/fileAccept/PropertyFileAcceptPage_updateWithParameterLayout.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updatePdf.java
similarity index 63%
rename from
examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateWithParameterLayout.java
rename to
examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updatePdf.java
index 9f1f4e22a4..18b6fa2d4c 100644
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateWithParameterLayout.java
+++
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updatePdf.java
@@ -21,42 +21,31 @@ package demoapp.dom.domain.properties.Property.fileAccept;
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 org.apache.causeway.applib.value.Blob;
import lombok.RequiredArgsConstructor;
-@Action(
- semantics = SemanticsOf.IDEMPOTENT
-)
-@ActionLayout(
- associateWith = "pdfPropertyUsingAnnotation"
- , sequence = "1")
+@Action(semantics = SemanticsOf.IDEMPOTENT)
+@ActionLayout(associateWith = "pdfProperty", sequence = "1")
@RequiredArgsConstructor
-public class PropertyFileAcceptPage_updateWithParameterLayout {
+public class PropertyFileAcceptPage_updatePdf {
- private final PropertyFileAcceptPage propertyFileAcceptVm;
+ private final PropertyFileAcceptPage page;
-//tag::annotation[]
+//tag::pdf[]
@MemberSupport public PropertyFileAcceptPage act(
@Parameter(
fileAccept = ".pdf" // <.>
- , optionality = Optionality.OPTIONAL
)
- @ParameterLayout(
- describedAs =
- "@Parameter(fileAccept = \".pdf\")"
- )
- final Blob pdfParameterUsingAnnotation) {
-
propertyFileAcceptVm.setPdfPropertyUsingAnnotation(pdfParameterUsingAnnotation);
- return propertyFileAcceptVm;
+ final Blob pdf) {
+ page.setPdfProperty(pdf);
+ return page;
}
-//end::annotation[]
+//end::pdf[]
@MemberSupport public Blob default0Act() {
- return propertyFileAcceptVm.getPdfPropertyUsingAnnotation();
+ return page.getPdfProperty();
}
}
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateClobWithParameterLayout.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateTxt.java
similarity index 63%
rename from
examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateClobWithParameterLayout.java
rename to
examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateTxt.java
index 70e5fd2072..d2bb2220a2 100644
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateClobWithParameterLayout.java
+++
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateTxt.java
@@ -21,42 +21,31 @@ package demoapp.dom.domain.properties.Property.fileAccept;
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 org.apache.causeway.applib.value.Clob;
import lombok.RequiredArgsConstructor;
-@Action(
- semantics = SemanticsOf.IDEMPOTENT
-)
-@ActionLayout(
- associateWith = "txtPropertyUsingAnnotation"
- , sequence = "1")
+@Action(semantics = SemanticsOf.IDEMPOTENT)
+@ActionLayout(associateWith = "txtProperty", sequence = "1")
@RequiredArgsConstructor
-public class PropertyFileAcceptPage_updateClobWithParameterLayout {
+public class PropertyFileAcceptPage_updateTxt {
- private final PropertyFileAcceptPage propertyFileAcceptVm;
+ private final PropertyFileAcceptPage page;
-//tag::annotation[]
+//tag::txt[]
@MemberSupport public PropertyFileAcceptPage act(
@Parameter(
fileAccept = ".txt" // <.>
- , optionality = Optionality.OPTIONAL
)
- @ParameterLayout(
- describedAs =
- "@Parameter(fileAccept = \".txt\")"
- )
- final Clob parameterUsingAnnotation) {
-
propertyFileAcceptVm.setTxtPropertyUsingAnnotation(parameterUsingAnnotation);
- return propertyFileAcceptVm;
+ final Clob txt) {
+ page.setTxtProperty(txt);
+ return page;
}
-//end::annotation[]
+//end::txt[]
@MemberSupport public Clob default0Act() {
- return propertyFileAcceptVm.getTxtPropertyUsingAnnotation();
+ return page.getTxtProperty();
}
}
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateWithMetaAnnotation.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateWithMetaAnnotation.java
deleted file mode 100644
index 71bec148e2..0000000000
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_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.fileAccept;
-
-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 org.apache.causeway.applib.value.Blob;
-
-import lombok.RequiredArgsConstructor;
-
-@Action(
- semantics = SemanticsOf.IDEMPOTENT
-)
-@ActionLayout(
- associateWith = "pdfPropertyUsingMetaAnnotation"
- , sequence = "1")
-@RequiredArgsConstructor
-public class PropertyFileAcceptPage_updateWithMetaAnnotation {
-
- private final PropertyFileAcceptPage propertyFileAcceptVm;
-
-//tag::meta-annotation[]
- @MemberSupport public PropertyFileAcceptPage act(
- @FileAcceptPdfMetaAnnotation // <.>
- @Parameter()
- @ParameterLayout(
- describedAs = "@FileAcceptPdfMetaAnnotation"
- )
- final Blob pdfParameterUsingMetaAnnotation) {
-
propertyFileAcceptVm.setPdfPropertyUsingMetaAnnotation(pdfParameterUsingMetaAnnotation);
- return propertyFileAcceptVm;
- }
-//end::meta-annotation[]
- @MemberSupport public Blob default0Act() {
- return propertyFileAcceptVm.getPdfPropertyUsingMetaAnnotation();
- }
-
-}
diff --git
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateWithMetaAnnotationOverridden.java
b/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateWithMetaAnnotationOverridden.java
deleted file mode 100644
index 78e73fac37..0000000000
---
a/examples/demo/domain/src/main/java/demoapp/dom/domain/properties/Property/fileAccept/PropertyFileAcceptPage_updateWithMetaAnnotationOverridden.java
+++ /dev/null
@@ -1,62 +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.fileAccept;
-
-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 org.apache.causeway.applib.value.Blob;
-
-import lombok.RequiredArgsConstructor;
-
-@Action(
- semantics = SemanticsOf.IDEMPOTENT
-)
-@ActionLayout(
- associateWith = "docxPropertyUsingMetaAnnotationButOverridden"
- , sequence = "1")
-@RequiredArgsConstructor
-public class PropertyFileAcceptPage_updateWithMetaAnnotationOverridden {
-
- private final PropertyFileAcceptPage propertyFileAcceptVm;
-
-//tag::meta-annotation-overridden[]
- @MemberSupport public PropertyFileAcceptPage act(
- @FileAcceptPdfMetaAnnotation // <.>
- @Parameter(
- fileAccept = ".docx" // <.>
- )
- @ParameterLayout(
- describedAs =
- "@FileAcceptPdfMetaAnnotation " +
- "@ParameterLayout(fileAccept = \".docx\")"
- )
- final Blob docxParameterUsingMetaAnnotationButOverridden) {
-
propertyFileAcceptVm.setDocxPropertyUsingMetaAnnotationButOverridden(docxParameterUsingMetaAnnotationButOverridden);
- return propertyFileAcceptVm;
- }
-//end::meta-annotation-overridden[]
- @MemberSupport public Blob default0Act() {
- return
propertyFileAcceptVm.getDocxPropertyUsingMetaAnnotationButOverridden();
- }
-
-}