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

commit 902f392b7040747439bfa6f8b8a447169cc67796
Author: danhaywood <[email protected]>
AuthorDate: Mon Apr 10 22:25:28 2023 +0100

    CAUSEWAY-2485: simplifies @Action#restrictTo
---
 .../dom/domain/actions/Action/ActionMenu.java      |   2 +-
 .../ActionRestrictToPage-description.adoc          | 122 +--------------------
 .../Action/restrictTo/ActionRestrictToPage.java    | 121 +++-----------------
 .../restrictTo/ActionRestrictToPage.layout.xml     |  16 ++-
 ...ionRestrictToPage_mixinUpdateMetaAnnotated.java |  53 ---------
 ...tToPage_mixinUpdateMetaAnnotatedOverridden.java |  56 ----------
 ...tionRestrictToPage_mixinUpdateNoAnnotation.java |  52 ---------
 ...ToPage_mixinUpdateRestrictToNoRestrictions.java |  54 ---------
 ...ictToPage_mixinUpdateRestrictToPrototyping.java |  54 ---------
 .../ActionRestrictToPrototypingMetaAnnotation.java |  40 -------
 10 files changed, 29 insertions(+), 541 deletions(-)

diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/ActionMenu.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/ActionMenu.java
index 9bda8074f5..9a9a983368 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/ActionMenu.java
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/ActionMenu.java
@@ -77,7 +77,7 @@ public class ActionMenu {
     @Action(semantics = SemanticsOf.SAFE)
     @ActionLayout(cssClassFa="fa-paper-plane", describedAs = "Availability of 
actions per environment")
     public ActionRestrictToPage restrictTo(){
-        return new ActionRestrictToPage("value");
+        return new ActionRestrictToPage("change me");
     }
 
     @Action(semantics = SemanticsOf.SAFE)
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage-description.adoc
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage-description.adoc
index 7065075abf..e3fbb48971 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage-description.adoc
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage-description.adoc
@@ -1,6 +1,6 @@
 :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 `restrictTo` element specifies whether the action should be available only 
in prototype mode, or at all times.
+The 
link:https://causeway.apache.org/refguide/2.0.0-SNAPSHOT/applib/index/annotation/Action.html#restrictto[@Action#restrictTo]
 element specifies whether the action should be available only in prototype 
mode, or at all times.
 
 Prototype actions are useful in the early stages of development, typically  
make it easier to explore the domain objects and their relationships.
 For example (when using a test database with a small amount of data), an 
action could return all instances of a domain object such as `Customer`.
@@ -13,18 +13,12 @@ Prototype mode can be activated in several ways, but one of 
the easiest is to se
 export PROTOTYPING=true
 ----
 
-The demo project uses this view model:
 
-[source,java]
-----
-include::ActionRestrictToPage.java[tags=class]
-----
+=== How this demo works
 
-== No annotations
+This page is a view model that defines three actions, each of which defines a 
different `restrictTo` element:
 
-If the `restrictTo` element is omitted completely, then the action is made 
available in both prototyping and production modes:
-
-* on a regular action, `updateNoAnnotation`:
+* no annotation
 +
 [source,java,indent=0]
 ----
@@ -32,20 +26,7 @@ include::ActionRestrictToPage.java[tags=action-no-annotation]
 ----
 <.> does not indicate any `restrictTo` element; will be available in both 
prototype and production mode
 
-* on a mixin action, `mixinUpdateNoAnnotation`:
-+
-[source,java]
-----
-include::ActionRestrictToVm_mixinUpdateNoAnnotation.java[tags=class]
-----
-<.> does not indicate any `restrictTo` element; will be available in 
production mode
-
-
-== Annotated
-
-The `restrictTo` element can be specified explicitly using the `@Action` 
annotation:
-
-* on regular actions; the `updateRestrictToPrototyping` action is annotated as 
a prototype action:
+* explicitly restricted to prototype mode:
 +
 [source,java,indent=0]
 ----
@@ -53,18 +34,7 @@ 
include::ActionRestrictToPage.java[tags=action-restrict-to-prototyping]
 ----
 <.> available only in prototype mode
 
-* on mixin actions; `mixinUpdateRestrictToPrototyping` is annotated as a 
prototype mixin action:
-+
-[source,java]
-----
-include::ActionRestrictToVm_mixinUpdateRestrictToPrototyping.java[tags=class]
-----
-<.> available only in prototype mode
-
-Similarly, we can explicit state that there are no restrictions.
-This is equivalent to not annotating at all:
-
-* the `updateRestrictToNoRestrictions` action is explicitly annotated as a 
having no restrictions, in other words is a regular production action:
+* without any restrictions:
 +
 [source,java,indent=0]
 ----
@@ -72,83 +42,3 @@ 
include::ActionRestrictToPage.java[tags=action-restrict-to-no-restrictions]
 ----
 <.> available in both prototype and production mode
 
-* on mixin actions; `mixinUpdateRestrictToNoRestrictions` action explicitly 
indicates no restrictions:
-+
-[source,java]
-----
-include::ActionRestrictToVm_mixinUpdateRestrictToNoRestrictions.java[tags=class]
-----
-<.> available in both prototype and production mode
-
-
-The element can also be set to `NOT_SPECIFIED`.
-This is useful to allow inheritance of the element from a meta-annotation.
-
-
-== Meta-annotated
-
-The `restrictTo` element can also specified through a meta-annotation.
-For example:
-
-[source,java,indent=0]
-----
-include::ActionRestrictToPrototypingMetaAnnotation.java[tags=class]
-----
-<.> restrict to prototyping mode
-<.> apply either to a regular action or a mixin type
-
-For example:
-
-* on regular actions; the `updateMetaAnnotated` action is meta-annotated to 
only be available in prototype mode:
-+
-[source,java,indent=0]
-----
-include::ActionRestrictToPage.java[tags=action-meta-annotated]
-----
-<.> available only in prototype mode
-
-* on mixin actions; `mixinUpdateMetaAnnotated` is meta-annotated to only be 
available in prototype mode:
-+
-[source,java]
-----
-include::ActionRestrictToPage_mixinUpdateMetaAnnotated.java[tags=class]
-----
-<.> available only in prototype mode
-
-
-
-== Meta-annotated Overridden
-
-While the `restrictTo` element can be specified on a meta-annotation, it can 
still be overridden more locally.
-
-Here we have the meta-annotation:
-
-[source,java]
-----
-include::ActionRestrictToNoRestrictionsMetaAnnotation.java[tags=class]
-----
-
-This semantic can be overridden:
-
-* for regular actions, `updateMetaAnnotatedOverridden`:
-+
-[source,java,indent=0]
-----
-include::ActionRestrictToPage.java[tags=action-meta-annotated-overridden]
-----
-<.> meta-annotation places no restrictions on the action's availability
-<.> overrides to make action available only in prototype mode
-
-* on mixin actions, `mixinUpdateMetaAnnotatedOverridden`:
-+
-[source,java]
-----
-include::ActionRestrictToVm_mixinUpdateMetaAnnotatedOverridden.java[tags=class]
-----
-<.> meta-annotation places no restrictions on the action's availability
-<.> overrides to make action available only in prototype mode
-
-
-The attribute can also be set to `NOT_SPECIFIED`.
-This is useful to allow inheritance of the element from a meta-annotation.
-
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage.java
index c7fcb082cb..863387a9ce 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage.java
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage.java
@@ -26,7 +26,6 @@ import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
 import org.apache.causeway.applib.annotation.Action;
-import org.apache.causeway.applib.annotation.ActionLayout;
 import org.apache.causeway.applib.annotation.DomainObject;
 import org.apache.causeway.applib.annotation.MemberSupport;
 import org.apache.causeway.applib.annotation.Nature;
@@ -44,9 +43,8 @@ import lombok.Setter;
 @XmlRootElement(name = "root")
 @XmlType
 @XmlAccessorType(XmlAccessType.FIELD)
-@Named("demo.ActionRestrictToVm")
-@DomainObject(
-    nature=Nature.VIEW_MODEL)
+@Named("demo.ActionRestrictToPage")
+@DomainObject(nature=Nature.VIEW_MODEL)
 @NoArgsConstructor
 //tag::class[]
 public class ActionRestrictToPage implements HasAsciiDocDescription {
@@ -54,11 +52,7 @@ public class ActionRestrictToPage implements 
HasAsciiDocDescription {
 //end::class[]
 
     public ActionRestrictToPage(final String value) {
-        this.propertyNoAnnotation = value;
-        this.propertyForPrototyping = value;
-        this.propertyForNoRestrictions = value;
-        this.propertyForMetaAnnotations = value;
-        this.propertyForMetaAnnotationsOverridden = value;
+        this.value = value;
     }
 
     @ObjectSupport public String title() {
@@ -66,137 +60,52 @@ public class ActionRestrictToPage implements 
HasAsciiDocDescription {
     }
 
     @Property()
-    @PropertyLayout(fieldSetId = "not-annotated", sequence = "1")
     @XmlElement(required = true)
     @Getter @Setter
-    private String propertyNoAnnotation;
-
-    @Property()
-    @PropertyLayout(fieldSetId = "annotated", sequence = "1")
-    @XmlElement(required = true)
-    @Getter @Setter
-    private String propertyForPrototyping;
-
-    @Property()
-    @PropertyLayout(fieldSetId = "annotated", sequence = "2")
-    @XmlElement(required = true)
-    @Getter @Setter
-    private String propertyForNoRestrictions;
-
-    @Property()
-    @PropertyLayout(fieldSetId = "meta-annotated", sequence = "1")
-    @XmlElement(required = true)
-    @Getter @Setter
-    private String propertyForMetaAnnotations;
-
-    @Property()
-    @PropertyLayout(fieldSetId = "meta-annotated-overridden", sequence = "1")
-    @XmlElement(required = true)
-    @Getter @Setter
-    private String propertyForMetaAnnotationsOverridden;
+    private String value;
 
 //tag::action-no-annotation[]
     @Action(
             semantics = SemanticsOf.IDEMPOTENT
-            // no restrictTo attribute              // <.>
-    )
-    @ActionLayout(
-        describedAs =
-            "@Action()"
-        , associateWith = "propertyNoAnnotation"
-        , sequence = "1"
+            // no restrictTo attribute                  // <.>
     )
     public ActionRestrictToPage updateNoAnnotation(final String text) {
-        setPropertyNoAnnotation(text);
+        setValue(text);
         return this;
     }
     @MemberSupport public String default0UpdateNoAnnotation() {
-        return getPropertyNoAnnotation();
+        return getValue();
     }
 //end::action-no-annotation[]
 
 //tag::action-restrict-to-prototyping[]
     @Action(
-        semantics = SemanticsOf.IDEMPOTENT
-        , restrictTo = RestrictTo.PROTOTYPING         // <.>
-    )
-    @ActionLayout(
-        describedAs =
-            "@Action(restrictTo = RestrictTo.PROTOTYPING)"
-        , associateWith = "propertyForPrototyping"
-        , sequence = "1"
+        semantics = SemanticsOf.IDEMPOTENT,
+        restrictTo = RestrictTo.PROTOTYPING             // <.>
     )
     public ActionRestrictToPage updateRestrictToPrototyping(final String text) 
{
-        setPropertyForPrototyping(text);
+        setValue(text);
         return this;
     }
     @MemberSupport public String default0UpdateRestrictToPrototyping() {
-        return getPropertyForPrototyping();
+        return getValue();
     }
 //end::action-restrict-to-prototyping[]
 
 //tag::action-restrict-to-no-restrictions[]
     @Action(
-        semantics = SemanticsOf.IDEMPOTENT
-        , restrictTo = RestrictTo.NO_RESTRICTIONS      // <.>
-    )
-    @ActionLayout(
-        describedAs =
-            "@Action(restrictTo = RestrictTo.NO_RESTRICTIONS)"
-        , associateWith = "propertyForNoRestrictions"
-        , sequence = "1"
+        semantics = SemanticsOf.IDEMPOTENT,
+        restrictTo = RestrictTo.NO_RESTRICTIONS         // <.>
     )
     public ActionRestrictToPage updateRestrictToNoRestrictions(final String 
text) {
-        setPropertyForNoRestrictions(text);
+        setValue(text);
         return this;
     }
     @MemberSupport public String default0UpdateRestrictToNoRestrictions() {
-        return getPropertyForNoRestrictions();
+        return getValue();
     }
 //end::action-restrict-to-no-restrictions[]
 
-//tag::action-meta-annotated[]
-    @ActionRestrictToPrototypingMetaAnnotation      // <.>
-    @Action(
-        semantics = SemanticsOf.IDEMPOTENT
-    )
-    @ActionLayout(
-        describedAs =
-            "@ActionRestrictToPrototypingMetaAnnotation"
-        , associateWith = "propertyForMetaAnnotations"
-        , sequence = "1"
-    )
-    public ActionRestrictToPage updateMetaAnnotated(final String text) {
-        setPropertyForMetaAnnotations(text);
-        return this;
-    }
-    @MemberSupport public String default0UpdateMetaAnnotated() {
-        return getPropertyForMetaAnnotations();
-    }
-//end::action-meta-annotated[]
-
-//tag::action-meta-annotated-overridden[]
-    @ActionRestrictToNoRestrictionsMetaAnnotation   // <.>
-    @Action(
-        semantics = SemanticsOf.IDEMPOTENT
-        , restrictTo = RestrictTo.PROTOTYPING   // <.>
-    )
-    @ActionLayout(
-        describedAs =
-            "@ActionRestrictToNoRestrictionsMetaAnnotation " +
-            "@Action(restrictTo = RestrictTo.PROTOTYPING)"
-        , associateWith = "propertyForMetaAnnotationsOverridden"
-        , sequence = "1"
-    )
-    public ActionRestrictToPage updateMetaAnnotatedOverridden(final String 
text) {
-        setPropertyForMetaAnnotationsOverridden(text);
-        return this;
-    }
-    @MemberSupport public String default0UpdateMetaAnnotatedOverridden() {
-        return getPropertyForMetaAnnotationsOverridden();
-    }
-//end::action-meta-annotated-overridden[]
-
 //tag::class[]
 }
 //end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage.layout.xml
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage.layout.xml
index b5106f89c5..54129043bc 100644
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage.layout.xml
+++ 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage.layout.xml
@@ -28,18 +28,16 @@
                <bs3:col span="6">
                        <bs3:row>
                                <bs3:col span="12">
-                                       <cpt:fieldSet name="Not annotated" 
id="not-annotated"/>
-                                       <cpt:fieldSet name="Annotated" 
id="annotated"/>
-                                       <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="value">
+                                                       <cpt:action 
id="updateNoAnnotation"/>
+                                                       <cpt:action 
id="updateRestrictToPrototyping"/>
+                                                       <cpt:action 
id="updateRestrictToNoRestrictions"/>
+                                               </cpt:property>
+                                       </cpt:fieldSet>
                                        <cpt:fieldSet name="Other" id="other" 
unreferencedProperties="true"/>
                                </bs3:col>
                        </bs3:row>
-                       <bs3:row>
-                               <bs3:col span="12">
-                                       <cpt:collection id="events"/>
-                               </bs3:col>
-                       </bs3:row>
                </bs3:col>
                <bs3:col span="6">
                        <cpt:fieldSet name="Description" id="description" >
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateMetaAnnotated.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateMetaAnnotated.java
deleted file mode 100644
index 8abc844f42..0000000000
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateMetaAnnotated.java
+++ /dev/null
@@ -1,53 +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.actions.Action.restrictTo;
-
-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.SemanticsOf;
-
-import lombok.RequiredArgsConstructor;
-
-
-//tag::class[]
-@ActionRestrictToPrototypingMetaAnnotation  // <.>
-@Action(
-    semantics = SemanticsOf.SAFE
-)
-@ActionLayout(
-    describedAs =
-        "@ActionRestrictToPrototypingMetaAnnotation"
-    , associateWith = "propertyForMetaAnnotations"
-    , sequence = "2"
-)
-@RequiredArgsConstructor
-public class ActionRestrictToPage_mixinUpdateMetaAnnotated {
-
-    private final ActionRestrictToPage page;
-
-    @MemberSupport public ActionRestrictToPage act(final String text) {
-        page.setPropertyForMetaAnnotations(text);
-        return page;
-    }
-    @MemberSupport public String default0Act() {
-        return page.getPropertyForMetaAnnotations();
-    }
-}
-//end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateMetaAnnotatedOverridden.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateMetaAnnotatedOverridden.java
deleted file mode 100644
index f2aab95d15..0000000000
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateMetaAnnotatedOverridden.java
+++ /dev/null
@@ -1,56 +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.actions.Action.restrictTo;
-
-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.RestrictTo;
-import org.apache.causeway.applib.annotation.SemanticsOf;
-
-import lombok.RequiredArgsConstructor;
-
-
-//tag::class[]
-@ActionRestrictToNoRestrictionsMetaAnnotation   // <.>
-@Action(
-    semantics = SemanticsOf.SAFE
-    , restrictTo = RestrictTo.PROTOTYPING       // <.>
-)
-@ActionLayout(
-    describedAs =
-        "@ActionRestrictToNoRestrictionsMetaAnnotation " +
-        "@Action(restrictTo = RestrictTo.PROTOTYPING)"
-    , associateWith = "propertyForMetaAnnotationsOverridden"
-    , sequence = "2"
-)
-@RequiredArgsConstructor
-public class ActionRestrictToPage_mixinUpdateMetaAnnotatedOverridden {
-
-    private final ActionRestrictToPage page;
-
-    @MemberSupport public ActionRestrictToPage act(final String text) {
-        page.setPropertyForMetaAnnotationsOverridden(text);
-        return page;
-    }
-    @MemberSupport public String default0Act() {
-        return page.getPropertyForMetaAnnotationsOverridden();
-    }
-}
-//end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateNoAnnotation.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateNoAnnotation.java
deleted file mode 100644
index 653976ac9b..0000000000
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateNoAnnotation.java
+++ /dev/null
@@ -1,52 +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.actions.Action.restrictTo;
-
-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.SemanticsOf;
-
-import lombok.RequiredArgsConstructor;
-
-
-//tag::class[]
-@Action(
-    semantics = SemanticsOf.SAFE
-    // no restrictTo attribute              // <.>
-)
-@ActionLayout(
-    describedAs = "@Action()"
-    , associateWith = "propertyNoAnnotation"
-    , sequence = "2"
-)
-@RequiredArgsConstructor
-public class ActionRestrictToPage_mixinUpdateNoAnnotation {
-
-    private final ActionRestrictToPage page;
-
-    @MemberSupport public ActionRestrictToPage act(final String text) {
-        page.setPropertyNoAnnotation(text);
-        return page;
-    }
-    @MemberSupport public String default0Act() {
-        return page.getPropertyNoAnnotation();
-    }
-}
-//end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateRestrictToNoRestrictions.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateRestrictToNoRestrictions.java
deleted file mode 100644
index 62fa8be5be..0000000000
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateRestrictToNoRestrictions.java
+++ /dev/null
@@ -1,54 +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.actions.Action.restrictTo;
-
-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.RestrictTo;
-import org.apache.causeway.applib.annotation.SemanticsOf;
-
-import lombok.RequiredArgsConstructor;
-
-
-//tag::class[]
-@Action(
-    semantics = SemanticsOf.SAFE
-    , restrictTo = RestrictTo.NO_RESTRICTIONS     // <.>
-)
-@ActionLayout(
-    describedAs =
-        "@Action(restrictTo = RestrictTo.NO_RESTRICTIONS)"
-    , associateWith = "propertyForNoRestrictions"
-    , sequence = "2"
-)
-@RequiredArgsConstructor
-public class ActionRestrictToPage_mixinUpdateRestrictToNoRestrictions {
-
-    private final ActionRestrictToPage page;
-
-    @MemberSupport public ActionRestrictToPage act(final String text) {
-        page.setPropertyForNoRestrictions(text);
-        return page;
-    }
-    @MemberSupport public String default0Act() {
-        return page.getPropertyForNoRestrictions();
-    }
-}
-//end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateRestrictToPrototyping.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateRestrictToPrototyping.java
deleted file mode 100644
index 14c79d4f22..0000000000
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPage_mixinUpdateRestrictToPrototyping.java
+++ /dev/null
@@ -1,54 +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.actions.Action.restrictTo;
-
-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.RestrictTo;
-import org.apache.causeway.applib.annotation.SemanticsOf;
-
-import lombok.RequiredArgsConstructor;
-
-
-//tag::class[]
-@Action(
-    semantics = SemanticsOf.SAFE
-    , restrictTo = RestrictTo.PROTOTYPING       // <.>
-)
-@ActionLayout(
-    describedAs =
-        "@Action(restrictTo = RestrictTo.PROTOTYPING)"
-    , associateWith = "propertyForPrototyping"
-    , sequence = "2"
-)
-@RequiredArgsConstructor
-public class ActionRestrictToPage_mixinUpdateRestrictToPrototyping {
-
-    private final ActionRestrictToPage page;
-
-    @MemberSupport public ActionRestrictToPage act(final String text) {
-        page.setPropertyForPrototyping(text);
-        return page;
-    }
-    @MemberSupport public String default0Act() {
-        return page.getPropertyForPrototyping();
-    }
-}
-//end::class[]
diff --git 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPrototypingMetaAnnotation.java
 
b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPrototypingMetaAnnotation.java
deleted file mode 100644
index 11db25b90d..0000000000
--- 
a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/Action/restrictTo/ActionRestrictToPrototypingMetaAnnotation.java
+++ /dev/null
@@ -1,40 +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.actions.Action.restrictTo;
-
-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.Action;
-import org.apache.causeway.applib.annotation.RestrictTo;
-
-//tag::class[]
-@Action(restrictTo = RestrictTo.PROTOTYPING)    // <.>
-@Inherited
-@Target({
-        ElementType.TYPE, ElementType.METHOD    // <.>
-})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ActionRestrictToPrototypingMetaAnnotation {
-
-}
-//end::class[]

Reply via email to