You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2015/05/21 17:20:48 UTC
[3/4] isis git commit: ISIS-1133: more asciidocs,
working on the annotations stuff (structure, toc).
http://git-wip-us.apache.org/repos/asf/isis/blob/a106383e/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-collectionlayout.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-collectionlayout.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-collectionlayout.adoc
index f75983c..fb7b2de 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-collectionlayout.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-collectionlayout.adoc
@@ -3,26 +3,68 @@
:_basedir: ../
:_imagesdir: images/
-IMPORTANT: TODO
+The `@CollectionLayout` annotation applies to collections, collecting together all UI hints within a single
+annotation. It is also possible to apply the annotation to actions of domain services that are acting as contributed collections.
+
+The table below summarizes the annotation's attributes.
+
+.`@Action` attributes
+[cols="2,2,4", options="header"]
+|===
+
+| Attribute
+| Values (default)
+| Description
+
+
+|xref:__a_id_reference_annotations_manpage_collectionlayout_a_code_cssclass_code[`cssClass()`]
+|
+|the css class that a collection should have, to allow more targetted styling in `application.css`
+
+
+|xref:__a_id_reference_annotations_manpage_collectionlayout_a_code_describedas_code[`describedAs()`]
+|
+|description of this collection, eg to be rendered in a tooltip.
+
+
+|xref:__a_id_reference_annotations_manpage_collectionlayout_a_code_hidden_code[`hidden()`]
+|
+|indicates where in the UI the collection should _not_ be visible in the UI (only NOWHERE or EVERWHERE/ANYWHERE)
+
+
+|xref:__a_id_reference_annotations_manpage_collectionlayout_a_named[named()]
+|
+|the name of this collection (overriding the name derived from its name in code)
+
+
+|namedEscaped(]
+|`true`,`false` (`true`)
+|whether to HTML escape the name of this property.
+
+
+|xref:__a_id_reference_annotations_manpage_collectionlayout_a_code_paged_code[`paged()`]
+|
+|the page size for instances of this class when rendered within a table.
+
+
+|xref:__a_id_reference_annotations_manpage_collectionlayout_a_code_render_code[`render()`]
+|
+|that the rendering of a collection should be performed LAZILY or EAGERLY
+
+
+|xref:__a_id_reference_annotations_manpage_collectionlayout_a_code_sortedby_code[`sortedBy()`]
+|
+|indicates that the elements in a ({@link java.util.SortedSet}) collection should be sorted according to a different order than the natural sort order, as defined by the specified `Comparator`.
+
+|===
-Title: @CollectionLayout (1.8.0)
-The `@CollectionLayout` annotation applies to collections, collecting together all UI hints within a single
-annotation.
-* `cssClass` - the css class that a collection should have, to allow more targetted styling in `application.css`
-* `describedAs` - description of this collection, eg to be rendered in a tooltip.
-* `hidden` - indicates where in the UI the collection should _not_ be visible in the UI (only NOWHERE or EVERWHERE/ANYWHERE)
-* `named` -the name of this collection (overriding the name derived from its name in code)
-* `namedEscaped` - whether to HTML escape the name of this property. Defaults to true.
-* `paged` - the page size for instances of this class when rendered within a table.
-* `render` - that the rendering of a collection should be performed LAZILY or EAGERLY
-* `sortedBy` - Indicates that the elements in a ({@link java.util.SortedSet}) collection should be sorted according to a different order than the natural sort order, as defined by the specified{@link java.util.Comparator}
For example:
-[source]
+[source,java]
----
public class ToDoItem {
@@ -40,34 +82,16 @@ public class ToDoItem {
}
----
-It is also possible to apply the annotation to actions of domain services that are acting as link:../../more-advanced-topics/how-to-01-062-How-to-decouple-dependencies-using-contributions.html[contributed collections].
-
-== See also
-
-Similar layout annotations exist for other elements of the metamodel:
-
-* link:./PropertyLayout.html[@PropertyLayout] for properties
-* link:./ActionLayout.html[@ActionLayout] for actions
-* link:./ParameterLayout.html[@ParameterLayout] for action parameters
-* link:./DomainObjectLayout.html[@DomainObjectLayout]
-* link:./DomainServiceLayout.html[@DomainServiceLayout]
-* link:./ViewModelLayout.html[@ViewModelLayout]
-
-Corresponding domain semantics:
-* link:./Collection.html[@Collection]
-== `cssClass()`
-Title: @CssClass
-____
+== anchor:reference-annotations_manpage-CollectionLayout[]`cssClass()`
-Deprecated, use instead link:./DomainObjectLayout.html[@DomainObjectLayout#cssClass()], link:./PropertyLayout.html[@PropertyLayout#cssClass()], link:./CollectionLayout.html[@CollectionLayout#cssClass()], link:./ActionLayout.html[@ActionLayout#cssClass()] and link:./ParameterLayout.html[@ParameterLayout#cssClass()], or use link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layouts].
+IMPORTANT: WIP ... this section
-____
The `CssClass` annotation applies to object and also to any object member
(property, collection or action). It is used by the Wicket viewer as a UI hint
@@ -78,7 +102,7 @@ of that particular element.
For example:
-[source]
+[source,java]
----
@CssClass("x-main")
public class ToDoItem { ... }
@@ -86,7 +110,7 @@ public class ToDoItem { ... }
or
-[source]
+[source,java]
----
public class ToDoItem {
@@ -96,13 +120,13 @@ public class ToDoItem {
}
----
-== Alternatives (`.layout.json`)
+=== Alternatives (`.layout.json`)
As an alternative to using the `@CssClass` annotation, the `.layout.json`
link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layout file]
can be specified, eg:
-[source]
+[source,javascript]
----
{
"span": 6,
@@ -123,25 +147,21 @@ can be specified, eg:
Note that this (currently) only supports class members, not classes
-== See also (1.8.0)
-The similar link:./CssClassFa-deprecated.html[CssClassFa] annotation is also used as a hint
-to apply CSS, but in particular to allow http://fortawesome.github.io/Font-Awesome/icons/[Font Awesome icons]
-to be rendered on action butotns or as the icon for classes.
+[NOTE]
+====
+The similar link:./CssClassFa-deprecated.html[CssClassFa] annotation is also used as a hint to apply CSS, but in particular to allow http://fortawesome.github.io/Font-Awesome/icons/[Font Awesome icons] to be rendered on action butotns or as the icon for classes.
+====
-== `describedAs()`
-Title: @DescribedAs
-____
+== anchor:reference-annotations_manpage-CollectionLayout[]`describedAs()`
-Deprecated, use instead link:./DomainObjectLayout.html[@DomainObjectLayout#describedAs()], link:./PropertyLayout.html[@PropertyLayout#describedAs()], link:./CollectionLayout.html[@CollectionLayout#describedAs()], link:./ActionLayout.html[@ActionLayout#describedAs()] and link:./ParameterLayout.html[@ParameterLayout#describedAs()], or use link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layouts].
-
-____
+IMPORTANT: WIP ... this section
The `@DescribedAs` annotation is used to provide a short description of
something that features on the user interface. How this description is
@@ -153,31 +173,11 @@ collections and actions), and for individual parameters within an action
method. `@DescribedAs` therefore works in a very similar manner to
`@Named` <!--(see ?)-->.
-=== Providing a description for an object
-
-To provide a description for an object, use the `@DescribedAs`
-annotation immediately before the declaration of that object class.
-
-For example:
-
-[source]
-----
-@DescribedAs("A customer who may have originally become known to us via " +
- "the marketing system or who may have contacted us directly.")
-public class ProspectiveSale {
- ...
-}
-----
-=== Providing a description for an object member
-
-Any member (property, collection or action) may provide a description.
-To specify this description, use the `@DescribedAs` annotation
-immediately before the declaration of that member.
For example:
-[source]
+[source,java]
----
public class Customer {
@DescribedAs("The name that the customer has indicated that they wish to be " +
@@ -186,44 +186,13 @@ public class Customer {
}
----
-=== Providing a description for an action parameter
-To provide a description for an individual action parameter, use the
-`@DescribedAs` annotation in-line i.e. immediately before the parameter
-declaration.
-For example:
-[source]
-----
-public class Customer {
- public Order placeOrder(
- Product product,
- @Named("Quantity")
- @DescribedAs("The quantity of the product being ordered")
- int quantity) {
- Order order = createTransientInstance(Order.class);
- order.modifyCustomer(this);
- order.modifyProduct(product);
- order.setQuantity(quantity);
- return order;
- }
- ...
-}
-----
-
-
-
-
-== `hidden()`
+== anchor:reference-annotations_manpage-CollectionLayout[]`hidden()`
-Title: @Hidden
+IMPORTANT: WIP ... this section
-____
-
-Deprecated. For object members use link:./Property.html[@Property#hidden()] or link:./PropertyLayout.html[@PropertyLayout#hidden()], link:./Collection.html[@Collection#hidden()] or link:./CollectionLayout.html[@CollectionLayout#hidden()], and link:./ActionLayout.html[@ActionLayout#hidden()]. For domain servicesm use [@DomainService#nature()]
-
-____
The `@Hidden` annotation indicates that the member (property, collection
or action) to which it is applied should never be visible to the user.
@@ -232,7 +201,7 @@ entities or values).
For example:
-[source]
+[source,java]
----
public class Customer {
@Hidden
@@ -246,7 +215,7 @@ public class Customer {
Or, applied to a service:
-[source]
+[source,java]
----
@Hidden
public class EmailService {
@@ -258,7 +227,7 @@ public class EmailService {
This annotation can also take a parameters indicating where and when it
is to be hidden. For example:
-[source]
+[source,java]
----
public class Customer {
@Hidden(when=When.ONCE_PERSISTED)
@@ -270,7 +239,7 @@ public class Customer {
would show the `Id` until the object has been saved, and then would hide
it. And:
-[source]
+[source,java]
----
public class Customer {
@Hidden(where=Where.ALL_TABLES)
@@ -352,19 +321,21 @@ defaults to `Where.ANYWHERE`, `When.ALWAYS`).
+== anchor:reference-annotations_manpage-CollectionLayout[]Named
+By default, the name of a class member (a property, collection or action) presented to the user is derived, reflectively, from the name of the member defined in the program code. To specify a different name use the `@Named `annotation immediately before the member declaration.
+[TIP]
+====
+Generally speaking it is better to rename the property, collection or action. The only common case where `@Named` is common is to rename parameters for built-in value types. Even here though a custom value type can be defined using `@Value` so that the value type is used as the parameter name. `@Named` may also be used if the name needs punctuation or other symbols in the name presented to the user.
+====
-== `named()`
-
-Title: @Named
-____
+=== named()
-Deprecated, use instead link:./DomainObjectLayout.html[@DomainObjectLayout#named()], link:./PropertyLayout.html[@PropertyLayout#named()], link:./CollectionLayout.html[@CollectionLayout#named()], link:./ActionLayout.html[@ActionLayout#named()] and link:./ParameterLayout.html[@ParameterLayout#named()], or use link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layouts].
+IMPORTANT: WIP ... this section
-____
The `@Named` annotation is used when you want to specify the way
something is named on the user interface i.e. when you do not want to
@@ -372,48 +343,11 @@ use the name generated automatically by the system. It can be applied to
objects, members (properties, collections, and actions) and to
parameters within an action method.
-____
-
-*Warning*
-
-Generally speaking it is better to rename the property, collection or
-action. The only common case where `@Named` is common is to rename
-parameters for built-in value types. Even here though a custom value
-type can be defined using `@Value` so that the value type is used as the
-parameter name. `@Named` may also be used if the name needs punctuation
-or other symbols in the name presented to the user.
-
-____
-
-=== Specifying the name of an object
-
-By default the name of an object is derived, reflectively from the class
-name. To specify a different name for an object, use the `@Named`
-annotation in front of the class declaration.
-
-For example:
-
-[source]
-----
-@Named("Customer")
-public class CustomerImpl implements Customer{
- ...
-}
-----
-
-See also the `@Plural` annotation <!--, ?-->.
-=== Specifying the name of a class member
-
-By default, the name of a class member (a property, collection or
-action) presented to the user is derived, reflectively, from the name of
-the member defined in the program code. To specify a different name use
-the `@Named
-`annotation immediately before the member declaration.
For example:
-[source]
+[source,java]
----
public class Customer {
@@ -428,42 +362,10 @@ public class Customer {
Note that the framework provides a separate and more powerful mechanism
for internationalisation.
-=== Specifying the name for an action parameter
-
-The most common usage of `@Named` is be to specify names for the
-parameters of an action. This is because the parameter name declared in
-the code for the action method cannot be picked up reflectively (by
-default, the user interface will use the type of the parameter as the
-name; for a `String` or a `Boolean`, this is almost certainly not what is
-required).
-
-To specify the name of a parameter, the `@Named` annotation is applied
-'in-line' (i.e. preceding the individual parameter declaration.
-
-For example:
-
-[source]
-----
-public class Customer {
- public Order placeOrder(
- Product product
- ,@Named("Quantity")
- int quantity) {
- Order order = newTransientInstance(Order.class);
- order.modifyCustomer(this);
- order.modifyProduct(product);
- order.setQuantity(quantity);
- return order;
- }
- ...
-}
-----
-
-An alternative is to use a value type (though this introduces additional mapping complexity for both viewers and objectstore) <!--, as described in ?-->.
-
-
+=== namedEscaped()
+IMPORTANT: WIP ... this section
@@ -471,16 +373,10 @@ An alternative is to use a value type (though this introduces additional mapping
+== anchor:reference-annotations_manpage-CollectionLayout[]`paged()`
-== `paged()`
+IMPORTANT: WIP ... this section
-Title: @Paged
-
-____
-
-Deprecated, use instead link:./CollectionLayout.html[@CollectionLayout] and link:./DomainObjectLayout.html[@DomainObjectLayout].
-
-____
This annotation is used to indicate that parented and/or standalone
collections should be paginated.
@@ -491,7 +387,7 @@ size of a standalone collection.
For example:
-[source]
+[source,java]
----
@Paged(30)
public class Order {
@@ -509,7 +405,7 @@ the configured defaults in `isis.properties` will be used.
For example:
-[source]
+[source,ini]
----
isis.viewers.paged.standalone=20
isis.viewers.paged.parented=5
@@ -523,15 +419,13 @@ of 20 for standalone collections.
-== `render()`
-Title: @Render
-____
-Deprecated, use instead link:./CollectionLayout.html[@CollectionLayout#render()]
+== anchor:reference-annotations_manpage-CollectionLayout[]`render()`
+
+IMPORTANT: WIP ... this section
-____
The `@Render` annotation is a hint for properties and collections to
indicate that a value property should be rendered lazily (rather than
@@ -557,7 +451,7 @@ of values that represent blobs or clobs.
For example:
-[source]
+[source,java]
----
public class Order {
@Render(Type.EAGERLY)
@@ -577,22 +471,18 @@ Indeed, some object stores may choose use their own specific annotations
-== `sortedBy()`
-
-Title: @SortedBy
-____
+== anchor:reference-annotations_manpage-CollectionLayout[]`sortedBy()`
-Deprecated, use instead link:./CollectionLayout.html[@CollectionLayout#sortedBy].
+IMPORTANT: WIP ... this section
-____
The `@SortedBy` annotation is an instruction hint for (`SortedSet`) collections to use the specified comparator rather than the natural ordering of the entity
(as would usually be the case).
For example, this is taken from the Isis addons example https://github.com/isisaddons/isis-app-todoapp/[todoapp] (not ASF):
-[source]
+[source,java]
----
public class ToDoItem implements Comparable<ToDoItem> {
http://git-wip-us.apache.org/repos/asf/isis/blob/a106383e/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-digits.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-digits.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-digits.adoc
index 4b0b1f4..ff9ae28 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-digits.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-digits.adoc
@@ -5,8 +5,6 @@
IMPORTANT: TODO
-
-
Title: @javax.validation.constraints.Digits
This is a stub.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/a106383e/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainobject.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainobject.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainobject.adoc
index 19f27b3..afe6161 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainobject.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainobject.adoc
@@ -3,57 +3,67 @@
:_basedir: ../
:_imagesdir: images/
-IMPORTANT: TODO
-Title: @DomainObject (1.8.0)
+The `@DomainObject` annotation applies to domain objects, collecting together all domain semantics within a single annotation.
-____
+The table below summarizes the annotation's attributes.
-stub
+.`@Action` attributes
+[cols="2,2,4", options="header"]
+|===
-____
+| Attribute
+| Values (default)
+| Description
-The `@DomainObject` annotation applies to domain objects, collecting together all domain semantics within a single annotation.
-== Source code
+|xref:__a_id_reference_annotations_manpage_domainobject_a_code_auditing_code[`auditing()`]
+|
+|
+
+
+|xref:__a_id_reference_annotations_manpage_domainobject_a_code_autocomplete_code[`autoComplete()`]
+|
+|
+
+
+|xref:__a_id_reference_annotations_manpage_domainobject_a_code_bounded_code[`bounded()`]
+|
+|
+
-See <a href="https://issues.apache.org/jira/browse/ISIS-970">ISIS-970</a> and <a href="https://github.com/apache/isis/blob/master/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java">@DomainObject</a> source code.
+|xref:__a_id_reference_annotations_manpage_domainobject_a_code_editing_code[`editing()`]
+|
+|
-== See also
-Other domain semantics:
+|xref:__a_id_reference_annotations_manpage_domainobject_a_publishing[`publishing()`]
+|
+|
-* link:./Property.html[@Property]
-* link:./Collection.html[@Collection]
-* link:./Action.html[@Action]
-* link:./Parameter.html[@Parameter]
-* link:./DomainService.html[@DomainService]
-* link:./ViewModel.html[@ViewModel]
-Corresponding view layer ("Layout") annotation:
+|`publishingPayloadFactory()`
+|
+|
-* link:./DomainObjectLayout.html[@DomainObjectLayout]
+|===
-== `auditing()`
-Title: @Audited
-____
-Deprecated, use instead link:./DomainObject.html[@DomainObject#auditing()].
+== anchor:reference-annotations_manpage-DomainObject[]`auditing()`
-____
+IMPORTANT: WIP ... this section
-This annotation, which applies only to objects, indicates that if the
-object is modified, then it should be submitted to the
-`AuditingService`, if one has been configured.
+
+This annotation, which applies only to objects, indicates that if the object is modified, then it should be submitted to the xref:__a_id_reference_services_spi_manpage_a_code_auditingservice3_code[`AuditingService3`], if one has been configured.
For example:
-[source]
+[source,java]
----
@Audited
public class Customer extends AbstractDomainObject {
@@ -64,7 +74,7 @@ public class Customer extends AbstractDomainObject {
The `AuditingService` is defined within the applib (in the
`org.apache.isis.applib.services.audit` package):
-[source]
+[source,java]
----
public interface AuditingService {
@Hidden
@@ -80,15 +90,14 @@ the mailing list to determine whether auditing is supported for other object sto
-== `autoComplete()`
-Title: @AutoComplete
-____
-Deprecated, use instead link:./DomainObject.html[@DomainObject#autoCompleteRepository].
-____
+== anchor:reference-annotations_manpage-DomainObject[]`autoComplete()`
+
+IMPORTANT: WIP ... this section
+
This annotation is to support an auto-complete capability for reference
properties and action parameters, the idea being that the user enters a
@@ -101,7 +110,7 @@ list of the type.
For example:
-[source]
+[source,java]
----
@AutoComplete(repository=Customers.class, action="autoComplete")
public class Customer extends AbstractDomainObject {
@@ -111,7 +120,7 @@ public class Customer extends AbstractDomainObject {
where:
-[source]
+[source,java]
----
public interface Customers {
@@ -121,33 +130,27 @@ public interface Customers {
}
----
-____
-{note
+[NOTE]
+====
In many cases you may require additional control. For this, you can use the `autoComplete` method prefix, associated either with link:../../how-tos/how-to-03-025-How-to-specify-an-autocomplete-for-an-action-parameter.html[action parameter] or with the link:../../how-tos/how-to-03-015-How-to-specify-an-autocomplete-for-a-property.html[property].
-}
-
-____
-
+====
-== `bounded()`
-Title: @Bounded
-____
+== anchor:reference-annotations_manpage-DomainObject[]`bounded()`
-Deprecated, use instead link:./DomainObject.html[@DomainObject#bounded()].
+IMPORTANT: WIP ... this section
-____
For immutable objects where there is a bounded set of instances, the
`@Bounded` annotation can be used.
For example:
-[source]
+[source,java]
----
@Bounded
public class County {
@@ -155,50 +158,37 @@ public class County {
}
----
-The number of instances is expected to be small enough that all instance
-can be held in memory. The viewer will use this information to render
-all the instances of this class in a drop-down list or equivalent.
+The number of instances is expected to be small enough that all instance can be held in memory. The viewer will use this information to render all the instances of this class in a drop-down list or equivalent.
-____
-*Note*
+[NOTE]
+====
+Although this is not enforced, `@Bounded` is intended for use on `final` classes. Its behaviour when used on interfaces, or classes with sub-classes is not specified
-Although this is not enforced, `@Bounded` is intended for use on
-`final` classes. Its behaviour when used on interfaces, or classes
-with sub-classes is not specified
+====
-____
+== anchor:reference-annotations_manpage-DomainObject[]`editing()`
+IMPORTANT: WIP ... this section
-== `editing()`
+[NOTE]
+====
+Fully supported by: Wicket viewer; other viewers do not yet support the `where` attribute.
+====
-Title: @Disabled
-____
-Deprecated, use instead link:./Property.html[@Property#editing()], link:./Collection.html[@Collection#editing()], and also link:./DomainObject.html[@DomainObject#editing()]
-
-*Support*
-
-* Fully supported by: Wicket viewer; other viewers do not yet support the `where` attribute.
-
-____
-
-The `@Disabled` annotation means that the member cannot be used in any
-instance of the class. When applied to the property it means that the
-user may not modify the value of that property (though it may still be
-modified programmatically). When applied to an action method, it means
-that the user cannot invoke that method.
+The `@Disabled` annotation means that the member cannot be used in any instance of the class. When applied to the property it means that the user may not modify the value of that property (though it may still be modified programmatically). When applied to an action method, it means that the user cannot invoke that method.
For example:
-[source]
+[source,java]
----
public class Customer {
@Disabled
@@ -221,7 +211,7 @@ This annotation can also take two parameter indicating where (in the UI)
it is to be disabled, and when (in the object's lifecycle) it is to be
disabled. For example:
-[source]
+[source,java]
----
public class Customer {
(when=When.UNTIL_PERSISTED)
@@ -231,7 +221,7 @@ public class Customer {
would disable the action until the object has been saved. And:
-[source]
+[source,java]
----
public class Customer {
(where=Where.PARENTED_TABLES)
@@ -308,23 +298,12 @@ defaults to `Where.ANYWHERE`, `When.ALWAYS`).
-Title: @Immutable
-
-____
-
-Deprecated, use instead link:./DomainObject.html[@DomainObject#editing()].
-
-____
-The `@Immutable` annotation may be applied to a class, and indicates to
-the framework that the state of such objects may not be changed. The
-viewers will prevent any change through the user interface, and moreover
-the object stores will reject any changes to the objects that might have
-occurred programmatically.
+The `@Immutable` annotation may be applied to a class, and indicates to the framework that the state of such objects may not be changed. The viewers will prevent any change through the user interface, and moreover the object stores will reject any changes to the objects that might have occurred programmatically.
For example:
-[source]
+[source,java]
----
@Immutable
public class Country {
@@ -335,7 +314,7 @@ public class Country {
This annotation can also take a single parameter indicating when it is
to become immutable. For example:
-[source]
+[source,java]
----
@Immutable(When.ONCE_PERSISTED)
public class Email {
@@ -366,23 +345,15 @@ defaults to `When.ALWAYS`).
-== `objectType()`
+== anchor:reference-annotations_manpage-DomainObject[]`objectType()`
-Title: @ObjectType
+IMPORTANT: WIP ... this section
-____
-
-Deprecated, use instead link:./DomainObject.html[@DomainObject#objectType()].
-
-____
-
-The `@ObjectType` annotation is used to provide a unique abbreviation for
-the object's class name. This is used internally to generate a string
-representation of an objects identity (the `Oid`).
+The `@ObjectType` annotation is used to provide a unique abbreviation for the object's class name. This is used internally to generate a string representation of an objects identity (the `Oid`).
For example:
-[source]
+[source,java]
----
@ObjectType("ORD")
public class Order {
@@ -400,17 +371,19 @@ If an `@ObjectType` is not unique, then the framework will fail to boot.
-== `publishing()`
-Title: @PublishedObject
+== anchor:reference-annotations_manpage-DomainObject[]Publishing
+
+
+This annotation on an entity type causes an events to be published by the registered implementation of a xref:__a_id_reference_services_spi_manpage_a_code_publishingservice_code[`PublishingService`] if an instance of that type is inserted, updated or deleted .
+
-____
-Deprecated, use instead link:./DomainObject.html[@DomainObject#publishing()].
+=== `publishing()`
-____
+IMPORTANT: WIP ... this section
-This annotation on an entity type causes an events to be published by the registered implementation of a `PublishingService` if an instance of that type is inserted, updated or deleted .
+=== `publishingPayloadFactory()`
-A fuller description of the publishing architecture can be found http://isis.apache.org/core/services/publishing-service.html[here].
+IMPORTANT: WIP ... this section
http://git-wip-us.apache.org/repos/asf/isis/blob/a106383e/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainobjectlayout.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainobjectlayout.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainobjectlayout.adoc
index 81cca64..a478be8 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainobjectlayout.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainobjectlayout.adoc
@@ -3,23 +3,71 @@
:_basedir: ../
:_imagesdir: images/
-IMPORTANT: TODO
-Title: @DomainObjectLayout (1.8.0)
-
The `@DomainObjectLayout` annotation applies to domain classes, collecting together all UI hints within a single
annotation.
-* `cssClass` - the css class that a domain class (type) should have, to allow more targetted styling in `application.css`
-* `describedAs` - description of this class, eg to be rendered in a tooltip.
-* `named` -the name of this class (overriding the name derived from its name in code)
-* `paged` - the page size for instances of this class when rendered within a table.
-* `plural` - the plural name of the class
+The table below summarizes the annotation's attributes.
+
+.`@Action` attributes
+[cols="2,2,4", options="header"]
+|===
+
+| Attribute
+| Values (default)
+| Description
+
+
+|xref:__a_id_reference_annotations_manpage_domainobjectlayout_a_code_bookmarking_code[`bookmarking()`]
+|
+|
+
+
+|xref:__a_id_reference_annotations_manpage_domainobjectlayout_a_code_cssclass_code[`cssClass()`]
+|
+|the css class that a domain class (type) should have, to allow more targetted styling in `application.css`
+
+
+|xref:__a_id_reference_annotations_manpage_domainobjectlayout_a_code_describedas_code[`describedAs()`]
+|
+|description of this class, eg to be rendered in a tooltip.
+
+
+
+|xref:__a_id_reference_annotations_manpage_domainobjectlayout_a_cssclassfa[`cssClassFa()`]
+|
+|the name of this class (overriding the name derived from its name in code)
+
+
+|`cssClassFaPosition()`
+|
+|the name of this class (overriding the name derived from its name in code)
+
+
+|xref:__a_id_reference_annotations_manpage_domainobjectlayout_a_code_named_code[`named()`]
+|
+|
+
+
+|xref:__a_id_reference_annotations_manpage_domainobjectlayout_a_code_paged_code[`paged()`]
+|
+|the page size for instances of this class when rendered within a table.
+
+
+|xref:__a_id_reference_annotations_manpage_domainobjectlayout_a_code_plural_code[`plural()`]
+|
+|the plural name of the class
+
+|===
+
+
+
+
For example:
-[source]
+[source,java]
----
@DomainObjectLayout(
cssClass="x-key",
@@ -34,35 +82,16 @@ public class ToDoItem {
For view models that have been annotated with `@ViewModel` (rather than `@DomainObject(nature=VIEW_MODEL)` the
equivalent link:./ViewModelLayout.html[@ViewModelLayout] can be used.
-== See also
-Similar layout annotations exist for other elements of the metamodel:
-* link:./ActionLayout.html[@ActionLayout] for actions
-* link:./CollectionLayout.html[@CollectionLayout] for collections
-* link:./PropertyLayout.html[@PropertyLayout] for properties
-* link:./ParameterLayout.html[@ParameterLayout] for action parameters
-* link:./DomainServiceLayout.html[@DomainServiceLayout]
-* link:./ViewModelLayout.html[@ViewModelLayout]
-Corresponding domain semantics:
-* link:./DomainObject.html[@DomainObject]
+== anchor:reference-annotations_manpage-DomainObjectLayout[]`bookmarking()`
+IMPORTANT: WIP ... this section
-
-== `bookmarking()`
-
-Title: @Bookmarkable
-
-____
-
-Deprecated, use instead link:./DomainObject.html[@DomainObject#bookmarking()].
-
-____
-
The `@Bookmarkable` annotation indicates that an entity or an action (with safe link:./ActionSemantics.html[action semantics]) is automatically bookmarked.
(In the Wicket viewer), a link to a bookmarked object is shown in the bookmarks panel that slides out from the left:
@@ -71,7 +100,7 @@ The `@Bookmarkable` annotation indicates that an entity or an action (with safe
For example:
-[source]
+[source,java]
----
@Bookmarkable
public class ToDoItem ... {
@@ -81,7 +110,7 @@ public class ToDoItem ... {
indicates that the `ToDoItem` class is bookmarkable, while:
-[source]
+[source,java]
----
@Named("ToDos")
public class ToDoItems {
@@ -104,7 +133,7 @@ It is also possible to nest bookmarkable entities. For example, this screenshot
For example, the `Property` entity "[OXF] Oxford Super Mall" is a root bookmark (the default), but the `Unit` child entity "[OXF-001] Unit 1" only appears as a bookmark if its parent `Property` has already been visited. This is accomplished with the following annotations:
-[source]
+[source,java]
----
@Bookmarkable
public class Property { ... }
@@ -112,7 +141,7 @@ public class Property { ... }
and
-[source]
+[source,java]
----
@Bookmarkable(BookmarkPolicy.AS_CHILD)
public abstract class Unit { ... }
@@ -122,15 +151,14 @@ The nesting can be done to any level; the Estatio screenshot also shows a bookma
-== `cssClass()`
-Title: @CssClass
-____
-Deprecated, use instead link:./DomainObjectLayout.html[@DomainObjectLayout#cssClass()], link:./PropertyLayout.html[@PropertyLayout#cssClass()], link:./CollectionLayout.html[@CollectionLayout#cssClass()], link:./ActionLayout.html[@ActionLayout#cssClass()] and link:./ParameterLayout.html[@ParameterLayout#cssClass()], or use link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layouts].
-____
+== anchor:reference-annotations_manpage-DomainObjectLayout[]`cssClass()`
+
+IMPORTANT: WIP ... this section
+
The `CssClass` annotation applies to object and also to any object member
(property, collection or action). It is used by the Wicket viewer as a UI hint
@@ -141,7 +169,7 @@ of that particular element.
For example:
-[source]
+[source,java]
----
@CssClass("x-main")
public class ToDoItem { ... }
@@ -149,7 +177,7 @@ public class ToDoItem { ... }
or
-[source]
+[source,java]
----
public class ToDoItem {
@@ -159,13 +187,13 @@ public class ToDoItem {
}
----
-== Alternatives (`.layout.json`)
+=== Alternatives (`.layout.json`)
As an alternative to using the `@CssClass` annotation, the `.layout.json`
link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layout file]
can be specified, eg:
-[source]
+[source,javascript]
----
{
"span": 6,
@@ -186,24 +214,29 @@ can be specified, eg:
Note that this (currently) only supports class members, not classes
-== See also (1.8.0)
+[NOTE]
+====
The similar link:./CssClassFa-deprecated.html[CssClassFa] annotation is also used as a hint
to apply CSS, but in particular to allow http://fortawesome.github.io/Font-Awesome/icons/[Font Awesome icons]
to be rendered on action butotns or as the icon for classes.
+====
+
+
+
+
-== `cssClassFa()`
-Title: @CssClassFa (1.8.0)
+== anchor:reference-annotations_manpage-DomainObjectLayout[]cssClassFa
-____
-Deprecated, use instead link:./DomainObjectLayout.html[@DomainObjectLayout#cssClassFa()], link:./PropertyLayout.html[@PropertyLayout#cssClassFa()], link:./ActionLayout.html[@ActionLayout#cssClassFa()] and link:./ViewModelLayout.html[@ViewModelLayout#cssClassFa()], or use link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layouts].
+=== `cssClassFa()`
+
+IMPORTANT: WIP ... this section
-____
The `CssClassFa` annotation applies to objects and also to object actions,
and is used by the Wicket viewer as a UI hint.
@@ -217,7 +250,7 @@ the object does not have a `getIconName()` method.
For example:
-[source]
+[source,java]
----
@CssClassFa("fa-check-circle")
public class ToDoItem { ... }
@@ -225,7 +258,7 @@ public class ToDoItem { ... }
or
-[source]
+[source,java]
----
public class ToDoItem {
@@ -241,13 +274,13 @@ public class ToDoItem {
There can be multiple "fa-" classes, eg to mirror or rotate the icon. There
is no need to include the "fa" class; it will be automatically appended.
-== Alternatives (`.layout.json`)
+=== Alternatives (`.layout.json`)
As an alternative to using the `@CssClass` annotation, the `.layout.json`
link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layout file]
can be specified, eg:
-[source]
+[source,javascript]
----
{
"span": 6,
@@ -275,43 +308,36 @@ can be specified, eg:
Note that this (currently) only supports class members, not classes.
-== See also
+[TIP]
+====
The similar link:./CssClass-deprecated.html[CssClass] annotation is also used as a hint
to apply CSS, but for wrapping the representation of an object or object
member so that it can be styled in an application-specific way.
+====
+
+=== `cssClassFaPosition()`
-== `describedAs()`
+IMPORTANT: WIP ... this section
-Title: @DescribedAs
-____
-Deprecated, use instead link:./DomainObjectLayout.html[@DomainObjectLayout#describedAs()], link:./PropertyLayout.html[@PropertyLayout#describedAs()], link:./CollectionLayout.html[@CollectionLayout#describedAs()], link:./ActionLayout.html[@ActionLayout#describedAs()] and link:./ParameterLayout.html[@ParameterLayout#describedAs()], or use link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layouts].
-____
-The `@DescribedAs` annotation is used to provide a short description of
-something that features on the user interface. How this description is
-used will depend upon the viewing mechanism - but it may be thought of
-as being like a 'tool tip'.
+== anchor:reference-annotations_manpage-DomainObjectLayout[]`describedAs()`
-Descriptions may be provided for objects, members (properties,
-collections and actions), and for individual parameters within an action
-method. `@DescribedAs` therefore works in a very similar manner to
-`@Named` <!--(see ?)-->.
+IMPORTANT: WIP ... this section
-=== Providing a description for an object
+The `@DescribedAs` annotation is used to provide a short description of something that features on the user interface. How this description is used will depend upon the viewing mechanism - but it may be thought of as being like a 'tool tip'.
-To provide a description for an object, use the `@DescribedAs`
-annotation immediately before the declaration of that object class.
+Descriptions may be provided for objects, members (properties, collections and actions), and for individual parameters within an action method. `@DescribedAs` therefore works in a very similar manner to `@Named`.
For example:
-[source]
+[source,java]
----
@DescribedAs("A customer who may have originally become known to us via " +
"the marketing system or who may have contacted us directly.")
@@ -320,49 +346,6 @@ public class ProspectiveSale {
}
----
-=== Providing a description for an object member
-
-Any member (property, collection or action) may provide a description.
-To specify this description, use the `@DescribedAs` annotation
-immediately before the declaration of that member.
-
-For example:
-
-[source]
-----
-public class Customer {
- @DescribedAs("The name that the customer has indicated that they wish to be " +
- "addressed as (e.g. Johnny rather than Jonathan)")
- public String getFirstName() { ... }
-}
-----
-
-=== Providing a description for an action parameter
-
-To provide a description for an individual action parameter, use the
-`@DescribedAs` annotation in-line i.e. immediately before the parameter
-declaration.
-
-For example:
-
-[source]
-----
-public class Customer {
- public Order placeOrder(
- Product product,
- @Named("Quantity")
- @DescribedAs("The quantity of the product being ordered")
- int quantity) {
- Order order = createTransientInstance(Order.class);
- order.modifyCustomer(this);
- order.modifyProduct(product);
- order.setQuantity(quantity);
- return order;
- }
- ...
-}
-----
-
@@ -372,17 +355,14 @@ public class Customer {
+== anchor:reference-annotations_manpage-DomainObjectLayout[]`named()`
+IMPORTANT: WIP ... this section
-== `named()`
-Title: @Named
-
-____
-
-Deprecated, use instead link:./DomainObjectLayout.html[@DomainObjectLayout#named()], link:./PropertyLayout.html[@PropertyLayout#named()], link:./CollectionLayout.html[@CollectionLayout#named()], link:./ActionLayout.html[@ActionLayout#named()] and link:./ParameterLayout.html[@ParameterLayout#named()], or use link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layouts].
-
-____
+By default the name of an object is derived, reflectively from the class
+name. To specify a different name for an object, use the `@Named`
+annotation in front of the class declaration.
The `@Named` annotation is used when you want to specify the way
something is named on the user interface i.e. when you do not want to
@@ -390,28 +370,16 @@ use the name generated automatically by the system. It can be applied to
objects, members (properties, collections, and actions) and to
parameters within an action method.
-____
-*Warning*
+[WARNING]
+====
+Generally speaking it is better to rename the property, collection or action. The only common case where `@Named` is common is to rename parameters for built-in value types. Even here though a custom value type can be defined using `@Value` so that the value type is used as the parameter name. `@Named` may also be used if the name needs punctuation or other symbols in the name presented to the user.
+====
-Generally speaking it is better to rename the property, collection or
-action. The only common case where `@Named` is common is to rename
-parameters for built-in value types. Even here though a custom value
-type can be defined using `@Value` so that the value type is used as the
-parameter name. `@Named` may also be used if the name needs punctuation
-or other symbols in the name presented to the user.
-
-____
-
-=== Specifying the name of an object
-
-By default the name of an object is derived, reflectively from the class
-name. To specify a different name for an object, use the `@Named`
-annotation in front of the class declaration.
For example:
-[source]
+[source,java]
----
@Named("Customer")
public class CustomerImpl implements Customer{
@@ -421,141 +389,63 @@ public class CustomerImpl implements Customer{
See also the `@Plural` annotation <!--, ?-->.
-=== Specifying the name of a class member
-By default, the name of a class member (a property, collection or
-action) presented to the user is derived, reflectively, from the name of
-the member defined in the program code. To specify a different name use
-the `@Named
-`annotation immediately before the member declaration.
-For example:
-
-[source]
-----
-public class Customer {
- public String getFirstName() { ... }
- public String getSurname() { ... }
-
- public CreditRating getCreditRating() { ... }
-}
-----
-Note that the framework provides a separate and more powerful mechanism
-for internationalisation.
+== anchor:reference-annotations_manpage-DomainObjectLayout[]`paged()`
-=== Specifying the name for an action parameter
-
-The most common usage of `@Named` is be to specify names for the
-parameters of an action. This is because the parameter name declared in
-the code for the action method cannot be picked up reflectively (by
-default, the user interface will use the type of the parameter as the
-name; for a `String` or a `Boolean`, this is almost certainly not what is
-required).
-
-To specify the name of a parameter, the `@Named` annotation is applied
-'in-line' (i.e. preceding the individual parameter declaration.
-
-For example:
-
-[source]
-----
-public class Customer {
- public Order placeOrder(
- Product product
- ,@Named("Quantity")
- int quantity) {
- Order order = newTransientInstance(Order.class);
- order.modifyCustomer(this);
- order.modifyProduct(product);
- order.setQuantity(quantity);
- return order;
- }
- ...
-}
-----
-
-An alternative is to use a value type (though this introduces additional mapping complexity for both viewers and objectstore) <!--, as described in ?-->.
-
-
-
-
-
-
-== `paged()`
-
-Title: @Paged
-
-____
-
-Deprecated, use instead link:./CollectionLayout.html[@CollectionLayout] and link:./DomainObjectLayout.html[@DomainObjectLayout].
-
-____
+IMPORTANT: WIP ... this section
This annotation is used to indicate that parented and/or standalone
collections should be paginated.
-When annotated on a collection, `@Paged` indicates the page size of a
-parented collection. When annotated on a type, `@Paged` indicates the page
-size of a standalone collection.
+When annotated on a collection, `@Paged` indicates the page size of a parented collection. When annotated on a type, `@Paged` indicates the page size of a standalone collection.
For example:
-[source]
+[source,java]
----
@Paged(30)
public class Order {
- @Paged(15)
- public List<LineItem> getDetails() {...}
}
----
-This indicates a page size of 15 for parented collections, and a page
-size of 30 for standalone collections.
+This indicates a page size of 30 for standalone collections.
When omitting a parameter value or omitting the annotation completely,
the configured defaults in `isis.properties` will be used.
For example:
-[source]
+[source,ini]
----
isis.viewers.paged.standalone=20
isis.viewers.paged.parented=5
----
-This indicates a page size of 5 for parented collections and a page size
-of 20 for standalone collections.
+IMPORTANT: TODO - update runtime config chapter.
+This indicates a page size of 5 for parented collections and a page size
+of 20 for standalone collections.
-== `plural()`
-Title: @Plural
-____
-Deprecated, use instead link:./DomainObjectLayout.html[@DomainObjectLayout#plural()].
+== anchor:reference-annotations_manpage-DomainObjectLayout[]`plural()`
-____
+IMPORTANT: WIP ... this section
-When the framework displays a collection of several objects it may use
-the plural form of the object type in the title. By default the plural
-name will be created by adding an 's' to the end of the singular name
-(whether that is the class name or another name specified using
-`@Named`). Where the single name ends in 'y' then the default plural
-name will end in 'ies' - for example a collection of `Country` objects
-will be titled 'Countries'. Where these conventions do not work, the
-programmer may specify the plural form of the name using `@Plural`.
+When the framework displays a collection of several objects it may use the plural form of the object type in the title. By default the plural name will be created by adding an 's' to the end of the singular name (whether that is the class name or another name specified using `@Named`). Where the single name ends in 'y' then the default plural name will end in 'ies' - for example a collection of `Country` objects will be titled 'Countries'. Where these conventions do not work, the programmer may specify the plural form of the name using `@Plural`.
For example:
-[source]
+[source,java]
----
@Plural("Children")
public class Child {
http://git-wip-us.apache.org/repos/asf/isis/blob/a106383e/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainservice.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainservice.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainservice.adoc
index 22a524e..40e66ff 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainservice.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainservice.adoc
@@ -3,93 +3,53 @@
:_basedir: ../
:_imagesdir: images/
-IMPORTANT: TODO
-Title: @DomainService
-
-Indicates that the (concrete) class should be automatically instantiated as a domain service.
+The `@DomainService` annotation indicates that the (concrete) class should be automatically instantiated as a domain service.
Domain services with this annotation do NOT need to be registered explicitly in `isis.properties`; they will be
discovered automatically on the CLASSPATH.
-The following attributes can be specified:
-
-*
-
-`nature` - the nature of this service: providing actions for menus, contributed actions, or neither (1.8.0)
-
-*
+The table below summarizes the annotation's attributes.
-`repositoryFor` - if this domain service acts as a repository for an entity type, specify that entity type. (This is currently informational only)
+.`@Action` attributes
+[cols="2,2,4", options="header"]
+|===
-*
+| Attribute
+| Values (default)
+| Description
-`menuOrder` - the order of the service's menu with respect to other service's (deprecated in 1.8.0)
-For example:
-
-[source]
-----
-@DomainService(menuOrder = "10", repositoryFor = ToDoItem.class)
-public class ToDoItems {
- ...
-}
-----
+|xref:__a_id_reference_annotations_manpage_domainservice_a_code_nature_code[`nature()`]
+|
+|the nature of this service: providing actions for menus, contributed actions, or neither (1.8.0)
-or:
-[source]
-----
-@DomainService(menuBar = DomainService.MenuBar.SECONDARY, menuOrder = "1")
-public class ToDoItemsFixturesService extends FixtureScripts {
- ...
-}
-----
+|xref:__a_id_reference_annotations_manpage_domainservice_a_code_repositoryfor_code[`repositoryFor()`]
+|
+|if this domain service acts as a repository for an entity type, specify that entity type. (This is currently informational only)
-It is not (currently) possible to specify the UI hints through any other means (specifically: is _not_ supported through a `.layout.json` file).
-== Source code
+|xref:__a_id_reference_annotations_manpage_domainservice_a_code_menuorder_code[`menuOrder()`]
+|
+|the order of the service's menu with respect to other service's (deprecated in 1.8.0)
-See <a href="https://issues.apache.org/jira/browse/ISIS-970">ISIS-970</a> and <a href="https://github.com/apache/isis/blob/master/core/applib/src/main/java/org/apache/isis/applib/annotation/DomainObject.java">@DomainObject</a> source code.
+|===
-== See also
-Other domain semantics:
-* link:./Property.html[@Property]
-* link:./Collection.html[@Collection]
-* link:./Action.html[@Action]
-* link:./Parameter.html[@Parameter]
-* link:./DomainObject.html[@DomainObject]
-* link:./DomainService.html[@DomainService]
-* link:./ViewModel.html[@ViewModel]
-Corresponding view layer ("Layout") annotation:
-* link:./PropertyLayout.html[@PropertyLayout]
-* link:./CollectionLayout.html[@CollectionLayout]
-* link:./ActionLayout.html[@ActionLayout]
-* link:./DomainObjectLayout.html[@DomainObjectLayout]
-* link:./DomainServiceLayout.html[@DomainServiceLayout]
-* link:./ViewModelLayout.html[@ViewModelLayout]
+== anchor:reference-annotations_manpage-DomainService[]`nature()`
+IMPORTANT: WIP ... this section
+IMPORTANT: TODO - now also VIEW_REST_ONLY
-== `natureOfService()`
-now also VIEW_REST_ONLY
-
-
-Title: @NotContributed
-
-____
-
-Deprecated, use instead link:./DomainService.html[@DomainService#nature()] to specify whether a service's actions are contributed, and use link:./ActionLayout.html[@ActionLayout#contributed()] to specify how they are contributed.
-
-____
The `@NotContributed` annotation applies only to action methods, and
specifically to the actions of services. If present, it indicates that
@@ -98,7 +58,7 @@ arguments.
For example:
-[source]
+[source,java]
----
public class OrderServices {
@NotContributed
@@ -110,17 +70,13 @@ public class OrderServices {
If the action should neither be contributed nor appear in the service's
service menu, then you could instead simply mark it as `@Hidden`.
-== Contributing of one-arg actions
+=== Contributing of one-arg actions
Actions that accept a single argument will, by default, also be contributed as an association:
-*
-
-if the action returns a single object (value or entity) then the action will be contributed as a property
-
-*
+* if the action returns a single object (value or entity) then the action will be contributed as a property
-if the action returns a list then the action will be contributed as a collection
+* if the action returns a list then the action will be contributed as a collection
This behaviour can be influenced by specifying the "As." attribute:
@@ -132,23 +88,12 @@ This behaviour can be influenced by specifying the "As." attribute:
-Title: @NotInServiceMenu
+The `@NotInServiceMenu` annotation applies only to action methods, and specifically to the actions of services. If present, it indicates that the action should not appear in the service menu for the service. It may, however, still be contributed to any of its domain object arguments.
-____
-
-Deprecated, use instead link:./DomainService.html[@DomainService#nature()] to specify whether a service's actions are visible on the menu bar.
-
-____
-
-The `@NotInServiceMenu` annotation applies only to action methods, and
-specifically to the actions of services. If present, it indicates that
-the action should not appear in the service menu for the service. It
-may, however, still be contributed to any of its domain object
-arguments.
For example:
-[source]
+[source,java]
----
public class OrderServices {
@NotInServiceMenu
@@ -159,7 +104,6 @@ public class OrderServices {
-
If the action should neither be contributed (see ?) nor appear in the
service's service menu, then you could instead simply mark it as `@Hidden`
<!--(see ?)-->.
http://git-wip-us.apache.org/repos/asf/isis/blob/a106383e/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainservicelayout.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainservicelayout.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainservicelayout.adoc
index e41389f..144a2c8 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainservicelayout.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-domainservicelayout.adoc
@@ -3,94 +3,68 @@
:_basedir: ../
:_imagesdir: images/
-IMPORTANT: TODO
-Title: @DomainServiceLayout (1.8.0)
-
The `@DomainServiceLayout` annotation applies to domain services, collecting together all view layout semantics
within a single annotation.
-*
-
-`named` - name of this class (overriding the name derived from its name in code)
-
-*
-
-`menuBar` - the menubar in which the menu that holds this service's actions should reside.
-
-*
+The table below summarizes the annotation's attributes.
-`menuOrder` - the order of the service's menu with respect to other service's (equivalent to deprecated `@DomainService#menuBar()`).
+.`@Action` attributes
+[cols="2,2,4", options="header"]
+|===
-The `menuBar` can be set to PRIMARY, SECONDARY or TERTIARY. In the Wicket viewer the PRIMARY menu bar is left-aligned,
-the SECONDARY menu bar is right aligned, and the TERTIARY menu bar is associated with the user's name (far top-right).
+| Attribute
+| Values (default)
+| Description
-== See also
-Other domain semantics:
+|xref:__a_id_reference_annotations_manpage_domainservicelayout_a_code_named_code[`named()`]
+|string, eg "Customers"
+|name of this class (overriding the name derived from its name in code)
-* link:./Property.html[@Property]
-* link:./Collection.html[@Collection]
-* link:./Action.html[@Action]
-* link:./Parameter.html[@Parameter]
-* link:./DomainObject.html[@DomainObject]
-* link:./DomainService.html[@DomainService]
-* link:./ViewModel.html[@ViewModel]
-Corresponding view layer ("Layout") annotation:
+|xref:__a_id_reference_annotations_manpage_domainservicelayout_a_code_menubar_code[`menuBar()`]
+|`PRIMARY`, `SECONDARY`, `TERTIARY` (`PRIMARY`).
+|the menubar in which the menu that holds this service's actions should reside.
-* link:./DomainServiceLayout.html[@DomainServiceLayout]
+|xref:__a_id_reference_annotations_manpage_domainservicelayout_a_code_menuorder_code[`menuOrder()`]
+|
+|the order of the service's menu with respect to other service's.
+|===
+It is not (currently) possible to specify the UI hints through any other means (specifically: is _not_ supported through a `.layout.json` file).
+== anchor:reference-annotations_manpage-DomainServiceLayout[]`named()`
-== `named()`
+IMPORTANT: WIP ... this section
-Title: @Named
-____
+By default the name of an object is derived, reflectively from the class name.
-Deprecated, use instead link:./DomainObjectLayout.html[@DomainObjectLayout#named()], link:./PropertyLayout.html[@PropertyLayout#named()], link:./CollectionLayout.html[@CollectionLayout#named()], link:./ActionLayout.html[@ActionLayout#named()] and link:./ParameterLayout.html[@ParameterLayout#named()], or use link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layouts].
+To specify a different name for an object, use the `@Named` annotation in front of the class declaration.
-____
+The `@Named` annotation is used when you want to specify the way something is named on the user interface i.e. when you do not want to use the name generated automatically by the system. It can be applied to objects, members (properties, collections, and actions) and to parameters within an action method.
-The `@Named` annotation is used when you want to specify the way
-something is named on the user interface i.e. when you do not want to
-use the name generated automatically by the system. It can be applied to
-objects, members (properties, collections, and actions) and to
-parameters within an action method.
-____
+[WARNING]
+====
+Generally speaking it is better to rename the property, collection or action. The only common case where `@Named` is common is to rename parameters for built-in value types. Even here though a custom value type can be defined using `@Value` so that the value type is used as the parameter name. `@Named` may also be used if the name needs punctuation or other symbols in the name presented to the user.
+====
-*Warning*
-
-Generally speaking it is better to rename the property, collection or
-action. The only common case where `@Named` is common is to rename
-parameters for built-in value types. Even here though a custom value
-type can be defined using `@Value` so that the value type is used as the
-parameter name. `@Named` may also be used if the name needs punctuation
-or other symbols in the name presented to the user.
-
-____
-
-=== Specifying the name of an object
-
-By default the name of an object is derived, reflectively from the class
-name. To specify a different name for an object, use the `@Named`
-annotation in front of the class declaration.
For example:
-[source]
+[source,java]
----
@Named("Customer")
public class CustomerImpl implements Customer{
@@ -100,60 +74,23 @@ public class CustomerImpl implements Customer{
See also the `@Plural` annotation <!--, ?-->.
-=== Specifying the name of a class member
-By default, the name of a class member (a property, collection or
-action) presented to the user is derived, reflectively, from the name of
-the member defined in the program code. To specify a different name use
-the `@Named
-`annotation immediately before the member declaration.
-For example:
-[source]
-----
-public class Customer {
- public String getFirstName() { ... }
- public String getSurname() { ... }
+== anchor:reference-annotations_manpage-DomainServiceLayout[]`menuBar()`
- public CreditRating getCreditRating() { ... }
-}
-----
+IMPORTANT: WIP ... this section
-Note that the framework provides a separate and more powerful mechanism
-for internationalisation.
-=== Specifying the name for an action parameter
+In the xref:__a_id_chapter_a_wicket_viewer[Wicket viewer] the `PRIMARY` menu bar is left-aligned, the `SECONDARY` menu bar is right aligned, and the `TERTIARY` menu bar is associated with the user's name (far top-right).
-The most common usage of `@Named` is be to specify names for the
-parameters of an action. This is because the parameter name declared in
-the code for the action method cannot be picked up reflectively (by
-default, the user interface will use the type of the parameter as the
-name; for a `String` or a `Boolean`, this is almost certainly not what is
-required).
-To specify the name of a parameter, the `@Named` annotation is applied
-'in-line' (i.e. preceding the individual parameter declaration.
-For example:
-[source]
-----
-public class Customer {
- public Order placeOrder(
- Product product
- ,@Named("Quantity")
- int quantity) {
- Order order = newTransientInstance(Order.class);
- order.modifyCustomer(this);
- order.modifyProduct(product);
- order.setQuantity(quantity);
- return order;
- }
- ...
-}
-----
-An alternative is to use a value type (though this introduces additional mapping complexity for both viewers and objectstore) <!--, as described in ?-->.
+== anchor:reference-annotations_manpage-DomainServiceLayout[]`menuOrder()`
+
+IMPORTANT: WIP ... this section
+
http://git-wip-us.apache.org/repos/asf/isis/blob/a106383e/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-facets.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-facets.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-facets.adoc
index 0fef90c..a01217a 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-facets.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-facets.adoc
@@ -6,10 +6,4 @@
IMPORTANT: TODO
-
-Title: @Facets
-
-The `@Facets` annotation specifies `FacetFactory` implementations and so can
-be used to run install arbitrary `Facet`s for a type. Generally this is
-not needed, but can be useful for overriding a custom programming model
-where a `FacetFactory` is not typically included.
+The `@Facets` annotation specifies `FacetFactory` implementations and so can be used to run install arbitrary `Facet`s for a type. Generally this is not needed, but can be useful for overriding a custom programming model where a `FacetFactory` is not typically included.
http://git-wip-us.apache.org/repos/asf/isis/blob/a106383e/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-homepage.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-homepage.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-homepage.adoc
index adcfa88..b58e249 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-homepage.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-homepage.adoc
@@ -8,13 +8,12 @@ IMPORTANT: TODO
Title: @HomePage
-____
-Support
+[NOTE]
+====
+Currently only by the xref:__a_id_chapter_a_wicket_viewer[Wicket Viewer].
+====
-Currently only by the Wicket viewer
-
-____
The `@HomePage` annotation should be applied to a single (no-arg) action on a domain service, and the results used as the contents for the home page.
http://git-wip-us.apache.org/repos/asf/isis/blob/a106383e/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-inject.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-inject.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-inject.adoc
index 74b2896..5b27303 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-inject.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-inject.adoc
@@ -6,10 +6,3 @@
IMPORTANT: TODO
-Title: @javax.inject.Inject
-
-____
-
-this is a stub
-
-____
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/a106383e/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-memberorder.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-memberorder.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-memberorder.adoc
index 45e3ef5..2a3eba2 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-memberorder.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-memberorder.adoc
@@ -1,4 +1,4 @@
-= anchor:reference-annotations_manpage-[]`@MemberGroupLayout`
+= anchor:reference-annotations_manpage-[]`@MemberOrder`
: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 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.
:_basedir: ../
:_imagesdir: images/
@@ -8,13 +8,7 @@ IMPORTANT: TODO
-Title: @MemberOrder
-
-____
-
-See also link:../../components/viewers/wicket/dynamic-layouts.html[dynamic layouts].
-
-____
+See also xref:__a_id_wicket_viewer_layout_a_dynamic_object_layout[dynamic object layouts].
`@MemberOrder` is the recommended mechanism for specifying the order in
which fields and/or actions are presented to the user. (`@ActionOrder`
@@ -31,7 +25,7 @@ subclasses to insert their class members as required.
For example:
-[source]
+[source,java]
----
public Class Customer {
@MemberOrder(sequence="2.1")
@@ -58,24 +52,19 @@ those that are specified. Two members may have the same sequence
specifier, but in such a case the relative ordering of those members
will be indeterminate.
-____
-
-*Note*
-Certain styles of user interface may lay out an object's properties
-and its collections separately, in which case the relative member
-order of properties and collections will be evaluated separately. In
-general, though, consider the layout of all properties and collections
-together, and of all actions together.
+[NOTE]
+====
+The xref:__a_id_chapter_a_wicket_viewer[Wicket viewer] lays out an object's properties and its collections separately, in which case the relative member order of properties and collections will be evaluated separately. In general, though, consider the layout of all properties and collections together, and of all actions together.
+====
-____
As a refinement to this, some viewers support the notion of grouping
members together. In this case the `name` attribute can be specified.
For example, the following can be used to group properties:
-[source]
+[source,java]
----
public Class Customer {
@MemberOrder(name="General", sequence="1.1")
@@ -109,7 +98,7 @@ collection (for example, to support add or remove of elements).
For example:
-[source]
+[source,java]
----
public Class Customer {
http://git-wip-us.apache.org/repos/asf/isis/blob/a106383e/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-minlength.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-minlength.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-minlength.adoc
index a5442dd..dd4e041 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-minlength.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-minlength.adoc
@@ -3,18 +3,13 @@
:_basedir: ../
:_imagesdir: images/
-IMPORTANT: TODO
+The `@MinLength` annotation is used to specify the minimum number of characters in a search of an xref:__a_id_reference_methods_prefixes_manpage_a_code_autocomplete_code[`autoComplete...()`] supporting method.
-
-Title: @MinLength
-
-The `@MinLength` annotation is used to specify the minimum number of characters in a search of an link:../../how-tos/how-to-03-025-How-to-specify-an-autocomplete-for-an-action-parameter.html[auto-complete].
-
For example:
-[source]
+[source,java]
----
public ToDoItem add(
@TypicalLength(20)
http://git-wip-us.apache.org/repos/asf/isis/blob/a106383e/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-parameter.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-parameter.adoc b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-parameter.adoc
index 8d6c437..97b0233 100644
--- a/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-parameter.adoc
+++ b/adocs/documentation/src/main/asciidoc/user-guide/_ug_reference-annotations_manpage-parameter.adoc
@@ -3,60 +3,74 @@
:_basedir: ../
:_imagesdir: images/
-IMPORTANT: TODO
+The `@Parameter` annotation applies to action parameters collecting together all domain semantics within a single annotation.
-Title: @Parameter (1.8.0)
+The table below summarizes the annotation's attributes.
-____
+.`@Action` attributes
+[cols="2,2,4", options="header"]
+|===
-stub
+| Attribute
+| Values (default)
+| Description
-____
-The `@Parameter` annotation applies to action parameters collecting together all domain semantics within a single annotation.
+|xref:__a_id_reference_annotations_manpage_parameter_a_code_maxlength_code[`maxLength()`]
+|
+|
+
+
+|xref:__a_id_reference_annotations_manpage_parameter_a_code_minlength_code[`minLength()`]
+|
+|
+
+
+|xref:__a_id_reference_annotations_manpage_parameter_a_code_mustsatisfy_code[`mustSatisfy()`]
+|
+|
+
+
+|xref:__a_id_reference_annotations_manpage_parameter_a_code_optionality_code[`optionality()`]
+|
+|
-== Source code
-See <a href="https://issues.apache.org/jira/browse/ISIS-970">ISIS-970</a> and <a href="https://github.com/apache/isis/blob/master/core/applib/src/main/java/org/apache/isis/applib/annotation/Parameter.java">@Parameter</a> source code.
+|xref:__a_id_reference_annotations_manpage_parameter_a_regex[regex()]
+|
+|
-== See also
-Other domain semantics:
+|`regexPatternFlags()`
+|
+|
-* link:./Property.html[@Property]
-* link:./Collection.html[@Collection]
-* link:./Action.html[@Action]
-* link:./DomainObject.html[@DomainObject]
-* link:./DomainService.html[@DomainService]
-* link:./ViewModel.html[@ViewModel]
-Corresponding view layer ("Layout") annotation:
+|`regexPatternReplacement()`
+|
+|
-* link:./ParameterLayout.html[@ParameterLayout]
+|===
-== `maxLength()`
-Title: @MaxLength
-____
-Deprecated, use instead link:./Property.html[@Property#maxLength()] and link:./Parameter.html[@Parameter#maxLength()] .
-____
+== anchor:reference-annotations_manpage-Parameter[]`maxLength()`
-The `@MaxLength` annotation indicates the maximum number of characters
-that the user may enter into a `String` property, or a `String`
-parameter in an action, or for a string-based value type. It is ignored
-if applied to any other type.
+IMPORTANT: WIP ... this section
+
+
+The `@MaxLength` annotation indicates the maximum number of characters that the user may enter into a `String` property, or a `String` parameter in an action, or for a string-based value type. It is ignored if applied to any other type.
For example, on a property:
-[source]
+[source,java]
----
public class Customer {
@MaxLength(30)
@@ -68,7 +82,7 @@ public class Customer {
Or, on an action parameter:
-[source]
+[source,java]
----
public class CustomerRepository {
public Customer newCustomer(
@@ -82,7 +96,7 @@ public class CustomerRepository {
Or, for a value type:
-[source]
+[source,java]
----
@Value(...)
@MaxLength(30)
@@ -100,13 +114,17 @@ parameters.
-Title: @MinLength
+
+== anchor:reference-annotations_manpage-Parameter[]`minLength()`
+
+IMPORTANT: WIP ... this section
+
The `@MinLength` annotation is used to specify the minimum number of characters in a search of an link:../../how-tos/how-to-03-025-How-to-specify-an-autocomplete-for-an-action-parameter.html[auto-complete].
For example:
-[source]
+[source,java]
----
public ToDoItem add(
@TypicalLength(20)
@@ -129,34 +147,17 @@ public List<ToDoItem> autoComplete0Add(
-== `mustSatisfy()`
-
-Title: @MustSatisfy
-
-____
-
-Deprecated, use instead link:./Property.html[@Property#mustSatisfy()] and link:./Parameter.html[@Parameter#mustSatisfy()].
-____
+== anchor:reference-annotations_manpage-Parameter[]`mustSatisfy()`
-The `@MustSatisfy` annotation allows validation to be applied to
-properties and parameters using an (implementation of a)
-`org.apache.isis.applib.spec.Specification` object.
+IMPORTANT: WIP ... this section
-For example, on a property:
-[source]
-----
-public class Customer {
- @MustSatisfy(StartWithCapitalLetterSpecification.class)
- public String getFirstName() { ... }
- ...
-}
-----
+The `@MustSatisfy` annotation allows validation to be applied to parameters using an (implementation of a) `org.apache.isis.applib.spec.Specification` object.
-Or, on an action parameter:
+For example:
-[source]
+[source,java]
----
public class CustomerRepository {
public Customer newCustomer(
@@ -176,19 +177,20 @@ proposed value.
An alternative to using `@MustSatisfy` is to define a custom value type (though this introduces additional mapping complexity for both viewers and objectstore).
+[TIP]
+====
+Can also specify on property, so the specification class can be reused.
+====
-== `optionality()`
-Title: @Optional
-____
+== anchor:reference-annotations_manpage-Parameter[]`optionality()`
-Deprecated, use instead link:./Property.html[@Property#optionality()] and link:./Parameter.html[@Parameter#optionality()].
+IMPORTANT: WIP ... this section
-____
By default, the system assumes that all properties of an object are
required, and therefore will not let the user save a new object unless a
@@ -197,26 +199,21 @@ system assumes that all parameters in an action are required and will
not let the user execute that action unless values have been specified
for each parameter.
-To indicate that either a property, or an action parameter, is optional,
-use the `@Optional` annotation.
-
-____
+To indicate that an action parameter is optional use the `@Optional` annotation.
-*Note*
-The `@Optional`annotation has no meaning for a primitive property (or
-parameter) such as `int` - because primitives will always return a
-default value (e.g. zero). If optionality is required, then use the
-corresponding wrapper class (e.g. `java.lang.Integer`).
+[TIP]
+====
+The `@Optional`annotation has no meaning for a primitive property (or parameter) such as `int` - because primitives will always return a default value (e.g. zero). If optionality is required, then use the corresponding wrapper class (e.g. `java.lang.Integer`).
+====
-____
=== Making a property optional
Annotate the getter to indicate that a property is `@Optional`. For
example:
-[source]
+[source,java]
----
public class Order {
public Product getProduct() { ... }
@@ -239,7 +236,7 @@ To indicate that an action may be invoked without having to specify a
value for a particular parameter, annotate with `@Optional`. For
example:
-[source]
+[source,java]
----
public class Customer {
public Order placeOrder(
@@ -255,15 +252,21 @@ public class Customer {
-== `regexPattern()`
+
+
+
+
+== anchor:reference-annotations_manpage-Parameter[]Regex`
Title: @RegEx
-____
-Deprecated, use instead link:./Property.html[@Property#regex()] and link:./Parameter.html[@Parameter#regex()].
+=== `regexPattern()`
+
+=== `regexPatternFlags()`
+
+=== `regexPatternReplacement()`
-____
The `@RegEx` annotation may be applied to any string property, or to any
parameter within an action method. It can also be applied to any
@@ -282,7 +285,7 @@ formatting", and `caseSensitive` defaults to false.
For example, on a property:
-[source]
+[source,java]
----
public class Customer {
@RegEx(validation = "(\\w+\\.)*\\w+@(\\w+\\.)+[A-Za-z]+")
@@ -293,7 +296,7 @@ public class Customer {
Or, on a parameter:
-[source]
+[source,java]
----
public class Customer {
public void updateEmail(
@@ -307,7 +310,7 @@ public class Customer {
Or, on a value type:
-[source]
+[source,java]
----
@Value(...)
@RegEx(validation = "(\\w+\\.)*\\w+@(\\w+\\.)+[A-Za-z]+")