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/06/16 07:42:26 UTC
[38/45] isis git commit: ISIS-1133: breaking out reference guide and
devenv guide;
moving appendices' release notes and migration notes to other docs;
improving the documentation page.
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types.adoc
new file mode 100644
index 0000000..8c14436
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types.adoc
@@ -0,0 +1,119 @@
+[[_rg_classes_value-types]]
+= Value Types
+: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/
+
+IMPORTANT: TODO
+
+
+
+.JDK Classes
+[cols="1,1", options="header"]
+|===
+
+|Type
+|Description
+
+|`java.lang.Boolean`
+|
+
+|`java.lang.Character`
+|
+
+|`java.lang.Double`
+|
+
+|`java.lang.Float`
+|
+
+|`java.lang.Integer`
+|
+
+|`java.lang.Long`
+|
+
+|`java.lang.Short`
+|
+
+|`java.lang.String`
+|
+
+|`java.math.BigDecimal`
+|
+
+|`java.math.BigInteger`
+|
+
+|`java.sql.Date`
+|
+
+|`java.sql.Time`
+|
+
+|`java.sql.Timestamp`
+|
+
+|`java.util.Date`
+|
+
+|===
+
+
+.JodaTime classes
+[cols="1,1", options="header"]
+|===
+
+|Type
+|Description
+
+|`org.joda.time.DateTime`
+|
+
+|`org.joda.time.LocalDateTime`
+|
+
+|`org.joda.time.LocalDate`
+|
+
+|===
+
+
+
+
+.Isis Applib classes
+[cols="1,1,1", options="header"]
+|===
+
+|Type
+|Description
+
+|`o.a.i.applib.value.` +
+`Blob`
+|
+
+|`o.a.i.applib.value.` +
+`Clob`
+|
+
+|`o.a.i.applib.value.` +
+`Color`
+|
+
+|`o.a.i.applib.value.` +
+`Money`
+|
+
+|`o.a.i.applib.value.` +
+`Password`
+|
+
+|===
+
+
+
+include::_rg_classes_value-types_manpage-Blob.adoc[leveloffset=+1]
+include::_rg_classes_value-types_manpage-Clob.adoc[leveloffset=+1]
+include::_rg_classes_value-types_manpage-Color.adoc[leveloffset=+1]
+include::_rg_classes_value-types_manpage-Money.adoc[leveloffset=+1]
+include::_rg_classes_value-types_manpage-Password.adoc[leveloffset=+1]
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Blob.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Blob.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Blob.adoc
new file mode 100644
index 0000000..3ac61f0
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Blob.adoc
@@ -0,0 +1,8 @@
+[[_rg_classes_value-types_manpage-Blob]]
+= `Blob`
+: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/
+
+
+IMPORTANT: TODO
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Clob.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Clob.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Clob.adoc
new file mode 100644
index 0000000..3595fbd
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Clob.adoc
@@ -0,0 +1,8 @@
+[[_rg_classes_value-types_manpage-Clob]]
+= `Clob`
+: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/
+
+
+IMPORTANT: TODO
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Color.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Color.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Color.adoc
new file mode 100644
index 0000000..45b581b
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Color.adoc
@@ -0,0 +1,9 @@
+[[_rg_classes_value-types_manpage-Color]]
+= `Color`
+: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/
+
+
+IMPORTANT: TODO
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Money.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Money.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Money.adoc
new file mode 100644
index 0000000..548bba2
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Money.adoc
@@ -0,0 +1,8 @@
+[[_rg_classes_value-types_manpage-Money]]
+= `Money`
+: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/
+
+
+IMPORTANT: TODO
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Password.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Password.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Password.adoc
new file mode 100644
index 0000000..f7e49e2
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_classes_value-types_manpage-Password.adoc
@@ -0,0 +1,8 @@
+[[_rg_classes_value-types_manpage-Password]]
+= `Password`
+: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/
+
+
+IMPORTANT: TODO
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods.adoc
new file mode 100644
index 0000000..91f146c
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods.adoc
@@ -0,0 +1,17 @@
+[[_rg_methods]]
+= Methods
+: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/
+
+
+
+The Apache Isis metamodel is built up from declaratively (ie, xref:rg.adoc#_rg_annotations[annotations]) and imperatively, from "supporting" methods and other reserved methods.
+
+This chapter documents the supporting methods and the reserved methods. It also documents (separately) the reserved methods that act as callback hooks into the persistence lifecycle of domain entities.
+
+
+include::_rg_methods_prefixes.adoc[leveloffset=+1]
+include::_rg_methods_reserved.adoc[leveloffset=+1]
+include::_rg_methods_lifecycle.adoc[leveloffset=+1]
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle.adoc
new file mode 100644
index 0000000..4bf912e
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle.adoc
@@ -0,0 +1,99 @@
+[[_rg_methods_lifecycle]]
+= Lifecycle Methods
+: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/
+
+
+
+
+The lifecycle callback methods notify a domain entity about its interaction within the persistence lifecycle. For example, the entity is notified immediately prior to being persisted, or when it is about to be updated.
+
+[WARNING]
+====
+Note that these callbacks are fired by Isis rather than JDO. In the future we may deprecate them because they duplicate functionality already available in JDO.
+
+You may therefore want to consider using the JDO API directly; see xref:rg.adoc#_rg_methods_lifecycle_jdo-api[here] for further discussion.
+====
+
+The lifecycle callback methods supported by Isis are:
+
+.Lifecycle methods (partial support)
+[cols="1,4a", options="header"]
+|===
+
+|Method
+|Description
+
+|xref:rg.adoc#_rg_methods_lifecycle_manpage-created[`created()`]
+|called when an object has just been created using xref:rg.adoc#_rg_services-api_manpage-DomainObjectContainer[`newTransientInstance()`]
+
+|xref:rg.adoc#_rg_methods_lifecycle_manpage-loaded[`loaded()`]
+|called when a (persistent) object has just been loaded from the object store.
+
+|xref:rg.adoc#_rg_methods_lifecycle_manpage-persisted[`persisted()`]
+|called when object has just been persisted from the object store.
+
+|xref:rg.adoc#_rg_methods_lifecycle_manpage-persisting[`persisting()`]
+|called when a (not-yet-persistent) object is just about to be persisted from the object store
+
+|xref:rg.adoc#_rg_methods_lifecycle_manpage-removed[`removed()`]
+|called when a (persistent) object has just been deleted from the object store
+
+|xref:rg.adoc#_rg_methods_lifecycle_manpage-removing[`removing()`]
+|called when a (persistent) object is just about to be deleted from the object store
+
+|xref:rg.adoc#_rg_methods_lifecycle_manpage-updated[`updated()`]
+|called when a (persistent) object has just been updated in the object store
+
+|xref:rg.adoc#_rg_methods_lifecycle_manpage-updating[`updating()`]
+|called when a (persistent) object is just about to be updated in the object store
+
+|===
+
+
+
+Some lifecycle methods have been deprecated:
+
+.Deprecated lifecycle methods
+[cols="1,4a", options="header"]
+|===
+
+|Method
+|Notes
+
+|`deleted()`
+|Replaced by xref:rg.adoc#_rg_methods_lifecycle_manpage-removed[`removed()`]
+
+|`deleting()`
+|Replaced by xref:rg.adoc#_rg_methods_lifecycle_manpage-removing[`removing()`]
+
+|`loading()`
+|callback for when the (persistent) object is just about to be loaded from the object store. +
+
+[WARNING]
+====
+This method is never called.
+====
+
+|`saved()`
+|Replaced by xref:rg.adoc#_rg_methods_lifecycle_manpage-persisted[`persisted()`]
+
+|`saving()`
+|Replaced by xref:rg.adoc#_rg_methods_lifecycle_manpage-persisting[`persisting()`]
+
+|===
+
+
+
+
+include::_rg_methods_lifecycle_manpage-created.adoc[leveloffset=+1]
+include::_rg_methods_lifecycle_manpage-loaded.adoc[leveloffset=+1]
+include::_rg_methods_lifecycle_manpage-persisted.adoc[leveloffset=+1]
+include::_rg_methods_lifecycle_manpage-persisting.adoc[leveloffset=+1]
+include::_rg_methods_lifecycle_manpage-removed.adoc[leveloffset=+1]
+include::_rg_methods_lifecycle_manpage-removing.adoc[leveloffset=+1]
+include::_rg_methods_lifecycle_manpage-updated.adoc[leveloffset=+1]
+include::_rg_methods_lifecycle_manpage-updating.adoc[leveloffset=+1]
+
+include::_rg_methods_lifecycle_jdo-api.adoc[leveloffset=+1]
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_jdo-api.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_jdo-api.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_jdo-api.adoc
new file mode 100644
index 0000000..2bf7e9c
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_jdo-api.adoc
@@ -0,0 +1,50 @@
+[[_rg_methods_lifecycle_jdo-api]]
+= Using the JDO API
+: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/
+
+
+
+As an alternative to relying on Isis to call lifecycle callback methods, you could instead use the JDO link:http://www.datanucleus.org/products/datanucleus/jdo/lifecycle_callbacks.html[lifecycle listener] API directly.
+
+[NOTE]
+====
+We may decide to deprecate the Isis callbacks in the future because they merely duplicate this functionality already available in JDO.
+====
+
+You can gain access to the relevant JDO API using the xref:rg.adoc#_rg_services-api_manpage-IsisJdoSupport[`IsisJdoSupport`] domain service.
+
+For example:
+
+[source,java]
+----
+@DomainService(nature=NatureOfService.DOMAIN)
+public class ObjectChangedListenerService
+ implements javax.jdo.listener.StoreLifecycleListener { // <1>
+ @Programmatic
+ @PostConstruct
+ public void init() {
+ getPmFactory().addInstanceLifecycleListener(this);
+ }
+ @Programmatic
+ @PreDestroy
+ public void tidyUp() {
+ getPmFactory().removeInstanceLifecycleListener(this);
+ }
+ private PersistenceManagerFactory getPmFactory() {
+ return jdoSupport.getPersistenceManager()
+ .getPersistenceManagerFactory(); // <2>
+ }
+ @Programmatic
+ public void preStore (InstanceLifecycleEvent event) { ... }
+ @Programmatic
+ public void postStore (InstanceLifecycleEvent event) { ... }
+ @Inject
+ IsisJdoSupport jdoSupport;
+}
+----
+<1> implement whichever callback lifecycle listeners are of interest
+<2> register on the factory so set up for every subsequent session.
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-created.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-created.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-created.adoc
new file mode 100644
index 0000000..89c4152
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-created.adoc
@@ -0,0 +1,11 @@
+[[_rg_methods_reserved_manpage-created]]
+= `created()`
+: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/
+
+
+The `created()` lifecycle callback method is called when an object has just been created using xref:rg.adoc#_rg_services-api_manpage-DomainObjectContainer[`newTransientInstance()`]
+
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-loaded.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-loaded.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-loaded.adoc
new file mode 100644
index 0000000..9a5fa76
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-loaded.adoc
@@ -0,0 +1,10 @@
+[[_rg_methods_reserved_manpage-loaded]]
+= `loaded()`
+: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/
+
+
+
+The `loaded()` lifecycle callback method is called when a (persistent) object has just been loaded from the object store.
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-persisted.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-persisted.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-persisted.adoc
new file mode 100644
index 0000000..5f1e683
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-persisted.adoc
@@ -0,0 +1,12 @@
+[[_rg_methods_reserved_manpage-persisted]]
+= `persisted()`
+: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/
+
+
+
+The `persisted()` lifecycle callback method is called when object has just been persisted from the object store.
+
+See also xref:rg.adoc#_rg_methods_lifecycle_manpage-persisting[`persisting()`].
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-persisting.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-persisting.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-persisting.adoc
new file mode 100644
index 0000000..96afbe8
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-persisting.adoc
@@ -0,0 +1,12 @@
+[[_rg_methods_reserved_manpage-persisting]]
+= `persisting()`
+: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/
+
+
+
+The `persisting()` lifecycle callback method is called when a (not-yet-persistent) object is just about to be persisted from the object store
+
+See also xref:rg.adoc#_rg_methods_lifecycle_manpage-persisted[`persisted()`].
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-removed.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-removed.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-removed.adoc
new file mode 100644
index 0000000..6a85b5e
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-removed.adoc
@@ -0,0 +1,12 @@
+[[_rg_methods_reserved_manpage-removed]]
+= `removed()`
+: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/
+
+
+
+The `removed()` lifecycle callback method is called when a (persistent) object has just been deleted from the object store
+
+See also xref:rg.adoc#_rg_methods_lifecycle_manpage-removing[`removing()`].
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-removing.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-removing.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-removing.adoc
new file mode 100644
index 0000000..b45bc94
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-removing.adoc
@@ -0,0 +1,12 @@
+[[_rg_methods_reserved_manpage-removing]]
+= `removing()`
+: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/
+
+
+
+The `removing()` lifecycle callback method is called when a (persistent) object is just about to be deleted from the object store
+
+See also xref:rg.adoc#_rg_methods_lifecycle_manpage-removed[`removed()`].
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-updated.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-updated.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-updated.adoc
new file mode 100644
index 0000000..b683b5f
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-updated.adoc
@@ -0,0 +1,14 @@
+[[_rg_methods_reserved_manpage-updated]]
+= `updated()`
+: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/
+
+
+
+
+
+The `updated()` lifecycle callback method is called when a (persistent) object has just been updated in the object store
+
+See also xref:rg.adoc#_rg_methods_lifecycle_manpage-updating[`updating()`].
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-updating.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-updating.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-updating.adoc
new file mode 100644
index 0000000..b92ba8b
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_lifecycle_manpage-updating.adoc
@@ -0,0 +1,10 @@
+[[_rg_methods_reserved_manpage-updating]]
+= `updating()`
+: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/
+
+
+The `updating()` lifecycle callback method is called when a (persistent) object is just about to be updated in the object store
+
+See also xref:rg.adoc#_rg_methods_lifecycle_manpage-updated[`updated()`].
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes.adoc
new file mode 100644
index 0000000..7084c1f
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes.adoc
@@ -0,0 +1,219 @@
+[[_rg_methods_prefixes]]
+= Supporting Method Prefixes
+: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/
+
+
+
+Supporting methods are those that are associated with properties, collections and actions, providing additional imperative business rule checking and behaviour to be performed when the user interacts with those object members.
+
+This association is performed by name matching. Thus, a property called "firstName", derived from a method `getFirstName()` may have supporting methods `hideFirstName()`, `disableFirstName()` and `validateFirstName()`. Supporting methods are, therefore, each characterized by their own particular prefix.
+
+
+[NOTE]
+====
+Using name matching to associate supporting methods generally works very well, but of course if an object member's method is renamed, there's always the risk that the developer forgets to rename the supporting method; the supporting methods become "orphaned".
+
+Apache Isis checks for this automatically, and will fail-fast (fail to boot) if any orphaned methods are located. A suitable error message is logged so that the issue can be easily diagnosed.
+====
+
+
+The table below lists the method prefixes that are recognized as part of Apache Isis' default programming model.
+
+.Recognized Method Prefixes
+[cols="2,1,1,1,1,1,4a", options="header"]
+|===
+
+|Prefix
+|Object
+|Property
+|Collection
+|Action
+|Action +
+Param
+|Description
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-addTo[`addTo...()`]
+|
+|
+|Y
+|
+|
+|add object to a collection +
+
+[NOTE]
+====
+Directly mutable collections are not currently supported by the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer].
+====
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-removeFrom[`removeFrom...()`]`
+
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-autoComplete[`autoComplete...()`]
+|
+|Y
+|
+|
+|Y
+|Return a list of matching elements for a property or an action parameter. +
+
+Alternatively, can specify for a class using xref:rg.adoc#_rg_annotations_manpage-DomainObject_autoCompleteRepository[`@DomainObject` +
+`#autoCompleteRepository`] +
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-choices[`choices...()`]
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-choices[`choices...()`]
+|
+|Y
+|
+|
+|Y
+|Provide list of choices for a property or action parameter. +
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-autoComplete[`autoComplete...()`].
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-clear[`clear...()`]
+|
+|Y
+|
+|
+|
+|Clear a property (set it to null). +
+
+Allows business logic to be placed apart from the setter. +
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-modify[`modify...()`]
+
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-default[`default...()`]
+|
+|Y
+|
+|
+|Y
+|Default value for a property or an action parameter.
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-disable[`disable...()`]
+|Y
+|Y
+|Y
+|Y
+|
+|Disables (makes read-only) a property, a collection or an action.
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-get[`get...()`]
+|
+|Y
+|Y
+|
+|
+|Access the value of a property or collection. +
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-set[`set...()`].
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-hide[`hide...()`]
+|
+|Y
+|Y
+|Y
+|
+|Hides a property, a collection or an action.
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-modify[`modify...()`]
+|
+|Y
+|
+|
+|
+|Modify a property (set it to a non-null) value. +
+
+Allows business logic to be placed apart from the setter. +
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-clear[`clear...()`]`.
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-removeFrom[`removeFrom...()`]
+|
+|
+|Y
+|
+|
+|remove object from a collection. +
+
+[NOTE]
+====
+Directly mutable collections are not currently supported by the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer].
+====
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-addTo[`addTo...()`]`
+
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-set[`set...()`]
+|
+|Y
+|Y
+|
+|
+|Sets the value of a property or a collection.
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-validate[`validate...()`]
+|Y
+|
+|
+|Y
+|Y
+|Check that a proposed value of a property or a set of action parameters or a single action parameter is valid. +
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-validateAddTo[`validateAddTo...()`] and xref:rg.adoc#_rg_methods_prefixes_manpage-validateRemoveFrom[`validateRemoveFrom...()`] to validate modifications to collections.
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-validateAddTo[`validate +
+AddTo...()`]
+|
+|Y
+|
+|
+|
+|Check that a proposed object to add to a collection is valid. +
+
+[NOTE]
+====
+Directly mutable collections are not currently supported by the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer].
+====
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-validateRemoveFrom[`validateRemoveFrom...()`], and xref:rg.adoc#_rg_methods_prefixes_manpage-validate[`validate...()`] for properties and actions.
+
+|xref:rg.adoc#_rg_methods_prefixes_manpage-validateRemoveFrom[`validate +
+RemoveFrom...()`]
+|
+|Y
+|
+|
+|
+|Check that a proposed object to remove from a collection is valid. +
+
+[NOTE]
+====
+Directly mutable collections are not currently supported by the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer].
+====
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-validateAddTo[`validateAddTo...()`], and xref:rg.adoc#_rg_methods_prefixes_manpage-validate[`validate...()`] for properties and actions.
+
+|===
+
+
+
+include::_rg_methods_prefixes_manpage-addTo.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-autoComplete.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-choices.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-clear.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-default.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-disable.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-get.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-hide.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-modify.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-removeFrom.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-set.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-validate.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-validateAddTo.adoc[leveloffset=+1]
+include::_rg_methods_prefixes_manpage-validateRemoveFrom.adoc[leveloffset=+1]
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-addTo.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-addTo.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-addTo.adoc
new file mode 100644
index 0000000..a949ac8
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-addTo.adoc
@@ -0,0 +1,37 @@
+[[_rg_methods_prefixes_manpage-addTo]]
+= `addTo...()`
+: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/
+
+
+
+The `addTo...()` supporting method is called whenever an object is added to a collection. Its purpose is to allow additional business logic to be performed.
+
+
+[NOTE]
+====
+Directly mutable collections are not currently supported by the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer]. The suggested workaround is to simply define an action.
+====
+
+
+For example:
+
+[source,java]
+----
+public class LibraryMember {
+ public SortedSet<Book> getBorrowed() { ... }
+ public void setBorrowed(SortedSet<Book> borrowed) { ... }
+ public void addToBorrowed(Book book) {
+ getBorrowed().add(book); // <1>
+ reminderService.addReminder(this, book, clock.today().plusDays(21)); // <2>
+ }
+ public void removeFromBorrowed(Book book) { ... }
+ ...
+}
+----
+<1> update the collection
+<2> perform some additional business logic
+
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-removeFrom[`removeFrom...()`]`
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-autoComplete.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-autoComplete.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-autoComplete.adoc
new file mode 100644
index 0000000..43b47a7
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-autoComplete.adoc
@@ -0,0 +1,91 @@
+[[_rg_methods_prefixes_manpage-autoComplete]]
+= `autoComplete...()`
+: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/
+
+
+
+The `autoComplete...()` supporting method is called for action parameters and for properties to find objects from a drop-down list box. The use case is when the number of candidate objects is expected to be large, so the user is required to enter some characters to narrow the search down.
+
+[TIP]
+====
+If the number of candidate objects is comparatively small, then use xref:rg.adoc#_rg_methods_prefixes_manpage-choices[`choices...()`] supporting method instead.
+====
+
+The signature of the supporting method depends on whether it is for a parameter or a property.
+
+
+== Parameters
+
+For an action parameter in (0-based) position _N_, and of type `T`, the signature is:
+
+[source,java]
+----
+public Collection<T> autoCompleteNXxx(String search) { ... }
+----
+
+
+For example:
+
+[source,java]
+----
+public class ShoppingCartItem {
+ @Property(editing=Editing.DISABLED)
+ public Product getProduct() { ... }
+ public void setProduct(Product product) { ... }
+
+ @Property(editing=Editing.DISABLED)
+ public int getQuantity() { ... }
+ public void setQuantity(int quantity) { ... }
+
+ @Action(semantics=SemanticsOf.IDEMPOTENT)
+ public ShoppingCartItem updateProduct(
+ Product product,
+ @ParameterLayout(named="Quantity")
+ final int quantity) {
+ setProduct(product);
+ setQuantity(quantity);
+ }
+ public Collection<Product> autoComplete0UpdateProduct( // <1>
+ @MinLength(3) String search // <2>
+ ) {
+ ...
+ }
+ ...
+}
+----
+<1> `product` is the 0th argument of the action.
+<2> the xref:rg.adoc#_rg_annotations_manpage-MinLength[`@MinLength`] annotation specifies the minimum number of characters that must be entered before a search is performed for matching objects
+
+
+
+== Properties
+
+For a property of type `T`, the signature is:
+
+[source,java]
+----
+public Collection<T> autoCompleteXxx(String search) { ... }
+----
+
+
+For example:
+
+[source,java]
+----
+public class ShoppingCartItem {
+ public Product getProduct() { ... }
+ public void setProduct(Product product) { ... }
+
+ public Collection<Product> autoCompleteProduct(
+ @MinLength(3) String search // <1>
+ ) {
+ ...
+ }
+ ...
+}
+----
+<1> the xref:rg.adoc#_rg_annotations_manpage-MinLength[`@MinLength`] annotation specifies the minimum number of characters that must be entered before a search is performed for matching objects
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-choices.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-choices.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-choices.adoc
new file mode 100644
index 0000000..c333132
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-choices.adoc
@@ -0,0 +1,143 @@
+[[_rg_methods_prefixes_manpage-choices]]
+= `choices...()`
+: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/
+
+
+
+The `choices...()` supporting method is called for both action parameters and for properties, to find objects from a drop-down list box. Unlike xref:rg.adoc#_rg_methods_prefixes_manpage-autoComplete[`autoComplete...()`], the use case is when the number of objects is comparatively small and can be selected from a drop-down without any additional filtering.
+
+The signature of the supporting method depends on whether it is for an action parameter or a property.
+
+
+== Parameters
+
+For an action parameter in (0-based) position _N_, and of type `T`, the signature is:
+
+[source,java]
+----
+public Collection<T> choicesNXxx() { ... }
+----
+
+
+For example:
+
+[source,java]
+----
+public class ShoppingCartItem {
+ @Property(editing=Editing.DISABLED)
+ public Product getProduct() { ... }
+ public void setProduct(Product product) { ... }
+
+ @Property(editing=Editing.DISABLED)
+ public int getQuantity() { ... }
+ public void setQuantity(int quantity) { ... }
+
+ @Action(semantics=SemanticsOf.IDEMPOTENT)
+ public ShoppingCartItem updateProduct(
+ Product product,
+ @ParameterLayout(named="Quantity")
+ final Integer quantity) {
+ setProduct(product);
+ setQuantity(quantity);
+ }
+ public Collection<Integer> choices1UpdateProduct() {
+ return Arrays.asList(1,2,3,5,10,25,50,100);
+ }
+ ...
+}
+----
+
+
+=== Dependent Choices
+
+Action parameters also support the notion of dependent choices, whereby the list of choices is dependent upon the value of some other argument.
+
+An example can be found in the (non-ASF) http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp], whereby `ToDoItem`s are categorized and then can also be subcategorized:
+
+image::{_imagesdir}reference-methods/prefixes/choices/dependent.png[width="800px",link="{_imagesdir}reference-methods/prefixes/choices/dependent.png"]
+
+
+
+This functionality is actually implemented as a xref:ug.adoc#_ug_how-tos_contributed-members[contributed action], so the code for this is:
+
+[source,java]
+----
+@DomainService(nature = NatureOfService.VIEW_CONTRIBUTIONS_ONLY)
+public class UpdateCategoryContributions ... {
+ @ActionLayout(
+ describedAs = "Update category and subcategory"
+ )
+ @Action(semantics = SemanticsOf.IDEMPOTENT)
+ public Categorized updateCategory(
+ final Categorized item, // <1>
+ final Category category,
+ @Parameter(optionality = Optionality.OPTIONAL)
+ final Subcategory subcategory) {
+ item.setCategory(category);
+ item.setSubcategory(subcategory);
+ return item;
+ }
+ public List<Subcategory> choices2UpdateCategory( // <2>
+ final Categorized item, // <3>
+ final Category category) { // <4>
+ return Subcategory.listFor(category);
+ }
+ ...
+}
+----
+<1> `ToDoItem` implements `Categorized`
+<2> subcategory is the 2-th argument (0-based)
+<3> the item contributed to
+<4> the category selected
+
+
+Dependent choices are not restricted to enums, however. Going back to the shopping cart example shown above, the choices for the `quantity` parameter could be dependent upon the selected `Product`:
+
+
+[source,java]
+----
+public class ShoppingCartItem {
+ ...
+ @Action(semantics=SemanticsOf.IDEMPOTENT)
+ public ShoppingCartItem updateProduct(
+ Product product,
+ @ParameterLayout(named="Quantity")
+ final Integer quantity) {
+ setProduct(product);
+ setQuantity(quantity);
+ }
+ public Collection<Integer> choices1UpdateProduct(Product product) {
+ return productService.quantityChoicesFor(product); // <1>
+ }
+ ...
+}
+----
+<1> `productService` is a (fictitous) injected service that knows what the quantity choices should be for any given product
+
+
+== Properties
+
+For a property of type `T`, the signature is:
+
+[source,java]
+----
+public Collection<T> choicesXxx() { ... }
+----
+
+
+For example:
+
+[source,java]
+----
+public class ShoppingCartItem {
+ public Product getProduct() { ... }
+ public void setProduct(Product product) { ... }
+
+ public Collection<Product> choicesProduct() {
+ ...
+ }
+----
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-clear.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-clear.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-clear.adoc
new file mode 100644
index 0000000..1c8646a
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-clear.adoc
@@ -0,0 +1,32 @@
+[[_rg_methods_prefixes_manpage-clear]]
+= `clear...()`
+: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/
+
+
+
+The `clear...()` supporting method is called -- instead of the setter -- whenever an (optional) property is to be set to `null`. Its purpose is to allow additional business logic to be performed.
+
+
+For example:
+
+[source,java]
+----
+public class LibraryMember {
+ public Title getFavoriteTitle() { ... }
+ public void setFavoriteTitle(Title title) { ... }
+ public void modifyFavoriteTitle(Title title) { ... }
+ public void clearFavoriteTitle() {
+ if(getTitle() == null) { return; }
+ setFavoriteTitle(null); // <1>
+ titleFavoritesService.decrement(title); // <2>
+ }
+ ...
+}
+----
+<1> update the property
+<2> perform some additional business logic
+
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-modify[`modify...()`]`
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-default.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-default.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-default.adoc
new file mode 100644
index 0000000..df43387
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-default.adoc
@@ -0,0 +1,129 @@
+[[_rg_methods_prefixes_manpage-default]]
+= `default...()`
+: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/
+
+
+
+The `default...()` supporting method is called for action parameters to return the initial argument value. This may be some sensible default (eg today's date, or 0 or 1), or -- for an action that is modifying the state of an object -- might default to the current value of a corresponding property.
+
+The method is _also_ called for properties in the case when an object is newly instantiated using xref:rg.adoc#_rg_services-api_manpage-DomainObjectContainer[`DomainObjectContainer#newTransientInstance(...)`]. This is a much less common use case. If a default is not specified then properties are initialized to a default based on their type (eg 0 or `false`).
+
+The signature of the supporting method depends on whether it is for an action parameter or a property.
+
+
+== Parameters
+
+For an action parameter in (0-based position n), and of type `T`, the signature is:
+
+[source,java]
+----
+public T defaultNXxx() { ... }
+----
+
+
+For example:
+
+[source,java]
+----
+public class ShoppingCartItem {
+ @Property(editing=Editing.DISABLED)
+ public Product getProduct() { ... }
+ public void setProduct(Product product) { ... }
+
+ @Property(editing=Editing.DISABLED)
+ public int getQuantity() { ... }
+ public void setQuantity(int quantity) { ... }
+
+ @Action(semantics=SemanticsOf.IDEMPOTENT)
+ public ShoppingCartItem updateProduct(
+ Product product,
+ @ParameterLayout(named="Quantity")
+ final Integer quantity) {
+ setProduct(product);
+ setQuantity(quantity);
+ }
+ public Product default0UpdateProduct() { // <1>
+ return getProduct();
+ }
+ public int default1UpdateProduct() { // <2>
+ return getQuantity();
+ }
+ ...
+}
+----
+<1> default the 0-th parameter using the current value of the `product` property
+<2> default the 1-th parameter using the current value of the `quantity` property
+
+
+
+Defaults are also supported (of course) for xref:ug.adoc#_ug_how-tos_contributed-members[contributed actions]. For example, here is a contributed action for updating category/subcategory of the (non-ASF) http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp]:
+
+[source,java]
+----
+@DomainService(nature = NatureOfService.VIEW_CONTRIBUTIONS_ONLY)
+public class UpdateCategoryContributions ... {
+ @ActionLayout(
+ describedAs = "Update category and subcategory"
+ )
+ @Action(semantics = SemanticsOf.IDEMPOTENT)
+ public Categorized updateCategory(
+ final Categorized item, // <1>
+ final Category category,
+ @Parameter(optionality = Optionality.OPTIONAL)
+ final Subcategory subcategory) {
+ item.setCategory(category);
+ item.setSubcategory(subcategory);
+ return item;
+ }
+ public Category default1UpdateCategory( // <2>
+ final Categorized item) {
+ return item != null? item.getCategory(): null;
+ }
+ public Subcategory default2UpdateCategory( // <3>
+ final Categorized item) {
+ return item != null? item.getSubcategory(): null;
+ }
+}
+----
+<1> `ToDoItem` implements `Categorized`
+<2> defaults the 1-th parameter using the item's `category` property
+<3> defaults the 2-th parameter using the item's `subcategory` property
+
+
+
+
+
+== Properties
+
+For a property of type `T`, the signature is:
+
+[source,java]
+----
+public T defaultXxx() { ... }
+----
+
+
+For example:
+
+[source,java]
+----
+public class ShoppingCartItem {
+ public int getQuantity() { ... }
+ public void setQuantity(int quantity) { ... }
+
+ public int defaultProduct() {
+ return 1;
+ }
+----
+
+
+=== Alternatives
+
+There are, in fact, two other ways to set properties of a newly instantiated object to default values.
+
+The first is to use the xref:rg.adoc#_rg_methods_lifecycle_manpage-created[`created()`] callback, called by the framework when xref:rg.adoc#_rg_services-api_manpage-DomainObjectContainer[`DomainObjectContainer#newTransientInstance(...)`] is called. This method is called after any dependencies have been injected into the service.
+
+The second is more straightforward: simply initialize properties in the constructor. However, this cannot use any injected services as they will not have been initialized.
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-disable.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-disable.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-disable.adoc
new file mode 100644
index 0000000..14803c5
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-disable.adoc
@@ -0,0 +1,93 @@
+[[_rg_methods_prefixes_manpage-disable]]
+= `disable...()`
+: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/
+
+
+
+
+The `disable...()` supporting method is called for properties, collections and actions. It allows the modification of the property/collection to be vetoed (ie made read-only) and to prevent the invocation of the action ("grey it out").
+
+[NOTE]
+====
+Directly mutable collections are not currently supported by the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer]; they are always implicitly disabled.
+====
+
+Typically modification/invocation is vetoed based on the state of the domain object being interacted with, though it could be any reason at all (eg the current date/time of the interaction, or the state of some other related data such as stock levels, or the identity of the calling user).
+
+
+The reason for vetoing a modification/invocation is normally returned as a string. However, Isis' xref:ug.adoc#_ug_more-advanced_i18n[i18n support] extends this so that reasons can be internationalized.
+
+
+
+== Actions
+
+For an action the signature of the supporting method is:
+
+[source,java]
+----
+public String disableXxx(...) { ... }
+----
+
+where the returned string is the reason the action invocation is vetoed (or `null` if not vetoed), and the supporting method takes the same parameter types as the action itself.
+
+
+
+For example:
+
+[source,java]
+----
+public class Customer {
+ public boolean isBlacklisted() { ... }
+
+ public Order placeOrder(
+ final Product product,
+ @ParameterLayout(named="Quantity")
+ final int quantity) {
+ ...
+ }
+ public String disablePlaceOrder(
+ final Product product,
+ final int quantity
+ ) {
+ return isBlacklisted()
+ ? "Blacklisted customers cannot place orders"
+ : null;
+ }
+ ...
+}
+----
+
+
+
+== Properties and Collections
+
+For both properties and collections the signature of the supporting method is:
+
+[source,java]
+----
+public String disableXxx() { ... }
+----
+
+where the returned string is the reason the modification is vetoed (or `null` if not vetoed).
+
+
+
+For example:
+
+[source,java]
+----
+public class Customer {
+ public boolean isBlacklisted() { ... }
+
+ public BigDecimal getCreditLimit() { ... }
+ public void setCreditLimit(BigDecimal creditLimit) { ... }
+ public String disableCreditLimit() {
+ return isBlacklisted()
+ ? "Cannot change credit limit for blacklisted customers"
+ : null;
+ }
+ ...
+}
+----
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-get.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-get.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-get.adoc
new file mode 100644
index 0000000..4b00cf4
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-get.adoc
@@ -0,0 +1,19 @@
+[[_rg_methods_prefixes_manpage-get]]
+= `get...()`
+: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/
+
+
+
+The `get...()` prefix is simply the normal JavaBean getter prefix that denotes properties or collections.
+
+When Apache Isis builds its metamodel, it first searches for the getter methods, characterizing them as either properties or collections based on the return type. It then refines the metamodel based on the presence of annotations and supporting methods.
+
+All remaining `public` methods (that do not use one of the Isis prefixes) are interpreted as actions.
+
+Any methods "left over" that _do_ use one of the Isis prefixes, are interpreted to be orphaned. Isis "fails-fast" and will not boot, instead printing an error message to the log so that the issue can be easily diagnosed.
+
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-set[`set...()`].
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-hide.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-hide.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-hide.adoc
new file mode 100644
index 0000000..93aaaf6
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-hide.adoc
@@ -0,0 +1,82 @@
+[[_rg_methods_prefixes_manpage-hide]]
+= `hide...()`
+: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/
+
+
+
+The `hide...()` supporting method is called for properties, collections and actions. It allows the property/collection to be completely hidden from view.
+
+It's comparatively rare for properties or collections to be imperatively hidden from view, but actions are sometimes hidden or shown visible (as opposed to being just xref:rg.adoc#_rg_methods_prefixes_manpage-disable[disabled], ie greyed out).
+
+
+== Actions
+
+For an action the signature of the supporting method is either:
+
+[source,java]
+----
+public bool hideXxx(...) { ... }
+----
+
+where the supporting method takes the same parameter types as the action itself, or more simply:
+
+[source,java]
+----
+public bool hideXxx() { ... }
+----
+
+with no parameters at all. Returning `true` will hide the action, returning `false` leaves it visible.
+
+
+For example:
+
+[source,java]
+----
+public class Customer {
+ public boolean isBlacklisted() { ... }
+
+ public Order placeOrder(
+ final Product product,
+ @ParameterLayout(named="Quantity")
+ final int quantity) {
+ ...
+ }
+ public boolean hidePlaceOrder() {
+ return isBlacklisted();
+ }
+ ...
+}
+----
+
+
+
+== Properties and Collections
+
+For both properties and collections the signature of the supporting method is:
+
+[source,java]
+----
+public boolean hideXxx() { ... }
+----
+
+where returning `true` will hide the property/collection, returning `false` leaves it visible.
+
+
+
+For example:
+
+[source,java]
+----
+public class Customer {
+ public boolean isBlacklisted() { ... }
+
+ public BigDecimal getCreditLimit() { ... }
+ public void setCreditLimit(BigDecimal creditLimit) { ... }
+ public boolean hideCreditLimit() {
+ return isBlacklisted();
+ }
+ ...
+}
+----
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-modify.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-modify.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-modify.adoc
new file mode 100644
index 0000000..87160a0
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-modify.adoc
@@ -0,0 +1,37 @@
+[[_rg_methods_prefixes_manpage-modify]]
+= `modify...()`
+: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/
+
+
+
+The `modify...()` supporting method is called -- instead of the setter -- whenever a property has been set to be set to a new value. Its purpose is to allow additional business logic to be performed.
+
+
+For example:
+
+[source,java]
+----
+public class LibraryMember {
+ public Title getFavoriteTitle() { ... }
+ public void setFavoriteTitle(Title title) { ... }
+ public void modifyFavoriteTitle(Title title) {
+ if(getTitle() != null) {
+ titleFavoritesService.decrement(getTitle()); // <1>
+ }
+ setFavoriteTitle(title); // <2>
+ titleFavoritesService.decrement(title); // <3>
+ }
+ public void clearFavoriteTitle() { ... }
+ ...
+}
+----
+<1> perform some additional business logic
+<2> update the property
+<3> perform some additional business logic
+
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-clear[`clear...()`]`
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-removeFrom.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-removeFrom.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-removeFrom.adoc
new file mode 100644
index 0000000..cd0a985
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-removeFrom.adoc
@@ -0,0 +1,37 @@
+[[_rg_methods_prefixes_manpage-removeFrom]]
+= `removeFrom...()`
+: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/
+
+
+
+The `removeFrom...()` supporting method is called whenever an object is removed from a collection. Its purpose is to allow additional business logic to be performed.
+
+
+[NOTE]
+====
+Directly mutable collections are not currently supported by the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer]. The suggested workaround is to simply define an action.
+====
+
+
+For example:
+
+[source,java]
+----
+public class LibraryMember {
+ public SortedSet<Book> getBorrowed() { ... }
+ public void setBorrowed(SortedSet<Book> borrowed) { ... }
+ public void addToBorrowed(Book book) { ... }
+ public void removeFromBorrowed(Book book) {
+ getBorrowed().remove(book); // <1>
+ reminderService.removeReminder(this, book); // <2>
+ }
+ ...
+}
+----
+<1> update the collection
+<2> perform some additional business logic
+
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-addTo[`addTo...()`]`
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-set.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-set.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-set.adoc
new file mode 100644
index 0000000..2e39781
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-set.adoc
@@ -0,0 +1,13 @@
+[[_rg_methods_prefixes_manpage-set]]
+= `set...()`
+: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/
+
+
+
+
+The `set...()` prefix is simply the normal JavaBean setter prefix that denotes writeable properties or collections.
+
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-get[`get...()`].
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-validate.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-validate.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-validate.adoc
new file mode 100644
index 0000000..cbf5086
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-validate.adoc
@@ -0,0 +1,113 @@
+[[_rg_methods_prefixes_manpage-validate]]
+= `validate...()`
+: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/
+
+
+
+The `validate...()` supporting method is called for properties, actions and action parameters. It allows the proposed new value for a property to be rejected, or the proposed argument of an action parameter to be rejected, or to reject a whole set of action arguments for an actio invocation.
+
+
+The reason for vetoing a modification/invocation is normally returned as a string. However, Isis' xref:ug.adoc#_ug_more-advanced_i18n[i18n support] extends this so that reasons can be internationalized if required.
+
+
+
+== Action Parameter
+
+For an action parameter in (0-based) position _N_, and of type `T`, the signature is:
+
+[source,java]
+----
+public String validateNXxx(T proposed) { ... }
+----
+
+where the returned string is the reason why the argument is rejected (or `null` if not vetoed).
+
+
+For example:
+
+[source,java]
+----
+public class Customer {
+ public Order placeOrder(
+ final Product product,
+ @ParameterLayout(named="Quantity")
+ final int quantity) {
+ ...
+ }
+ public String validate0PlaceOrder(
+ final Product product) {
+ return product.isDiscontinued()
+ ? "Product has been discontinued"
+ : null;
+ }
+ ...
+}
+----
+
+
+== Action Parameter Set
+
+In addition to validating a single single action argument, it is also possible to validate a complete set of action arguments. The signature is:
+
+[source,java]
+----
+public String validateXxx(...) { ... }
+----
+
+where the returned string is the reason why the argument is rejected (or `null` if not vetoed), and the supporting method takes the same parameter types as the action itself.
+
+
+For example:
+
+[source,java]
+----
+public class Customer {
+ public Order placeOrder(
+ final Product product,
+ @ParameterLayout(named="Quantity")
+ final int quantity) {
+ ...
+ }
+ public String validatePlaceOrder(
+ final Product product,
+ final int quantity) {
+ return quantity > product.getOrderLimit()
+ ? "May not order more than " + product.getOrderLimit() + " items for this product"
+ : null;
+ }
+ ...
+}
+----
+
+
+
+== Properties
+
+For properties of type `T` the signature of the supporting method is:
+
+[source,java]
+----
+public String validateXxx(T proposed) { ... }
+----
+
+where the returned string is the reason the modification is vetoed (or `null` if not vetoed).
+
+
+
+For example:
+
+[source,java]
+----
+public class Customer {
+ public BigDecimal getCreditLimit() { ... }
+ public void setCreditLimit(BigDecimal creditLimit) { ... }
+ public validateCreditLimit(BigDecimal creditLimit) {
+ return creditLimit.compareTo(BigDecimal.ZERO) < 0
+ ? "Credit limit cannot be negative"
+ : null;
+ }
+ ...
+}
+----
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-validateAddTo.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-validateAddTo.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-validateAddTo.adoc
new file mode 100644
index 0000000..a9183c2
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-validateAddTo.adoc
@@ -0,0 +1,45 @@
+[[_rg_methods_prefixes_manpage-validateAddTo]]
+= `validateAddTo...()`
+: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/
+
+
+
+The `validateAddTo...()` supporting method is called whenever an object is to be added to a collection. Its purpose is to validate the proposed object and possibly veto the change.
+
+
+[NOTE]
+====
+Directly mutable collections are not currently supported by the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer]. The suggested workaround is to simply define an action.
+====
+
+
+The signature of the supporting method for a collection with element type `E` is:
+
+[source,java]
+----
+public String validateAddToXxx(E element) { ... }
+----
+
+where the returned string is the reason the collection modification invocation is vetoed (or `null` if not vetoed). Isis' xref:ug.adoc#_ug_more-advanced_i18n[i18n support] extends this so that reasons can be internationalized if required.
+
+
+For example:
+
+[source,java]
+----
+public class LibraryMember {
+ public SortedSet<Book> getBorrowed() { ... }
+ public void setBorrowed(SortedSet<Book> borrowed) { ... }
+ public String validateAddToBorrowed(Book book) {
+ return book.isReference()? "Reference books cannot be borrowed": null;
+ }
+ public void validateRemoveFromBorrowed(Book book) { ... }
+ ...
+}
+----
+
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-addTo[`addTo...()`] and xref:rg.adoc#_rg_methods_prefixes_manpage-validateRemoveFrom[`validateRemoveFrom...()`]`
+
http://git-wip-us.apache.org/repos/asf/isis/blob/9c5dafab/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-validateRemoveFrom.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-validateRemoveFrom.adoc b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-validateRemoveFrom.adoc
new file mode 100644
index 0000000..254de8d
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/guides/_rg_methods_prefixes_manpage-validateRemoveFrom.adoc
@@ -0,0 +1,45 @@
+[[_rg_methods_prefixes_manpage-validateRemoveFrom]]
+= `validateRemoveFrom...()`
+: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/
+
+
+
+The `validateRemoveFrom...()` supporting method is called whenever an object is to be removed from a collection. Its purpose is to validate the proposed object removal and possibly veto the change.
+
+
+[NOTE]
+====
+Directly mutable collections are not currently supported by the xref:ug.adoc#_ug_wicket-viewer[Wicket viewer]. The suggested workaround is to simply define an action.
+====
+
+
+The signature of the supporting method for a collection with element type `E` is:
+
+[source,java]
+----
+public String validateRemoveFromXxx(E element) { ... }
+----
+
+where the returned string is the reason the collection modification invocation is vetoed (or `null` if not vetoed). Isis' xref:ug.adoc#_ug_more-advanced_i18n[i18n support] extends this so that reasons can be internationalized if required.
+
+
+For example:
+
+[source,java]
+----
+public class LibraryMember {
+ public SortedSet<Book> getBorrowed() { ... }
+ public void setBorrowed(SortedSet<Book> borrowed) { ... }
+ public String validateAddToBorrowed(Book book) { ... }
+ public void validateRemoveFromBorrowed(Book book) {
+ return !book.hasBeenReadBy(this)? "You didn't read this book yet": null;
+ }
+ ...
+}
+----
+
+
+See also xref:rg.adoc#_rg_methods_prefixes_manpage-removeFrom[`removeFrom...()`] and xref:rg.adoc#_rg_methods_prefixes_manpage-validateAddTo[`validateAddTo...()`]`
+