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 2016/04/14 12:46:35 UTC

[2/2] isis git commit: ISIS-1291: updating the website with latest version of aim.xsd (for v1.1).

ISIS-1291: updating the website with latest version of aim.xsd (for v1.1).


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/6b62b45b
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/6b62b45b
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/6b62b45b

Branch: refs/heads/ISIS-1291
Commit: 6b62b45bd2af860444f4f44fd2f767aead0beef2
Parents: 76cbd96
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Apr 14 11:46:19 2016 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Apr 14 11:46:19 2016 +0100

----------------------------------------------------------------------
 .../src/main/asciidoc/schema/aim/aim-1.0.xsd    | 203 +++++++++++++++----
 1 file changed, 167 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/6b62b45b/adocs/documentation/src/main/asciidoc/schema/aim/aim-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/aim/aim-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/aim/aim-1.0.xsd
index 749fcd0..9a5c902 100644
--- a/adocs/documentation/src/main/asciidoc/schema/aim/aim-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/aim/aim-1.0.xsd
@@ -23,46 +23,147 @@
            xmlns="http://isis.apache.org/schema/aim"
            xmlns:common="http://isis.apache.org/schema/common">
 
-    <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="http://isis.apache.org/schema/common/common-1.0.xsd"/>
+    <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.0.xsd"/>
 
-    <xs:element name="actionInvocationMementoDto">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="metadata">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="transactionId" type="xs:string"/>
-                            <xs:element name="sequence" type="xs:int"/>
-                            <xs:element name="timestamp" type="xs:dateTime"/>
-                            <xs:element name="target" type="common:oidDto"/>
-                            <xs:element name="targetClass" type="xs:string"/>
-                            <xs:element name="targetAction" type="xs:string"/>
-                            <xs:element name="actionIdentifier" type="xs:string"/>
-                            <xs:element name="user" type="xs:string"/>
-                            <xs:element name="title" type="xs:string"/>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-                <xs:element name="payload">
-                    <xs:complexType>
-                        <xs:sequence>
-                            <xs:element name="parameters">
-                                <xs:complexType>
-                                    <xs:sequence maxOccurs="unbounded">
-                                        <xs:element name="param" type="paramDto"/>
-                                    </xs:sequence>
-                                    <xs:attribute name="num" use="required" type="xs:int"/>
-                                </xs:complexType>
-                            </xs:element>
-                            <xs:element name="return" type="common:valueDto" minOccurs="0" maxOccurs="1"/>
-                        </xs:sequence>
-                    </xs:complexType>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
+    <xs:element name="actionInvocationMementoDto" type="actionInvocationMementoDto">
+        <xs:annotation>
+            <xs:documentation>Represents v1.1 of this schema.  Changes since v1.0 are the 'majorVersion' and 'minorVersion', the 'mixedIn' element, the 'returned' element.
+            </xs:documentation>
+        </xs:annotation>
     </xs:element>
 
+    <xs:complexType name="actionInvocationMementoDto">
+        <xs:sequence>
+            <xs:element name="majorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="1">
+                <xs:annotation>
+                    <xs:documentation>Introduced in v1.1. The major version of the schema that an XML instance was created using.  This element is optional for backward compatibility, but will be populated for any v1.1+ instances of this schema.  If missing, assume '0'.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="1">
+                <xs:annotation>
+                    <xs:documentation>Introduced in v1.1. The minor version of the schema that an XML instance was created using.  This element is optional for backward compatibility, but will be populated for any v1.1+ instances of this schema.  If missing, assume '0'.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="metadata">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="transactionId" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>Transaction id that this action was invoked.  Can be used to locate the corresponding Command object (which may have been persisted).  However, there could be many such actions (eg by virtue of WrapperFactory); the 'sequence' is used to provide a unique id for each action invocation.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                        <xs:element name="sequence" type="xs:int">
+                            <xs:annotation>
+                                <xs:documentation>The combination of ['transactionId', 'sequence'] is guaranteed to be unique.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                        <xs:element name="timestamp" type="xs:dateTime">
+                            <xs:annotation>
+                                <xs:documentation>The point in time that this action was invoked.  See also 'timestampComplete'.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                        <xs:element name="timestampComplete" type="xs:dateTime" minOccurs="0" maxOccurs="1">
+                            <xs:annotation>
+                                <xs:documentation>Introduced in v1.1. The point in time that this action completed.  The duration that the action took is the difference between 'timestamp' and 'timestampComplete'.  This element is optional for backward compatibility, but will be populated for any v1.1 instances of this schema.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                        <xs:element name="mixinFqClassName" type="xs:string" minOccurs="0" maxOccurs="1">
+                            <xs:annotation>
+                                <xs:documentation>Introduced in v1.1. Populated only for mixin actions, is the fully qualified class name of the mixin type.  This element is optional for backward compatibility, but will be populated for any v1.1+ instances of this schema for to mixin actions.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                        <xs:element name="target" type="common:oidDto">
+                            <xs:annotation>
+                                <xs:documentation>For regular actions, represents the entity or view model upon which the action is invoked.  For mixin actions, is the object being mixed-into (the constructor arg to the mixin).  For contributed actions, is the domain service (the contributee object will be one of the action arguments within the payload).  Mixin actions can be determined by the presence of the 'mixinClass' element (v1.1+ instances of the schema).
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                        <xs:element name="targetClass" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>User-friendly representation of the target's class.  For the formal target' type, use the 'target' element (an oidDto)
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                        <xs:element name="targetAction" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>User-friendly representation of the action being invoked.  For the formal action identifier, use the 'actionIdentifier' element.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                        <xs:element name="actionIdentifier" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>Formal identifier of the action being invoked.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                        <xs:element name="user" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>The name of the user that invoked this action.  Note that this isn't necessarily the user that initiated the original command; the SudoService may be being used to temporarily switch the effective user.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                        <xs:element name="title" type="xs:string">
+                            <xs:annotation>
+                                <xs:documentation>User-friendly title of the 'target' object.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="payload">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="parameters">
+                            <xs:complexType>
+                                <xs:sequence maxOccurs="unbounded">
+                                    <xs:element name="param" type="paramDto"/>
+                                </xs:sequence>
+                                <xs:attribute name="num" use="required" type="xs:int"/>
+                            </xs:complexType>
+                        </xs:element>
+                        <xs:element name="return" type="common:valueDto" minOccurs="0" maxOccurs="1">
+                            <xs:annotation>
+                                <xs:documentation>Deprecated in v1.1; use the 'returned' element (which also provides the return type) instead.  For v1.1+ instances of this schema (representing a completed action), either both 'return' and 'returned' will be populated, or the 'threw' element will be populated.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                        <xs:element name="returned" type="returnDto" minOccurs="0" maxOccurs="1">
+                            <xs:annotation>
+                                <xs:documentation>Introduced in v1.1, replaces the deprecated 'return' element (which exposes the return value, but not the return type).  For v1.1+ instances of this schema (representing a completed action), either both 'return' and 'returned' will be populated, or the 'threw' element will be populated.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                        <xs:element name="threw" type="exceptionDto" minOccurs="0" maxOccurs="1">
+                            <xs:annotation>
+                                <xs:documentation>Introduced in v1.1. Captures any exception thrown by an action.  For v1.1+ instances of this schema (representing a completed action), either both 'return' and 'returned' will be populated, or the 'threw' element will be populated.
+                                </xs:documentation>
+                            </xs:annotation>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+            <xs:element name="subActions" type="actionInvocationMementoDto" minOccurs="0" maxOccurs="unbounded">
+                <xs:annotation>
+                    <xs:documentation>Introduced in v1.1. Capture sub-actions (if-any) invoked from this action, for example using the WrapperFactory service.  These therefore define a graph/call-stack of actions.  Note that the subactions will redundantly also specify their majorVersion and minorVersion (the alternative would have required restructuring in such a way as to break backward compatibility).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
     <xs:complexType name="paramDto">
+        <xs:annotation>
+            <xs:documentation>The parameter types and values (ie arguments) of action parameters.
+            </xs:documentation>
+        </xs:annotation>
         <xs:sequence>
             <xs:element name="value" type="common:valueDto"/>
         </xs:sequence>
@@ -71,4 +172,34 @@
         <xs:attribute name="null" use="optional" type="xs:boolean"/>
     </xs:complexType>
 
+    <xs:complexType name="returnDto">
+        <xs:annotation>
+            <xs:documentation>Introduced in v1.1.  Captures both the value returned of an action, and also the type of that returned value.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="value" type="common:valueDto"/>
+        </xs:sequence>
+        <xs:attribute name="returnType" use="required" type="common:valueType"/>
+        <xs:attribute name="null" use="optional" type="xs:boolean"/>
+    </xs:complexType>
+
+    <xs:complexType name="exceptionDto">
+        <xs:annotation>
+            <xs:documentation>Introduced in v1.1, captures any exception thrown by an action invocation.  Use as the xsd:type of the 'threw' element.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="message" type="xs:string"/>
+            <xs:element name="stackTrace" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>A formatted stack trace.  (A future version of the 'exceptionDto' element might refine this to more easily
+                        parseable stack trace elements).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="causedBy" type="exceptionDto" minOccurs="0" maxOccurs="1"/>
+        </xs:sequence>
+    </xs:complexType>
+
 </xs:schema>