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 00:37:42 UTC
[03/11] isis git commit: ISIS-1133: user guide, documentation website
http://git-wip-us.apache.org/repos/asf/isis/blob/461e51b7/adocs/documentation/src/main/asciidoc/resources/templates/isis-templates.xml
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/resources/templates/isis-templates.xml b/adocs/documentation/src/main/asciidoc/resources/templates/isis-templates.xml
new file mode 100644
index 0000000..f8ea500
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/resources/templates/isis-templates.xml
@@ -0,0 +1,465 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<templates><template autoinsert="true" context="java-members" deleted="false" description="Action" enabled="true" name="isa">// {{ ${actionName} (action)
+${:import(org.apache.isis.applib.annotation.MemberOrder)}@MemberOrder(sequence="1")
+public ${ReturnType} ${actionName}(final ${ParameterType} ${parameterType}) {
+ return ${cursor}null; // TODO: business logic here
+}
+// }}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Action argument N choices" enabled="true" name="isacho">${:import(java.util.Collections,java.util.List)}public List<${ParameterType}> choices${ParameterNumThenCapitalizedActionName}() {
+ return ${cursor}Collections.emptyList(); // TODO: return list of choices for argument N
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Action argument defaults" enabled="true" name="isadef">public ${ParameterType} default${ParameterNumThenCapitalizedActionName}() {
+ return ${cursor}null; // TODO: return default for argument N
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Action disabling" enabled="true" name="isadis">public String disable${ActionName}() {
+ return ${cursor}null; // TODO: return reason why action disabled, null if enabled
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Action hiding" enabled="true" name="isahid">public boolean hide${ActionName}() {
+ return ${cursor}false; // TODO: return true if action is hidden, false if visible
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Action validation" enabled="true" name="isaval">public String validate${ActionName}(final ${ParameterType} ${parameterType}) {
+ return ${cursor}null; // TODO: return reason why action arguments are invalid, null if ok
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection (1:m bidir parent)" enabled="true" name="isc-1m">public void addTo${ChildCollectionName}(final ${ChildElementType} ${childElementName}) {
+ // check for no-op
+ if (${childElementName} == null ||
+ get${ChildCollectionName}().contains(${childElementName})) {
+ return;
+ }
+ // dissociate arg from its current parent (if any).
+ ${childElementName}.clear${ParentPropertyNameInChild}();
+ // associate arg
+ ${childElementName}.set${ParentPropertyNameInChild}(this);
+ get${ChildCollectionName}().add(${childElementName});
+ // additional business logic
+ onAddTo${ChildCollectionName}(${childElementName});
+}
+public void removeFrom${ChildCollectionName}(final ${ChildElementType} ${childElementName}) {
+ // check for no-op
+ if (${childElementName} == null ||
+ !get${ChildCollectionName}().contains(${childElementName})) {
+ return;
+ }
+ // dissociate arg
+ ${childElementName}.set${ParentPropertyNameInChild}(null);
+ get${ChildCollectionName}().remove(${childElementName});
+ // additional business logic
+ onRemoveFrom${ChildCollectionName}(${childElementName});
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection (m:m bidir child)" enabled="true" name="isc-mmc">public void addTo${ParentCollectionName}(final ${ParentElementType} ${parentElementName}) {
+ // check for no-op
+ if (${parentElementName} == null ||
+ get${ParentCollectionName}().contains(${parentElementName})) {
+ return;
+ }
+ // delegate to parent to add
+ ${parentElementName}.addTo${ChildCollectionNameInParent}(this);
+ // additional business logic
+ onAddTo${ParentCollectionName}(${parentElementName});
+}
+public void removeFrom${ParentCollectionName}(final ${ParentElementType} ${parentElementName}) {
+ // check for no-op
+ if (${parentElementName} == null ||
+ !get${ParentCollectionName}().contains(${parentElementName})) {
+ return;
+ }
+ // delegate to parent to remove
+ ${parentElementName}.removeFrom${ChildCollectionNameInParent}(this);
+ // additional business logic
+ onRemoveFrom${ParentCollectionName}(${parentElementName});
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection (m:m bidir parent)" enabled="true" name="isc-mmp">public void addTo${ChildCollectionName}(final ${ChildElementType} ${childElementName}) {
+ // check for no-op
+ if (${childElementName} == null ||
+ get${ChildCollectionName}().contains(${childElementName})) {
+ return;
+ }
+ // dissociate arg from its current parent (if any).
+ ${childElementName}.removeFrom${ParentCollectionNameInChild}(this);
+ // associate arg
+ ${childElementName}.get${ParentCollectionNameInChild}().add(this);
+ get${ChildCollectionName}().add(${childElementName});
+ // additional business logic
+ onAddTo${ChildCollectionName}(${childElementName});
+}
+public void removeFrom${ChildCollectionName}(final ${ChildElementType} ${childElementName}) {
+ // check for no-op
+ if (${childElementName} == null ||
+ !get${ChildCollectionName}().contains(${childElementName})) {
+ return;
+ }
+ // dissociate arg
+ ${childElementName}.get${ParentCollectionNameInChild}().remove(this);
+ get${ChildCollectionName}().remove(${childElementName});
+ // additional business logic
+ onRemoveFrom${ChildCollectionName}(${childElementName});
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection disabling" enabled="true" name="iscdis">public String disable${CollectionName}() {
+ return ${cursor}null; // TODO: return reason why collection read-only, null if editable
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection hiding" enabled="true" name="ischid">public boolean hide${CollectionName}() {
+ return ${cursor}false; // TODO: return true if hidden, false otherwise
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection (list)" enabled="true" name="iscl">// {{ ${CollectionName} (Collection)
+${:import(java.util.List,java.util.ArrayList,org.apache.isis.applib.annotation.MemberOrder)}private List<${ElementType}> ${collectionName} = new ArrayList<${ElementType}>();
+@MemberOrder(sequence="1")
+public List<${ElementType}> get${CollectionName}() {
+ return ${collectionName};
+}
+public void set${CollectionName}(final List<${ElementType}> ${collectionName}) {
+ this.${collectionName} = ${collectionName};
+}
+// }}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Collection modify" enabled="true" name="iscmod">public void addTo${CollectionName}(final ${ElementType} ${elementName}) {
+ // check for no-op
+ if (${elementName} == null ||
+ get${CollectionName}().contains(${elementName})) {
+ return;
+ }
+ // associate new
+ get${CollectionName}().add(${elementName});
+ // additional business logic
+ onAddTo${CollectionName}(${elementName});
+}
+public void removeFrom${CollectionName}(final ${ElementType} ${elementName}) {
+ // check for no-op
+ if (${elementName} == null ||
+ !get${CollectionName}().contains(${elementName})) {
+ return;
+ }
+ // dissociate existing
+ get${CollectionName}().remove(${elementName});
+ // additional business logic
+ onRemoveFrom${CollectionName}(${elementName});
+}
+protected void onAddTo${CollectionName}(final ${ElementType} ${elementName}) {
+}
+protected void onRemoveFrom${CollectionName}(final ${ElementType} ${elementName}) {
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection (set)" enabled="true" name="iscs">// {{ ${CollectionName} (Collection)
+${:import(java.util.Set,java.util.LinkedHashSet,org.apache.isis.applib.annotation.MemberOrder)}private Set<${ElementType}> ${collectionName} = new LinkedHashSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public Set<${ElementType}> get${CollectionName}() {
+ return ${collectionName};
+}
+public void set${CollectionName}(final Set<${ElementType}> ${collectionName}) {
+ this.${collectionName} = ${collectionName};
+}
+// }}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Collection validation" enabled="true" name="iscval">public String validateAddTo${CollectionName}(final ${ElementType} ${elementName}) {
+ return ${cursor}null; // TODO: return reason why argument cannot be added, null if ok to add
+}
+public String validateRemoveFrom${CollectionName}(final ${ElementType} ${elementName}) {
+ return null; // TODO: return reason why argument cannot be removed, null if ok to remove
+}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Dependencies region" enabled="true" name="isd">// {{ injected dependencies
+${cursor}
+// }}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Dependencies - injected service" enabled="true" name="isds">// {{ injected: ${ServiceType}
+private ${ServiceType} ${serviceType};
+public void set${ServiceType}(final ${ServiceType} ${serviceType}) {
+ this.${serviceType} = ${serviceType};
+}
+// }}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Factory - new instance (persistent)" enabled="true" name="isfp">// {{ Create new (already persisted) ${Type}
+public ${Type} new${Type}() {
+ ${Type} ${type} = newTransientInstance(${Type}.class);
+ ${cursor}// TODO: set up any properties
+
+ persist(${type});
+ return ${type};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="Factory - new instance (transient)" enabled="true" name="isft">// {{ Create new (still transient) ${Type}
+public ${Type} new${InstanceOfType}() {
+ ${Type} ${type} = newTransientInstance(${Type}.class);
+ ${cursor}// TODO: set up any properties
+
+ return ${type};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="Identification region" enabled="true" name="isid">// {{ Identification
+${cursor}
+// }}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Identification - icon" enabled="true" name="isidicon">public String iconName() {
+ return ${cursor}null; // TODO: return name of image file (without suffix)
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Identification - title" enabled="true" name="isidtitle">public String title() {
+ ${:import(org.apache.isis.applib.util.TitleBuffer)}final TitleBuffer buf = new TitleBuffer();
+ ${cursor}// TODO: append to TitleBuffer, typically value properties
+ return buf.toString();
+}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (1:n bidir, foreign key)" enabled="true" name="isjdc-1n-b-fk">// {{ ${CollectionName} (Collection)
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent)}@Persistent(mappedBy="${elementNameInChild}", dependentElement="${trueOrFalse}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (1:n bidir, join table)" enabled="true" name="isjdc-1n-b-jt">// {{ ${CollectionName} (Collection)
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persitent,javax.jdo.annotations.Join)}@Persistent(mappedBy="${elementNameInChild}", dependentElement="${trueOrFalse}")
+@Join
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (1:n unidir, foreign key)" enabled="true" name="isjdc-1n-u-fk">// {{ ${CollectionName} (Collection)
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Element)}
+@Element(column="${ColumnName}", dependent="${trueOrFalse}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (1:n unidir, join table)" enabled="true" name="isjdc-1n-u-jt">// {{ ${CollectionName} (Collection)
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Join,javax.jdo.annotations.Element)}@Join
+@Element(dependent="${trueOrFalse}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (m:n bidir - child)" enabled="true" name="isjdc-mn-ub-c">// {{ ${CollectionName} (Collection)
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent)}@Persistent(mappedBy="${ChildCollectionNameInParent}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (m:n unidir & bidir - parent)" enabled="true" name="isjdc-mn-ub-p">// {{ ${CollectionName} (Collection)
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent,javax.jdo.annotations.Join,javax.jdo.annotations.Element)}@Persistent(table="${TableName}")
+@Join(column="${ThisEntityFieldName}")
+@Element(column="${RelatedEntityFieldName}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();@MemberOrder(sequence="1")
+
+public SortedSet<${ElementType}> get${CollectionName}() {
+ return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+ this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Property (simple - 1:1 unidir & bidir - parent)" enabled="true" name="isjdp">// {{ ${PropertyName} (property)
+private ${PropertyType} ${propertyName};
+${:import(org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Column)}@MemberOrder(sequence="1")
+@Column(allowsNull="${trueOrFalse}")
+public ${PropertyType} get${PropertyName}() {
+ return ${propertyName};
+}
+public void set${PropertyName}(final ${PropertyType} ${propertyName}) {
+ this.${propertyName} = ${propertyName};
+}
+// }}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Property (1:1 child)" enabled="true" name="isjdp-11c">// {{ ${PropertyName} (property)
+private ${PropertyType} ${propertyName};
+${:import(org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Column,javax.jdo.annotations.Persistent)}@MemberOrder(sequence="1")
+@Column(allowsNull="${trueOrFalse}")
+@Persistent(mappedBy="${fieldOnChild}")
+public ${PropertyType} get${PropertyName}() {
+ return ${propertyName};
+}
+public void set${PropertyName}(final ${PropertyType} ${propertyName}) {
+ this.${propertyName} = ${propertyName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle region" enabled="true" name="isl">// {{ Lifecycle methods
+${cursor}
+// }}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle - create" enabled="true" name="islc">public void created() {
+ ${cursor}// TODO: post-create
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle - load" enabled="true" name="isll">public void loading() {
+ ${cursor}// TODO: pre-load
+}
+public void loaded() {
+ // TODO: post-load
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle - persist" enabled="true" name="islp">public void persisting() {
+ ${cursor}// TODO: pre-persist
+}
+public void persisted() {
+ // TODO: post-persist
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle - remove" enabled="true" name="islr">public void removing() {
+ ${cursor}// TODO: pre-remove
+}
+public void removed() {
+ // TODO: post-remove
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle - update" enabled="true" name="islu">public void updating() {
+ ${cursor}// TODO: pre-update
+}
+public void updated() {
+ // TODO: post-update
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property" enabled="true" name="isp">// {{ ${PropertyName} (property)
+private ${PropertyType} ${propertyName};
+${:import(org.apache.isis.applib.annotation.MemberOrder)}@MemberOrder(sequence="1")
+public ${PropertyType} get${PropertyName}() {
+ return ${propertyName};
+}
+public void set${PropertyName}(final ${PropertyType} ${propertyName}) {
+ this.${propertyName} = ${propertyName};
+}
+// }}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Property (1:1 bidir child)" enabled="true" name="isp-11c">public void modify${ParentPropertyName}(final ${ParentPropertyType} ${parentPropertyName}) {
+ ${ParentPropertyType} current${ParentPropertyName} = get${ParentPropertyName}();
+ // check for no-op
+ if (${parentPropertyName} == null ||
+ ${parentPropertyName}.equals(current${ParentPropertyName})) {
+ return;
+ }
+ // delegate to parent to associate
+ ${parentPropertyName}.modify${ChildPropertyNameInParent}(this);
+ // additional business logic
+ onModify${ParentPropertyName}(current${ParentPropertyName}, ${parentPropertyName});
+}
+public void clear${PropertyName}() {
+ ${ParentPropertyType} current${ParentPropertyName} = get${ParentPropertyName}();
+ // check for no-op
+ if (current${ParentPropertyName} == null) {
+ return;
+ }
+ // delegate to parent to dissociate
+ current${ParentPropertyName}.clear${ChildPropertyNameInParent}();
+ // additional business logic
+ onClear${ParentPropertyName}(current${ParentPropertyName});
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property (1:1 bidir parent)" enabled="true" name="isp-11p">public void modify${ChildPropertyName}(final ${ChildPropertyType} ${childPropertyName}) {
+ ${ChildPropertyType} current${ChildPropertyName} = get${ChildPropertyName}();
+ // check for no-op
+ if (${childPropertyName} == null ||
+ ${childPropertyName}.equals(current${ChildPropertyName})) {
+ return;
+ }
+ // dissociate existing
+ clear${ChildPropertyName}();
+ // associate new
+ ${childPropertyName}.set${ParentPropertyNameInChild}(this);
+ set${ChildPropertyName}(${childPropertyName});
+ // additional business logic
+ onModify${ChildPropertyName}(current${ChildPropertyName}, ${childPropertyName});
+}
+public void clear${ChildPropertyName}() {
+ ${ChildPropertyType} current${ChildPropertyName} = get${ChildPropertyName}();
+ // check for no-op
+ if (current${ChildPropertyName} == null) {
+ return;
+ }
+ // dissociate existing
+ current${ChildPropertyName}.set${ParentPropertyNameInChild}(null);
+ set${ChildPropertyName}(null);
+ // additional business logic
+ onClear${ChildPropertyName}(current${ChildPropertyName});
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property (m:1 bidir child)" enabled="true" name="isp-m1">public void modify${ParentPropertyName}(final ${ParentPropertyType} ${parentPropertyName}) {
+ ${ParentPropertyType} current${ParentPropertyName} = get${ParentPropertyName}();
+ // check for no-op
+ if (${parentPropertyName} == null ||
+ ${parentPropertyName}.equals(current${ParentPropertyName})) {
+ return;
+ }
+ // delegate to parent to associate
+ ${parentPropertyName}.addTo${ChildCollectionNameInParent}(this);
+ // additional business logic
+ onModify${ParentPropertyName}(current${ParentPropertyName}, ${parentPropertyName});
+}
+public void clear${ParentPropertyName}() {
+ ${ParentPropertyType} current${ParentPropertyName} = get${ParentPropertyName}();
+ // check for no-op
+ if (current${ParentPropertyName} == null) {
+ return;
+ }
+ // delegate to parent to dissociate
+ current${ParentPropertyName}.removeFrom${ChildCollectionNameInParent}(this);
+ // additional business logic
+ onClear${ParentPropertyName}(current${ParentPropertyName});
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property choices" enabled="true" name="ispcho">${:import(java.util.List)}public List<${PropertyType}> choices${PropertyName}() {
+ return ${cursor}null; // TODO: return list of choices for property
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property defaults" enabled="true" name="ispdef">public ${PropertyType} default${PropertyName}() {
+ return ${cursor}null; // TODO: return default for property when first created
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property disabling" enabled="true" name="ispdis">public String disable${PropertyName}() {
+ return ${cursor}null; // TODO: return reason why property is disabled, null if editable
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property hiding" enabled="true" name="isphid">public boolean hide${PropertyName}() {
+ return ${cursor}false; // TODO: return true if hidden, false if visible
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property modify" enabled="true" name="ispmod">public void modify${PropertyName}(final ${PropertyType} ${propertyName}) {
+ ${PropertyType} current${PropertyName} = get${PropertyName}();
+ // check for no-op
+ if (${propertyName} == null ||
+ ${propertyName}.equals(current${PropertyName})) {
+ return;
+ }
+ // associate new
+ set${PropertyName}(${propertyName});
+ // additional business logic
+ onModify${PropertyName}(current${PropertyName}, ${propertyName});
+}
+public void clear${PropertyName}() {
+ ${PropertyType} current${PropertyName} = get${PropertyName}();
+ // check for no-op
+ if (current${PropertyName} == null) {
+ return;
+ }
+ // dissociate existing
+ set${PropertyName}(null);
+ // additional business logic
+ onClear${PropertyName}(current${PropertyName});
+}
+protected void onModify${PropertyName}(final ${PropertyType} old${PropertyName}, final ${PropertyType} new${PropertyName}) {
+}
+protected void onClear${PropertyName}(final ${PropertyType} old${PropertyName}) {
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property validation" enabled="true" name="ispval">public String validate${PropertyName}(final ${PropertyType} ${propertyName}) {
+ if (${propertyName} == null) return null;
+ return ${cursor}null; // TODO: return reason why proposed value is invalid, null if valid
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Isis Section" enabled="true" name="iss">// {{ ${SectionName}
+${cursor}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="Search for all" enabled="true" name="issa">// {{ all ${TypePlural}
+${:import(org.apache.isis.applib.annotation.Exploration,java.util.List)}@Exploration
+public List<${Type}> all${TypePlural}() {
+ return allInstances(${Type}.class);
+}
+// }}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Search for all matching" enabled="true" name="issafil">// {{ all ${TypePlural} that ${filterDescription}
+${:import(org.apache.isis.applib.annotation.Exploration,org.apache.isis.applib.Filter,java.util.List)}@Exploration
+public List<${Type}> all${TypePlural}Matching(final Filter<${Type}> filter) {
+ return allMatches(${Type}.class, filter);
+}
+// }}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Search for first matching" enabled="true" name="issffil">// {{ first ${Type} that ${filterDescription}
+${:import(org.apache.isis.applib.annotation.Exploration,org.apache.isis.applib.Filter,java.util.List)}@Exploration
+public ${Type} first${Type}Matching(final Filter<${Type}> filter) {
+ return firstMatch(${Type}.class, filter);
+}
+// }}
+</template><template autoinsert="true" context="java-members" deleted="false" description="Search for unique matching" enabled="true" name="issufil">// {{ unique ${Type} that ${filterDescription}
+${:import(org.apache.isis.applib.annotation.Exploration,org.apache.isis.applib.Filter,java.util.List)}@Exploration
+public ${Type} unique${Type}Matching(final Filter<${Type}> filter) {
+ return uniqueMatch(${Type}.class, filter);
+}
+// }}
+</template><template autoinsert="true" context="java-members" deleted="false" description="Object-level validation" enabled="true" name="isval">public String validate() {
+ ${cursor}// TODO: return reason why object is in invalid state (and so cannot be saved/updated), or null if ok
+}</template></templates>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/461e51b7/adocs/documentation/src/main/asciidoc/resources/templates/isis-templates2.xml
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/resources/templates/isis-templates2.xml b/adocs/documentation/src/main/asciidoc/resources/templates/isis-templates2.xml
new file mode 100644
index 0000000..8724f6e
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/resources/templates/isis-templates2.xml
@@ -0,0 +1,479 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="java-members" deleted="false" description="Action" enabled="true" name="isa">// //////////////////////////////////////
+// ${actionName} (action)
+// //////////////////////////////////////
+
+${:import(org.apache.isis.applib.annotation.MemberOrder)}@MemberOrder(sequence="1")
+public ${ReturnType} ${actionName}(final ${ParameterType} ${parameterType}) {
+ return ${cursor}null; // TODO: business logic here
+}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Action argument N choices" enabled="true" name="isacho">${:import(java.util.Collections,java.util.List)}public List<${ParameterType}> choices${ParameterNumThenCapitalizedActionName}() {
+ return ${cursor}Collections.emptyList(); // TODO: return list of choices for argument N
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Action argument defaults" enabled="true" name="isadef">public ${ParameterType} default${ParameterNumThenCapitalizedActionName}() {
+ return ${cursor}null; // TODO: return default for argument N
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Action disabling" enabled="true" name="isadis">public String disable${ActionName}() {
+ return ${cursor}null; // TODO: return reason why action disabled, null if enabled
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Action hiding" enabled="true" name="isahid">public boolean hide${ActionName}() {
+ return ${cursor}false; // TODO: return true if action is hidden, false if visible
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Action validation" enabled="true" name="isaval">public String validate${ActionName}(final ${ParameterType} ${parameterType}) {
+ return ${cursor}null; // TODO: return reason why action arguments are invalid, null if ok
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection (1:m bidir parent)" enabled="true" name="isc-1m">public void addTo${ChildCollectionName}(final ${ChildElementType} ${childElementName}) {
+ // check for no-op
+ if (${childElementName} == null ||
+ get${ChildCollectionName}().contains(${childElementName})) {
+ return;
+ }
+ // dissociate arg from its current parent (if any).
+ ${childElementName}.clear${ParentPropertyNameInChild}();
+ // associate arg
+ ${childElementName}.set${ParentPropertyNameInChild}(this);
+ get${ChildCollectionName}().add(${childElementName});
+ // additional business logic
+ onAddTo${ChildCollectionName}(${childElementName});
+}
+public void removeFrom${ChildCollectionName}(final ${ChildElementType} ${childElementName}) {
+ // check for no-op
+ if (${childElementName} == null ||
+ !get${ChildCollectionName}().contains(${childElementName})) {
+ return;
+ }
+ // dissociate arg
+ ${childElementName}.set${ParentPropertyNameInChild}(null);
+ get${ChildCollectionName}().remove(${childElementName});
+ // additional business logic
+ onRemoveFrom${ChildCollectionName}(${childElementName});
+}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - 1:n bidir, foreign key)" enabled="true" name="isc-jdo-1n-b-fk">// //////////////////////////////////////
+// ${collectionName} (collection)
+// //////////////////////////////////////
+
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent)}@Persistent(mappedBy="${elementNameInChild}", dependentElement="${trueOrFalse}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - 1:n bidir, join table)" enabled="true" name="isc-jdo-1n-b-jt">// //////////////////////////////////////
+// ${collectionName} (collection)
+// //////////////////////////////////////
+
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persitent,javax.jdo.annotations.Join)}@Persistent(mappedBy="${elementNameInChild}", dependentElement="${trueOrFalse}")
+@Join
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - 1:n unidir, foreign key)" enabled="true" name="isc-jdo-1n-u-fk">// //////////////////////////////////////
+// ${collectionName} (collection)
+// //////////////////////////////////////
+
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Element)}
+@Element(column="${ColumnName}", dependent="${trueOrFalse}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - 1:n unidir, join table)" enabled="true" name="isc-jdo-1n-u-jt">// //////////////////////////////////////
+// ${collectionName} (collection)
+// //////////////////////////////////////
+
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Join,javax.jdo.annotations.Element)}@Join
+@Element(dependent="${trueOrFalse}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - m:n bidir - child)" enabled="true" name="isc-jdo-mn-ub-c">// //////////////////////////////////////
+// ${collectionName} (collection)
+// //////////////////////////////////////
+
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent)}@Persistent(mappedBy="${ChildCollectionNameInParent}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - m:n unidir & bidir - parent)" enabled="true" name="isc-jdo-mn-ub-p">// //////////////////////////////////////
+// ${collectionName} (collection)
+// //////////////////////////////////////
+
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent,javax.jdo.annotations.Join,javax.jdo.annotations.Element)}@Persistent(table="${TableName}")
+@Join(column="${ThisEntityFieldName}")
+@Element(column="${RelatedEntityFieldName}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();@MemberOrder(sequence="1")
+
+public SortedSet<${ElementType}> get${CollectionName}() {
+ return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+ this.${collectionName} = ${collectionName};
+}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Collection (m:m bidir child)" enabled="true" name="isc-mmc">public void addTo${ParentCollectionName}(final ${ParentElementType} ${parentElementName}) {
+ // check for no-op
+ if (${parentElementName} == null ||
+ get${ParentCollectionName}().contains(${parentElementName})) {
+ return;
+ }
+ // delegate to parent to add
+ ${parentElementName}.addTo${ChildCollectionNameInParent}(this);
+ // additional business logic
+ onAddTo${ParentCollectionName}(${parentElementName});
+}
+public void removeFrom${ParentCollectionName}(final ${ParentElementType} ${parentElementName}) {
+ // check for no-op
+ if (${parentElementName} == null ||
+ !get${ParentCollectionName}().contains(${parentElementName})) {
+ return;
+ }
+ // delegate to parent to remove
+ ${parentElementName}.removeFrom${ChildCollectionNameInParent}(this);
+ // additional business logic
+ onRemoveFrom${ParentCollectionName}(${parentElementName});
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection (m:m bidir parent)" enabled="true" name="isc-mmp">public void addTo${ChildCollectionName}(final ${ChildElementType} ${childElementName}) {
+ // check for no-op
+ if (${childElementName} == null ||
+ get${ChildCollectionName}().contains(${childElementName})) {
+ return;
+ }
+ // dissociate arg from its current parent (if any).
+ ${childElementName}.removeFrom${ParentCollectionNameInChild}(this);
+ // associate arg
+ ${childElementName}.get${ParentCollectionNameInChild}().add(this);
+ get${ChildCollectionName}().add(${childElementName});
+ // additional business logic
+ onAddTo${ChildCollectionName}(${childElementName});
+}
+public void removeFrom${ChildCollectionName}(final ${ChildElementType} ${childElementName}) {
+ // check for no-op
+ if (${childElementName} == null ||
+ !get${ChildCollectionName}().contains(${childElementName})) {
+ return;
+ }
+ // dissociate arg
+ ${childElementName}.get${ParentCollectionNameInChild}().remove(this);
+ get${ChildCollectionName}().remove(${childElementName});
+ // additional business logic
+ onRemoveFrom${ChildCollectionName}(${childElementName});
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection disabling" enabled="true" name="iscdis">public String disable${CollectionName}() {
+ return ${cursor}null; // TODO: return reason why collection read-only, null if editable
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection hiding" enabled="true" name="ischid">public boolean hide${CollectionName}() {
+ return ${cursor}false; // TODO: return true if hidden, false otherwise
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection (list)" enabled="true" name="iscl">// //////////////////////////////////////
+// ${collectionName} (collection)
+// //////////////////////////////////////
+
+${:import(java.util.List,java.util.ArrayList,org.apache.isis.applib.annotation.MemberOrder)}private List<${ElementType}> ${collectionName} = new ArrayList<${ElementType}>();
+@MemberOrder(sequence="1")
+public List<${ElementType}> get${CollectionName}() {
+ return ${collectionName};
+}
+public void set${CollectionName}(final List<${ElementType}> ${collectionName}) {
+ this.${collectionName} = ${collectionName};
+}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Collection modify" enabled="true" name="iscmod">public void addTo${CollectionName}(final ${ElementType} ${elementName}) {
+ // check for no-op
+ if (${elementName} == null ||
+ get${CollectionName}().contains(${elementName})) {
+ return;
+ }
+ // associate new
+ get${CollectionName}().add(${elementName});
+ // additional business logic
+ onAddTo${CollectionName}(${elementName});
+}
+public void removeFrom${CollectionName}(final ${ElementType} ${elementName}) {
+ // check for no-op
+ if (${elementName} == null ||
+ !get${CollectionName}().contains(${elementName})) {
+ return;
+ }
+ // dissociate existing
+ get${CollectionName}().remove(${elementName});
+ // additional business logic
+ onRemoveFrom${CollectionName}(${elementName});
+}
+protected void onAddTo${CollectionName}(final ${ElementType} ${elementName}) {
+}
+protected void onRemoveFrom${CollectionName}(final ${ElementType} ${elementName}) {
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection (set)" enabled="true" name="iscs">// //////////////////////////////////////
+// ${collectionName} (collection)
+// //////////////////////////////////////
+
+${:import(java.util.Set,java.util.LinkedHashSet,org.apache.isis.applib.annotation.MemberOrder)}private Set<${ElementType}> ${collectionName} = new LinkedHashSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public Set<${ElementType}> get${CollectionName}() {
+ return ${collectionName};
+}
+public void set${CollectionName}(final Set<${ElementType}> ${collectionName}) {
+ this.${collectionName} = ${collectionName};
+}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Collection validation" enabled="true" name="iscval">public String validateAddTo${CollectionName}(final ${ElementType} ${elementName}) {
+ return ${cursor}null; // TODO: return reason why argument cannot be added, null if ok to add
+}
+public String validateRemoveFrom${CollectionName}(final ${ElementType} ${elementName}) {
+ return null; // TODO: return reason why argument cannot be removed, null if ok to remove
+}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Dependencies region" enabled="true" name="isd">// //////////////////////////////////////
+// injected dependencies
+// //////////////////////////////////////
+
+${cursor}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Dependencies - injected service" enabled="true" name="isds">private ${ServiceType} ${serviceType};
+public final void inject${ServiceType}(final ${ServiceType} ${serviceType}) {
+ this.${serviceType} = ${serviceType};
+}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Factory - new instance (persistent)" enabled="true" name="isfp">public ${Type} new${Type}() {
+ ${Type} ${type} = newTransientInstance(${Type}.class);
+ ${cursor}// TODO: set up any properties
+
+ persistIfNotAlready(${type});
+ return ${type};
+}
+</template><template autoinsert="true" context="java-members" deleted="false" description="Factory - new instance (transient)" enabled="true" name="isft">public ${Type} new${InstanceOfType}() {
+ ${Type} ${type} = newTransientInstance(${Type}.class);
+ ${cursor}// TODO: set up any properties
+
+ return ${type};
+}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Identification region" enabled="true" name="isid">// //////////////////////////////////////
+// Identification
+// //////////////////////////////////////
+
+${cursor}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Identification - icon" enabled="true" name="isidicon">public String iconName() {
+ return ${cursor}null; // TODO: return name of image file (without suffix)
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Identification - title" enabled="true" name="isidtitle">public String title() {
+ ${:import(org.apache.isis.applib.util.TitleBuffer)}final TitleBuffer buf = new TitleBuffer();
+ ${cursor}// TODO: append to TitleBuffer, typically value properties
+ return buf.toString();
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle region" enabled="true" name="isl">// //////////////////////////////////////
+// Lifecycle methods
+// //////////////////////////////////////
+
+${cursor}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle - create" enabled="true" name="islc">public void created() {
+ ${cursor}// TODO: post-create
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle - load" enabled="true" name="isll">public void loading() {
+ ${cursor}// TODO: pre-load
+}
+public void loaded() {
+ // TODO: post-load
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle - persist" enabled="true" name="islp">public void persisting() {
+ ${cursor}// TODO: pre-persist
+}
+public void persisted() {
+ // TODO: post-persist
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle - remove" enabled="true" name="islr">public void removing() {
+ ${cursor}// TODO: pre-remove
+}
+public void removed() {
+ // TODO: post-remove
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle - update" enabled="true" name="islu">public void updating() {
+ ${cursor}// TODO: pre-update
+}
+public void updated() {
+ // TODO: post-update
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property" enabled="true" name="isp">// //////////////////////////////////////
+// ${propertyName} (property)
+// //////////////////////////////////////
+
+private ${PropertyType} ${propertyName};
+${:import(org.apache.isis.applib.annotation.MemberOrder)}@MemberOrder(sequence="1")
+public ${PropertyType} get${PropertyName}() {
+ return ${propertyName};
+}
+public void set${PropertyName}(final ${PropertyType} ${propertyName}) {
+ this.${propertyName} = ${propertyName};
+}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Property (1:1 bidir child)" enabled="true" name="isp-11c">public void modify${ParentPropertyName}(final ${ParentPropertyType} ${parentPropertyName}) {
+ ${ParentPropertyType} current${ParentPropertyName} = get${ParentPropertyName}();
+ // check for no-op
+ if (${parentPropertyName} == null ||
+ ${parentPropertyName}.equals(current${ParentPropertyName})) {
+ return;
+ }
+ // delegate to parent to associate
+ ${parentPropertyName}.modify${ChildPropertyNameInParent}(this);
+ // additional business logic
+ onModify${ParentPropertyName}(current${ParentPropertyName}, ${parentPropertyName});
+}
+public void clear${PropertyName}() {
+ ${ParentPropertyType} current${ParentPropertyName} = get${ParentPropertyName}();
+ // check for no-op
+ if (current${ParentPropertyName} == null) {
+ return;
+ }
+ // delegate to parent to dissociate
+ current${ParentPropertyName}.clear${ChildPropertyNameInParent}();
+ // additional business logic
+ onClear${ParentPropertyName}(current${ParentPropertyName});
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property (1:1 bidir parent)" enabled="true" name="isp-11p">public void modify${ChildPropertyName}(final ${ChildPropertyType} ${childPropertyName}) {
+ ${ChildPropertyType} current${ChildPropertyName} = get${ChildPropertyName}();
+ // check for no-op
+ if (${childPropertyName} == null ||
+ ${childPropertyName}.equals(current${ChildPropertyName})) {
+ return;
+ }
+ // dissociate existing
+ clear${ChildPropertyName}();
+ // associate new
+ ${childPropertyName}.set${ParentPropertyNameInChild}(this);
+ set${ChildPropertyName}(${childPropertyName});
+ // additional business logic
+ onModify${ChildPropertyName}(current${ChildPropertyName}, ${childPropertyName});
+}
+public void clear${ChildPropertyName}() {
+ ${ChildPropertyType} current${ChildPropertyName} = get${ChildPropertyName}();
+ // check for no-op
+ if (current${ChildPropertyName} == null) {
+ return;
+ }
+ // dissociate existing
+ current${ChildPropertyName}.set${ParentPropertyNameInChild}(null);
+ set${ChildPropertyName}(null);
+ // additional business logic
+ onClear${ChildPropertyName}(current${ChildPropertyName});
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property (m:1 bidir child)" enabled="true" name="isp-m1">public void modify${ParentPropertyName}(final ${ParentPropertyType} ${parentPropertyName}) {
+ ${ParentPropertyType} current${ParentPropertyName} = get${ParentPropertyName}();
+ // check for no-op
+ if (${parentPropertyName} == null ||
+ ${parentPropertyName}.equals(current${ParentPropertyName})) {
+ return;
+ }
+ // delegate to parent to associate
+ ${parentPropertyName}.addTo${ChildCollectionNameInParent}(this);
+ // additional business logic
+ onModify${ParentPropertyName}(current${ParentPropertyName}, ${parentPropertyName});
+}
+public void clear${ParentPropertyName}() {
+ ${ParentPropertyType} current${ParentPropertyName} = get${ParentPropertyName}();
+ // check for no-op
+ if (current${ParentPropertyName} == null) {
+ return;
+ }
+ // delegate to parent to dissociate
+ current${ParentPropertyName}.removeFrom${ChildCollectionNameInParent}(this);
+ // additional business logic
+ onClear${ParentPropertyName}(current${ParentPropertyName});
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property choices" enabled="true" name="ispcho">${:import(java.util.List)}public List<${PropertyType}> choices${PropertyName}() {
+ return ${cursor}null; // TODO: return list of choices for property
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property defaults" enabled="true" name="ispdef">public ${PropertyType} default${PropertyName}() {
+ return ${cursor}null; // TODO: return default for property when first created
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property disabling" enabled="true" name="ispdis">public String disable${PropertyName}() {
+ return ${cursor}null; // TODO: return reason why property is disabled, null if editable
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property hiding" enabled="true" name="isphid">public boolean hide${PropertyName}() {
+ return ${cursor}false; // TODO: return true if hidden, false if visible
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property modify" enabled="true" name="ispmod">public void modify${PropertyName}(final ${PropertyType} ${propertyName}) {
+ ${PropertyType} current${PropertyName} = get${PropertyName}();
+ // check for no-op
+ if (${propertyName} == null ||
+ ${propertyName}.equals(current${PropertyName})) {
+ return;
+ }
+ // associate new
+ set${PropertyName}(${propertyName});
+ // additional business logic
+ onModify${PropertyName}(current${PropertyName}, ${propertyName});
+}
+public void clear${PropertyName}() {
+ ${PropertyType} current${PropertyName} = get${PropertyName}();
+ // check for no-op
+ if (current${PropertyName} == null) {
+ return;
+ }
+ // dissociate existing
+ set${PropertyName}(null);
+ // additional business logic
+ onClear${PropertyName}(current${PropertyName});
+}
+protected void onModify${PropertyName}(final ${PropertyType} old${PropertyName}, final ${PropertyType} new${PropertyName}) {
+}
+protected void onClear${PropertyName}(final ${PropertyType} old${PropertyName}) {
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Property validation" enabled="true" name="ispval">public String validate${PropertyName}(final ${PropertyType} ${propertyName}) {
+ if (${propertyName} == null) return null;
+ return ${cursor}null; // TODO: return reason why proposed value is invalid, null if valid
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Search for all" enabled="true" name="issa">// //////////////////////////////////////
+// all ${TypePlural}
+// //////////////////////////////////////
+
+${:import(org.apache.isis.applib.annotation.Prototype,java.util.List)}@Prototype
+public List<${Type}> all${TypePlural}() {
+ return allInstances(${Type}.class);
+}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Search for all matching" enabled="true" name="issafil">// //////////////////////////////////////
+// all ${TypePlural} that ${filterDescription}
+// //////////////////////////////////////
+
+${:import(org.apache.isis.applib.annotation.Prototype,org.apache.isis.applib.Filter,java.util.List)}@Prototype
+public List<${Type}> all${TypePlural}Matching(final Filter<${Type}> filter) {
+ return allMatches(${Type}.class, filter);
+}
+
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Search for first matching" enabled="true" name="issffil">// //////////////////////////////////////
+// first ${Type} that ${filterDescription}
+// //////////////////////////////////////
+
+${:import(org.apache.isis.applib.annotation.Prototype,org.apache.isis.applib.Filter,java.util.List)}@Prototype
+public ${Type} first${Type}Matching(final Filter<${Type}> filter) {
+ return firstMatch(${Type}.class, filter);
+}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Search for unique matching" enabled="true" name="issufil">// //////////////////////////////////////
+// unique ${Type} that ${filterDescription}
+// //////////////////////////////////////
+
+${:import(org.apache.isis.applib.annotation.Exploration,org.apache.isis.applib.Filter,java.util.List)}@Exploration
+public ${Type} unique${Type}Matching(final Filter<${Type}> filter) {
+ return uniqueMatch(${Type}.class, filter);
+}
+
+</template><template autoinsert="true" context="java-members" deleted="false" description="Object-level validation" enabled="true" name="isval">public String validate() {
+ ${cursor}// TODO: return reason why object is in invalid state (and so cannot be saved/updated), or null if ok
+}</template></templates>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/461e51b7/adocs/documentation/src/main/asciidoc/resources/templates/jmock2-templates-idea.xml
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/resources/templates/jmock2-templates-idea.xml b/adocs/documentation/src/main/asciidoc/resources/templates/jmock2-templates-idea.xml
new file mode 100644
index 0000000..c57cd75
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/resources/templates/jmock2-templates-idea.xml
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templateSet group="jmock2-templates">
+ <template name="jmautomock" value="@org.jmock.auto.Mock private $MockClass$ mock$MockClass$;" description="" toReformat="true" toShortenFQNames="true">
+ <variable name="MockClass" expression="className()" defaultValue="" alwaysStopAt="true" />
+ <context>
+ <option name="HTML" value="false" />
+ <option name="XML" value="false" />
+ <option name="JAVA_CODE" value="true" />
+ <option name="JAVA_COMMENT" value="false" />
+ <option name="JAVA_STRING" value="false" />
+ <option name="COMPLETION" value="false" />
+ <option name="JAVA_SCRIPT" value="false" />
+ <option name="OTHER" value="false" />
+ </context>
+ </template>
+ <template name="jmcontext" value="private org.jmock.Mockery context = new org.jmock.integration.junit4.JUnit4Mockery();" description="" toReformat="true" toShortenFQNames="true">
+ <context>
+ <option name="HTML" value="false" />
+ <option name="XML" value="false" />
+ <option name="JAVA_CODE" value="true" />
+ <option name="JAVA_COMMENT" value="false" />
+ <option name="JAVA_STRING" value="false" />
+ <option name="COMPLETION" value="false" />
+ <option name="JAVA_SCRIPT" value="false" />
+ <option name="OTHER" value="false" />
+ </context>
+ </template>
+ <template name="jmexpectations" value="context.checking(new org.jmock.Expectations() {{ $END$ }});" description="" toReformat="true" toShortenFQNames="true">
+ <context>
+ <option name="HTML" value="false" />
+ <option name="XML" value="false" />
+ <option name="JAVA_CODE" value="true" />
+ <option name="JAVA_COMMENT" value="false" />
+ <option name="JAVA_STRING" value="false" />
+ <option name="COMPLETION" value="false" />
+ <option name="JAVA_SCRIPT" value="false" />
+ <option name="OTHER" value="false" />
+ </context>
+ </template>
+ <template name="jmmock" value="$MockClass$ $mockObject$ = context.mock($MockClass$.class);" description="" toReformat="true" toShortenFQNames="true">
+ <variable name="MockClass" expression="className()" defaultValue="" alwaysStopAt="true" />
+ <variable name="mockObject" expression="suggestVariableName()" defaultValue="" alwaysStopAt="true" />
+ <context>
+ <option name="HTML" value="false" />
+ <option name="XML" value="false" />
+ <option name="JAVA_CODE" value="true" />
+ <option name="JAVA_COMMENT" value="false" />
+ <option name="JAVA_STRING" value="false" />
+ <option name="COMPLETION" value="false" />
+ <option name="JAVA_SCRIPT" value="false" />
+ <option name="OTHER" value="false" />
+ </context>
+ </template>
+ <template name="jmrule" value="@org.junit.Rule public org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2 context = org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.createFor(org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode.INTERFACES_AND_CLASSES$END$);" description="" toReformat="true" toShortenFQNames="true">
+ <context>
+ <option name="HTML" value="false" />
+ <option name="XML" value="false" />
+ <option name="JAVA_CODE" value="true" />
+ <option name="JAVA_COMMENT" value="false" />
+ <option name="JAVA_STRING" value="false" />
+ <option name="COMPLETION" value="false" />
+ <option name="JAVA_SCRIPT" value="false" />
+ <option name="OTHER" value="false" />
+ </context>
+ </template>
+ <template name="jmrunwith" value="@org.junit.runner.RunWith(org.jmock.integration.junit4.JMock.class)" description="" toReformat="true" toShortenFQNames="true">
+ <context>
+ <option name="HTML" value="false" />
+ <option name="XML" value="false" />
+ <option name="JAVA_CODE" value="true" />
+ <option name="JAVA_COMMENT" value="false" />
+ <option name="JAVA_STRING" value="false" />
+ <option name="COMPLETION" value="false" />
+ <option name="JAVA_SCRIPT" value="false" />
+ <option name="OTHER" value="false" />
+ </context>
+ </template>
+ <template name="jmvalue" value="will(returnValue($END$));" description="" toReformat="true" toShortenFQNames="true">
+ <context>
+ <option name="HTML" value="false" />
+ <option name="XML" value="false" />
+ <option name="JAVA_CODE" value="true" />
+ <option name="JAVA_COMMENT" value="false" />
+ <option name="JAVA_STRING" value="false" />
+ <option name="COMPLETION" value="false" />
+ <option name="JAVA_SCRIPT" value="false" />
+ <option name="OTHER" value="false" />
+ </context>
+ </template>
+</templateSet>
+
http://git-wip-us.apache.org/repos/asf/isis/blob/461e51b7/adocs/documentation/src/main/asciidoc/resources/templates/jmock2-templates.xml
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/resources/templates/jmock2-templates.xml b/adocs/documentation/src/main/asciidoc/resources/templates/jmock2-templates.xml
new file mode 100644
index 0000000..9f0f4a5
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/resources/templates/jmock2-templates.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="java" deleted="false" description="JMock2 AutoMock Definition" enabled="true" name="jmautomock">${:import(org.jmock.auto.Mock)}@Mock
+private ${MockClass} mock${MockClass};
+</template><template autoinsert="true" context="java" deleted="false" description="JMock2 Context field" enabled="true" name="jmcontext">${:import(org.jmock.Mockery,org.jmock.integration.junit4.JUnit4Mockery)}private Mockery context = new JUnit4Mockery();
+</template><template autoinsert="true" context="java" deleted="false" description="JMock2 Expectations" enabled="true" name="jmexpectations">${:import(org.jmock.Expectations)}context.checking(new Expectations() {{
+ ${cursor}
+}});</template><template autoinsert="true" context="java" deleted="false" description="JMock2 Mock Definition" enabled="true" name="jmmock">${MockClass} ${mockObject} = context.mock(${MockClass}.class);</template><template autoinsert="true" context="java" deleted="false" description="JMock2 Rule (Isis variant)" enabled="true" name="jmrule">${:import(org.junit.Rule,org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2,org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode)}@Rule
+public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES${cursor});
+
+</template><template autoinsert="true" context="java" deleted="false" description="JMock2 RunWith" enabled="true" name="jmrunwith">${:import(org.junit.runner.RunWith,org.jmock.integration.junit4.JMock)}@RunWith(JMock.class)</template><template autoinsert="true" context="java" deleted="false" description="JMock2 Expectation Return Value" enabled="true" name="jmvalue">will(returnValue(${cursor}));</template></templates>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/461e51b7/adocs/documentation/src/main/asciidoc/resources/templates/junit4-templates-idea.xml
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/resources/templates/junit4-templates-idea.xml b/adocs/documentation/src/main/asciidoc/resources/templates/junit4-templates-idea.xml
new file mode 100644
index 0000000..839de50
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/resources/templates/junit4-templates-idea.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<templateSet group="junit4-templates">
+ <template name="juafter" value="@org.junit.After public void tearDown() throws Exception { $END$ }" description="" toReformat="true" toShortenFQNames="true">
+ <context>
+ <option name="HTML" value="false" />
+ <option name="XML" value="false" />
+ <option name="JAVA_CODE" value="true" />
+ <option name="JAVA_COMMENT" value="false" />
+ <option name="JAVA_STRING" value="false" />
+ <option name="COMPLETION" value="false" />
+ <option name="JAVA_SCRIPT" value="false" />
+ <option name="OTHER" value="false" />
+ </context>
+ </template>
+ <template name="juassertThat" value="org.junit.Assert.assertThat($object$, $matcher$);" description="" toReformat="true" toShortenFQNames="true">
+ <variable name="object" expression=""object"" defaultValue="" alwaysStopAt="true" />
+ <variable name="matcher" expression=""matcher"" defaultValue="" alwaysStopAt="true" />
+ <context>
+ <option name="HTML" value="false" />
+ <option name="XML" value="false" />
+ <option name="JAVA_CODE" value="true" />
+ <option name="JAVA_COMMENT" value="false" />
+ <option name="JAVA_STRING" value="false" />
+ <option name="COMPLETION" value="false" />
+ <option name="JAVA_SCRIPT" value="false" />
+ <option name="OTHER" value="false" />
+ </context>
+ </template>
+ <template name="jubefore" value="@org.junit.Before public void setUp() throws Exception { $END$ }" description="" toReformat="true" toShortenFQNames="true">
+ <context>
+ <option name="HTML" value="false" />
+ <option name="XML" value="false" />
+ <option name="JAVA_CODE" value="true" />
+ <option name="JAVA_COMMENT" value="false" />
+ <option name="JAVA_STRING" value="false" />
+ <option name="COMPLETION" value="false" />
+ <option name="JAVA_SCRIPT" value="false" />
+ <option name="OTHER" value="false" />
+ </context>
+ </template>
+ <template name="jutest" value="@org.junit.Test public void $xxx$() throws Exception { $END$ }" description="" toReformat="true" toShortenFQNames="true">
+ <variable name="xxx" expression=""xxx"" defaultValue="" alwaysStopAt="true" />
+ <context>
+ <option name="HTML" value="false" />
+ <option name="XML" value="false" />
+ <option name="JAVA_CODE" value="true" />
+ <option name="JAVA_COMMENT" value="false" />
+ <option name="JAVA_STRING" value="false" />
+ <option name="COMPLETION" value="false" />
+ <option name="JAVA_SCRIPT" value="false" />
+ <option name="OTHER" value="false" />
+ </context>
+ </template>
+</templateSet>
+
http://git-wip-us.apache.org/repos/asf/isis/blob/461e51b7/adocs/documentation/src/main/asciidoc/resources/templates/junit4-templates.xml
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/resources/templates/junit4-templates.xml b/adocs/documentation/src/main/asciidoc/resources/templates/junit4-templates.xml
new file mode 100644
index 0000000..6af90cb
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/resources/templates/junit4-templates.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="java" deleted="false" description="JUnit4 After Method" enabled="true" name="juafter">${:import(org.junit.After)}@After
+public void tearDown() throws Exception {
+ ${cursor}
+}
+</template><template autoinsert="true" context="java" deleted="false" description="JUnit4 AssertThat" enabled="true" name="juassertThat">${:importStatic(org.junit.Assert.assertThat,'org.hamcrest.CoreMatchers.*')}assertThat(${object}, ${matcher});</template><template autoinsert="true" context="java" deleted="false" description="JUnit4 Before Method" enabled="true" name="jubefore">${:import(org.junit.Before)}@Before
+public void setUp() throws Exception {
+ ${cursor}
+}
+</template><template autoinsert="true" context="java" deleted="false" description="JUnit4 Test Method" enabled="true" name="jutest">${:import(org.junit.Test)}@Test
+public void ${xxx}() throws Exception {
+ ${cursor}
+}
+</template></templates>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/461e51b7/adocs/documentation/src/main/asciidoc/resources/thesis/Pawson-Naked-Objects-thesis.pdf
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/resources/thesis/Pawson-Naked-Objects-thesis.pdf b/adocs/documentation/src/main/asciidoc/resources/thesis/Pawson-Naked-Objects-thesis.pdf
new file mode 100644
index 0000000..aca07e4
Binary files /dev/null and b/adocs/documentation/src/main/asciidoc/resources/thesis/Pawson-Naked-Objects-thesis.pdf differ
http://git-wip-us.apache.org/repos/asf/isis/blob/461e51b7/adocs/documentation/src/main/asciidoc/screencasts.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/screencasts.adoc b/adocs/documentation/src/main/asciidoc/screencasts.adoc
new file mode 100644
index 0000000..0d4424e
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/screencasts.adoc
@@ -0,0 +1,199 @@
+[[screencasts]]
+= Screencasts
+: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/
+:toc: right
+
+
+
+pass:[<br/><br/>]
+
+We've prepared some screencasts to help you quickly see what Apache Isis has to offer.
+
+
+== Getting Started
+
+[cols="2a,2a"]
+|===
+
+|How it works (v1.1.0)+
+
+_How Apache Isis builds a webapp from the underlying domain object model_
+
+_This screencast is for Isis v1.1.0 (ie very out of date)_
+
+|video::ludOLyi6VyY[youtube,width="420px",height="315px"]
+
+
+|Todo app walkthrough (v.1.4.0) +
+
+_A run-through of the main features of the (non-ASF) http://github.com/isisaddons/isis-app-todoapp[Isis addons' todoapp]_ +
+
+_nb: the todoapp was previously called the 'quickstart' app_
+
+|video::2leQwavWxeg[youtube,width="420px",height="210px"]
+
+
+|===
+
+
+
+
+== Development Environment
+
+[cols="2a,2a"]
+|===
+
+
+
+|Setting up Eclipse +
+
+_How to import an Apache Isis maven-based application into Eclipse and configure to use with the JDO Objectstore_ +
+
+NB: when configuring DataNucleus for the *dom* project, make sure you are in the 'Java perspective', not the 'Java EE perspective'). +
+
+Learn more link:./user-guide/ug.html#_ug_appendices_dev-env_eclipse[here]
+
+|video::RgcYfjQ8yJA[youtube,width="420px",height="315px"]
+
+
+
+|Setting up IntelliJ +
+
+_How to import an Apache Isis maven-based application into IntelliJ and run the app._ +
+
+Learn more link:./user-guide/ug.html#_ug_appendices_dev-env_intellij[here]
+
+|video::lwKsyTbTSnA[youtube,width="420px",height="315px"]
+
+
+
+|===
+
+
+
+
+== Isis Add-on Modules
+
+[cols="2a,2a"]
+|===
+
+
+|Commands and Auditing (v1.6.0) +
+
+_Configuring the command and auditing add-on modules for the link:./simpleapp-archetype.html[simpleapp]._ +
+
+Learn more at the (non-ASF) Isis addons' http://github.com/isisaddons/isis-module-command[command] and http://github.com/isisaddons/isis-module-audit[audit] modules
+
+|video::g01tK58MxJ8[youtube,width="420px",height="236px"]
+
+
+|Security (v1.6.0) +
+
+_Configuring the security add-on module for for the link:./simpleapp-archetype.html[simpleapp]._ +
+
+Learn more at the (non-ASF) http://github.com/isisaddons/isis-module-security[Isis addons' security] module
+
+|video::bj8735nBRR4[youtube,width="420px",height="236px"]
+
+
+
+|Commands, Auditing, Publishing (v1.5.0) +
+
+_A run-through of the command (profiling) service, auditing service, publishing service. Also shows how commands can be run in the background either explicitly by scheduling through the background service or implicitly by way of a framework annotation._ +
+
+Learn more at the (non-ASF) Isis addons' http://github.com/isisaddons/isis-module-command[command], http://github.com/isisaddons/isis-module-audit[audit] and (non-ASF) http://github.com/isisaddons/isis-module-publishing[publishing] modules.
+
+|video::tqXUZkPB3EI[youtube,width="420px",height="210px"]
+
+
+
+|Bulk updates in Isis (v1.5.0) +
+
+_Using the (non-ASF) http://github.com/isisaddons/isis-module-excel[Isis addons' excel] module and view models to perform bulk updates)._
+
+|video::8SsRDhCUuRc[youtube,width="420px",height="315px"]
+
+
+
+|===
+
+
+
+
+== Wicket Viewer and Isis Add-ons
+
+[cols="2a,2a"]
+|===
+
+
+|Dynamic layouts in the Wicket viewer +
+
+_How to layout properties and collections dynamically_ +
+
+Learn more link:./user-guide/ug.html#_ug_reference-object-layout[here]
+
+|video::zmrg49WeEPc[youtube,width="420px",height="236px"]
+
+
+
+
+|Customizing the Wicket viewer +
+
+_How to customize the Wicket viewer, integrating the (non-ASF) http://github.com/isisaddons/isis-wicket-gmap3[Isis addons' gmap3 ] wicket extension._
+
+|video::9o5zAME8LrM[youtube,width="420px",height="315px"]
+
+
+
+
+|===
+
+
+
+
+== Restful Objects Viewer
+
+[cols="2a,2a"]
+|===
+
+|Using Chrome Tools +
+
+_Interacting with the REST API using Chrome Plugins_
+
+
+|video::_-TOvVYWCHc[youtube,width="420px",height="236px"]
+
+
+
+
+|===
+
+
+
+
+
+== JRebel Integration
+
+_Develop your app without having to redeploy using link:http://zeroturnaround.com/software/jrebel/[JRebel] and an link:https://github.com/danhaywood/isis-jrebel-plugin[Isis plugin] for JRebel._
+
+[cols="2a,2a"]
+|===
+
+|Maven and JRebel
+|video::jpYNZ343gi4[youtube,width="420px",height="236px"]
+
+
+|Eclipse and JRebel
+|video::uPfRXllQV1o[youtube,width="420px",height="236px"]
+
+
+|IntelliJ and JRebel
+|video::fb5VbU-VY8I[youtube,width="420px",height="236px"]
+
+
+|===
+
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/461e51b7/adocs/documentation/src/main/asciidoc/simpleapp-archetype.adoc
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/simpleapp-archetype.adoc b/adocs/documentation/src/main/asciidoc/simpleapp-archetype.adoc
new file mode 100644
index 0000000..bf3eb66
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/simpleapp-archetype.adoc
@@ -0,0 +1,208 @@
+[[simpleapp-archetype]]
+= SimpleApp Archetype
+: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/
+:toc: right
+
+
+
+pass:[<br/><br/>]
+
+The quickest way to get started with Apache Isis is to run the simple archetype. This will generate a very simple one-class domain model, called `SimpleObject`, with a single property `name`. There is also a corresponding `SimpleObjectRepository` domain service. From this you can easily rename these initial classes, and extend to build up your own Isis domain application.
+
+
+
+
+
+== Generating the App
+
+Create a new directory, and `cd` into that directory.
+
+Then run the following command:
+
+[source,bash]
+----
+mvn archetype:generate \
+ -D archetypeGroupId=org.apache.isis.archetype \
+ -D archetypeArtifactId=simpleapp-archetype \
+ -D archetypeVersion=1.8.0 \
+ -D groupId=com.mycompany \
+ -D artifactId=myapp \
+ -D version=1.0-SNAPSHOT \
+ -B
+----
+
+where:
+
+- `groupId` represents your own organization, and
+- `artifactId` is a unique identifier for this app within your organization.
+- `version` is the initial (snapshot) version of your app
+
+The archetype generation process will then run; it only takes a few seconds.
+
+
+
+
+=== Snapshot release
+
+We also maintain the archetype for the most current `-SNAPSHOT`; an app generated with this archetype will contain the latest features of Isis, but the usual caveats apply: some features still in development may be unstable.
+
+The process is almost identical to that for stable releases, however the `archetype:generate` goal is called with slightly different arguments:
+
+[source,bash]
+----
+mvn archetype:generate \
+ -D archetypeGroupId=org.apache.isis.archetype \
+ -D archetypeArtifactId=simpleapp-archetype \
+ -D archetypeVersion=1.9.0-SNAPSHOT \
+ -D groupId=com.mycompany \
+ -D artifactId=myapp \
+ -D version=1.0-SNAPSHOT \
+ -D archetypeRepository=http://repository-estatio.forge.cloudbees.com/snapshot/ \
+ -B
+----
+
+where as before:
+
+- `groupId` represents your own organization, and
+- `artifactId` is a unique identifier for this app within your organization.
+- `version` is the initial (snapshot) version of your app
+
+but also:
+
+- `archetypeVersion` is the SNAPSHOT version of Isis.
+- `archetypeRepository` specifies the location of our snapshot repo (hosted on [CloudBees](http://www.cloudbees.com)), and
+
+The archetype generation process will then run; it only takes a few seconds.
+
+
+
+
+== Building the App
+
+Switch into the root directory of your newly generated app, and build your app:
+
+[source,bash]
+----
+cd myapp
+mvn clean install
+----
+
+where `myapp` is the `artifactId` entered above.
+
+
+
+
+== Running the App
+
+The `simpleapp` archetype generates a single WAR file, configured to run both the link:../../user-guide/ug.html#_ug_wicket-viewer[Wicket viewer] and the link:../../user-guide/ug.html#_ug_restfulobjects-viewer[Restful Objects viewer]. The archetype also configures the JDO/DataNucleus objectstore to use an in-memory HSQLDB connection.
+
+Once you've built the app, you can run the WAR in a variety of ways.
+
+The recommended approach when getting started is to run the self-hosting version of the WAR, allowing Isis to run as a standalone app; for example:
+
+[source,bash]
+----
+java -jar webapp/target/myapp-webapp-1.0-SNAPSHOT-jetty-console.jar
+----
+
+
+
+This can also be accomplished using an embedded Ant target provided in the build script:
+
+
+[source,bash]
+----
+mvn -P self-host antrun:run
+----
+
+
+
+The first is to simply deploying the generated WAR (`webapp/target/myapp-webapp-1.0-SNAPSHOT.war`) to a servlet container.
+
+
+Alternatively, you could run the WAR in a Maven-hosted Jetty instance, though you need to `cd` into the `webapp` module:
+
+[source,bash]
+----
+cd webapp
+mvn jetty:run -D jetty.port=9090
+----
+
+
+In the above, we've passed in a property to indicate a different port from the default port (8080).
+
+Note that if you use `mvn jetty:run`, then the context path changes; check the console output (eg [http://localhost:9090/myapp-webapp](http://localhost:9090/myapp-webapp)).
+
+Finally, you can also run the app by deploying to a standalone servlet container such as [Tomcat](http://tomcat.apache.org).
+
+
+
+
+=== With Fixtures
+
+It is also possible to start the application with a pre-defined set of data; useful for demos or manual exploratory
+testing. This is done by specifying a _fixture script_ on the command line:
+
+
+[source,bash]
+----
+java -jar webapp/target/myapp-webapp-1.0-SNAPSHOT-jetty-console.jar \
+ --initParam isis.persistor.datanucleus.install-fixtures=true \
+ --initParam isis.fixtures=fixture.simple.SimpleObjectsFixture
+----
+
+
+where (in the above example) `fixture.simple.SimpleObjectsFixture` is the fully qualified class name of the fixture
+script to be run.
+
+
+
+
+== Using the App
+
+The archetype provides a welcome page that explains the classes and files generated, and provides detailed guidance and what to do next.
+
+The app itself is configured to run using shiro security, as configured in the `WEB-INF/shiro.ini` config file. To log in, use `sven/pass`.
+
+
+
+== Modifying the App
+
+Once you are familiar with the generated app, you'll want to start modifying it. Check out our the link:../../user-guide/ug.html[User Guide], which has how-tos and a complete reference guide (as well as some background concepts and discussion of more advanced techniques).
+
+If you use IntelliJ or Eclipse, you'll also want to set up your IDE; this is also described in the user guide appendices.
+
+
+== App Structure
+
+As noted above, the generated app is a very simple application consisting of a single domain object that can be easily renamed and extended. The intention is not to showcase all of Isis' capabilities; rather it is to allow you to very easily modify the generated application (eg rename `SimpleObject` to `Customer`) without having to waste time deleting lots of generated code.
+
+
+.Table caption
+[cols="1,1a", options="header"]
+|===
+| Module
+| Description
+
+
+|myapp
+|The parent (aggregator) module
+
+|myapp-dom
+|The domain object model, consisting of <tt>SimpleObject</tt> and <tt>SimpleObjects</tt> (repository) domain service.
+
+|myapp-fixture
+|Domain object fixtures used for initializing the system when being demo'ed or for unit testing.
+
+|myapp-integtests
+|End-to-end integration tests, that exercise from the UI through to the database
+
+|myapp-webapp
+|Run as a webapp (from `web.xml`) using either the Wicket viewer or the RestfulObjects viewer
+
+|===
+
+
+If you run into issues, please don't hesitate to ask for help on the link:../../support.html[users mailing list].
http://git-wip-us.apache.org/repos/asf/isis/blob/461e51b7/adocs/documentation/src/main/asciidoc/slick-1.5.0/.gitignore
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/slick-1.5.0/.gitignore b/adocs/documentation/src/main/asciidoc/slick-1.5.0/.gitignore
new file mode 100644
index 0000000..9ba470d
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/slick-1.5.0/.gitignore
@@ -0,0 +1 @@
+.sass-cache
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/461e51b7/adocs/documentation/src/main/asciidoc/slick-1.5.0/CONTRIBUTING.markdown
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/slick-1.5.0/CONTRIBUTING.markdown b/adocs/documentation/src/main/asciidoc/slick-1.5.0/CONTRIBUTING.markdown
new file mode 100644
index 0000000..f7f51c1
--- /dev/null
+++ b/adocs/documentation/src/main/asciidoc/slick-1.5.0/CONTRIBUTING.markdown
@@ -0,0 +1,33 @@
+## Submitting issues
+
+### Test case required
+
+**All bug reports and problem issues require a jsFiddle**.
+[Please fork this JSFiddle as a baseline](http://jsfiddle.net/nemh9nzk/).
+
++ A test case clearly demonstrates the bug or issue.
++ It contains the bare minimum HTML, CSS, and JavaScript required to demonstrate the bug.
++ A link to your production site is **not** a reduced test case.
+
+Providing a test case is the best way to get your issue addressed. Without a test case; your issue may be closed.
+You must provide a clear and simple way to reproduce the issue with the provided fiddle.
+
+## Support
+
+Although Slick is designed to be super easy to use, there's always things that can go wrong, especially when interacting with other plugins and complicated websites. If you are **having problems getting Slick to work**, or can't figure something out, **this repository**'s issues section **is not the place to ask about it**.
+
+I have set up a subreddit for Slick discussion at [reddit.com/r/slickcarousel](http://www.reddit.com/r/slickcarousel/).
+And a gitter chatroom here: [gitter.im/kenwheeler/slick](https://gitter.im/kenwheeler/slick)
+
+Please use these forums as an area to discuss Slick and any issues you may have.
+
+## Feature Requests
+
+If you would like to request or propose a feature, please do so in the the Slick subreddit or gitter chat:
+[reddit.com/r/slickcarousel](http://www.reddit.com/r/slickcarousel/) / [gitter.im/kenwheeler/slick](https://gitter.im/kenwheeler/slick).
+
+## Pull requests
+
+**Contributions are welcome**! That said, please *be prepared to edit* your pull request at request, and provide a jsFiddle of your fork working interoperably with every "mode" that Slick supports, and with varying numbers of slides, slidesToShow & slidesToScroll. Failure to do so will result in your pull request being closed.
+
+*Please note that while Slick is open source, this is still my baby, and by submitting a pull request you are authorizing me to edit or modify it in any way shape or form. You will be listed in Github as a contributor, but I have and will continue to steer the direction of this project.*