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/05/13 18:14:16 UTC

[34/50] [abbrv] isis git commit: ISIS-1291: documentation - updating the ixn, cmd and common XSDs, all of which were out of date.

ISIS-1291: documentation - updating the ixn, cmd and common XSDs, all of which were out of date.


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

Branch: refs/heads/master
Commit: 64d2fe66a6af6e6baa8c891432f5e7cfd0ae67cd
Parents: 4ce54bc
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat May 7 16:00:12 2016 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sat May 7 16:00:12 2016 +0100

----------------------------------------------------------------------
 .../src/main/asciidoc/schema/cmd/cmd-1.0.xsd    | 47 ++++++----
 .../main/asciidoc/schema/common/common-1.0.xsd  | 62 ++++++++++++-
 .../src/main/asciidoc/schema/ixn/ixn-1.0.xsd    | 95 +++++++++++++-------
 3 files changed, 151 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/64d2fe66/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.0.xsd
index a5c02cf..53bc0fb 100644
--- a/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/cmd/cmd-1.0.xsd
@@ -50,13 +50,12 @@
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="targets" type="common:oidDto" minOccurs="1" maxOccurs="unbounded">
+                <xs:element name="targets" type="common:oidsDto">
                     <xs:annotation>
                         <xs:documentation>For regular actions, represents the entity/entities or view model(s) upon which the action is to be invoked.  For mixin actions, is the object(s) 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).  Note that this means that bulk contributed actions cannot be reified as a memento (for this use case, implement as a mixin action instead).
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="interactionType" type="common:interactionType"/>
                 <xs:element name="member" type="memberDto">
                     <xs:annotation>
                         <xs:documentation>The action or property (identifier and parameter arguments) to be invoked on the target object(s).</xs:documentation>
@@ -85,6 +84,12 @@
                 </xs:annotation>
             </xs:element>
         </xs:sequence>
+        <xs:attribute  name="interactionType" type="common:interactionType">
+            <xs:annotation>
+                <xs:documentation>Indicates whether this is an intention to invoke an action, or edit a property.
+                </xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
     </xs:complexType>
 
     <xs:complexType name="actionDto">
@@ -95,9 +100,12 @@
         <xs:complexContent>
             <xs:extension base="memberDto">
                 <xs:sequence>
-                    <xs:sequence minOccurs="0" maxOccurs="unbounded">
-                        <xs:element name="parameters" type="paramDto"/>
-                    </xs:sequence>
+                    <xs:element name="parameters" type="paramsDto">
+                        <xs:annotation>
+                            <xs:documentation>The list of parameter/argument values for this action invocation.
+                            </xs:documentation>
+                        </xs:annotation>
+                    </xs:element>
                 </xs:sequence>
             </xs:extension>
         </xs:complexContent>
@@ -111,27 +119,32 @@
         <xs:complexContent>
             <xs:extension base="memberDto">
                 <xs:sequence>
-                    <xs:element name="newValue" type="paramDto"/>
+                    <xs:element name="newValue" type="common:valueWithTypeDto"/>
                 </xs:sequence>
             </xs:extension>
         </xs:complexContent>
     </xs:complexType>
 
-    <xs:complexType name="paramDto">
+    <xs:complexType name="paramsDto">
         <xs:annotation>
-            <xs:documentation>The parameter types and values (ie arguments) of action parameters or the new value for a property.
+            <xs:documentation>A list of of parameter/argument values.
             </xs:documentation>
         </xs:annotation>
-        <xs:sequence>
-            <xs:element name="argument" type="common:valueDto">
-                <xs:annotation>
-                    <xs:documentation>The argument value of this parameter.</xs:documentation>
-                </xs:annotation>
-            </xs:element>
+        <xs:sequence minOccurs="0" maxOccurs="unbounded">
+            <xs:element name="parameter" type="paramDto"/>
         </xs:sequence>
-        <xs:attribute name="parameterName" use="required" type="xs:string"/>
-        <xs:attribute name="parameterType" use="required" type="common:valueType"/>
-        <xs:attribute name="null" use="optional" type="xs:boolean"/>
+    </xs:complexType>
+
+    <xs:complexType name="paramDto">
+        <xs:annotation>
+            <xs:documentation>Defines an action parameter: its name, type and value (ie provided argument).
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="common:valueWithTypeDto">
+                <xs:attribute name="name" use="required" type="xs:string"/>
+            </xs:extension>
+        </xs:complexContent>
     </xs:complexType>
 
 

http://git-wip-us.apache.org/repos/asf/isis/blob/64d2fe66/adocs/documentation/src/main/asciidoc/schema/common/common-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/common/common-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/common/common-1.0.xsd
index bfd25cb..f38a9d4 100644
--- a/adocs/documentation/src/main/asciidoc/schema/common/common-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/common/common-1.0.xsd
@@ -39,6 +39,7 @@
             <xs:element name="localDate" type="xs:date"/>
             <xs:element name="localDateTime" type="xs:dateTime"/>
             <xs:element name="localTime" type="xs:time"/>
+            <xs:element name="timestamp" type="xs:dateTime"/>
             <xs:element name="enum" type="enumDto"/>
             <xs:element name="reference" type="oidDto"/>
         </xs:choice>
@@ -52,6 +53,16 @@
         <xs:attribute name="objectState" type="bookmarkObjectState" default="persistent"/>
     </xs:complexType>
 
+    <xs:complexType name="oidsDto">
+        <xs:annotation>
+            <xs:documentation>A list of OIDs
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="oid" type="oidDto" minOccurs="1" maxOccurs="unbounded"/>
+        </xs:sequence>
+    </xs:complexType>
+
     <xs:complexType name="enumDto">
         <xs:sequence>
             <xs:element name="enumType" type="xs:string"/>
@@ -80,7 +91,7 @@
             <xs:enumeration value="char"/>
             <xs:enumeration value="bigInteger"/>
             <xs:enumeration value="bigDecimal"/>
-            <xs:enumeration value="javaUtilDate"/>
+            <xs:enumeration value="javaSqlTimestamp"/>
             <xs:enumeration value="jodaDateTime"/>
             <xs:enumeration value="jodaLocalDate"/>
             <xs:enumeration value="jodaLocalTime"/>
@@ -103,13 +114,13 @@
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
-            <xs:element name="start" type="xs:dateTime">
+            <xs:element name="startedAt" type="xs:dateTime">
                 <xs:annotation>
                     <xs:documentation>The point in time that this period of time started.
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="complete" type="xs:dateTime" minOccurs="0" maxOccurs="1">
+            <xs:element name="completedAt" type="xs:dateTime" minOccurs="0" maxOccurs="1">
                 <xs:annotation>
                     <xs:documentation>The point in time that this period of time completed.  The duration is the difference between 'start' and 'complete'.
                     </xs:documentation>
@@ -118,5 +129,50 @@
         </xs:sequence>
     </xs:complexType>
 
+    <xs:complexType name="differenceDto">
+        <xs:annotation>
+            <xs:documentation>Captures a pair of numbers representing a difference.  Used for example to capture metrics (number objects modified before and after).
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+        </xs:sequence>
+        <xs:attribute name="before" type="xs:int">
+            <xs:annotation>
+                <xs:documentation>The initial quantity.
+                </xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="after" type="xs:int">
+            <xs:annotation>
+                <xs:documentation>The final quantity, once known.  The difference is therefore the computation of (after - before).
+                </xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+
+    <xs:complexType name="valueWithTypeDto">
+        <xs:annotation>
+            <xs:documentation>Captures both a value and its corresponding type.  Used for the return value of action invocations, and for the new value in property edits.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexContent>
+            <xs:extension base="valueDto">
+                <xs:attribute name="type" use="required" type="valueType"/>
+                <xs:attribute name="null" use="optional" type="xs:boolean"/>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+
+    <xs:simpleType name="interactionType" >
+        <xs:annotation>
+            <xs:documentation>Whether this interaction with a member is invoking an action, or editing a property.</xs:documentation>
+        </xs:annotation>
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="action_invocation" />
+            <xs:enumeration value="property_edit" />
+        </xs:restriction>
+    </xs:simpleType>
+
 
 </xs:schema>

http://git-wip-us.apache.org/repos/asf/isis/blob/64d2fe66/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd
----------------------------------------------------------------------
diff --git a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd
index 072825d..eec8114 100644
--- a/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd
+++ b/adocs/documentation/src/main/asciidoc/schema/ixn/ixn-1.0.xsd
@@ -23,7 +23,7 @@
            xmlns="http://isis.apache.org/schema/ixn"
            xmlns:cmd="http://isis.apache.org/schema/cmd"
            xmlns:common="http://isis.apache.org/schema/common"
-        >
+>
 
     <xs:import namespace="http://isis.apache.org/schema/common" schemaLocation="../common/common-1.0.xsd"/>
     <xs:import namespace="http://isis.apache.org/schema/cmd" schemaLocation="../cmd/cmd-1.0.xsd"/>
@@ -49,20 +49,19 @@
                 </xs:element>
                 <xs:element name="transactionId" type="xs:string">
                     <xs:annotation>
-                        <xs:documentation>Transaction id within which this member was interacted with (action invoked/property modified); can be used to locate the corresponding Command object (which may have been persisted).
+                        <xs:documentation>Transaction id within which this member was interacted with (action invoked/property edited); can be used to locate the corresponding Command object (which may have been persisted).
                         </xs:documentation>
                     </xs:annotation>
                 </xs:element>
-                <xs:element name="execution" type="interactionExecutionDto"/>
-                <xs:element name="interactionType" type="common:interactionType"/>
+                <xs:element name="execution" type="memberExecutionDto"/>
             </xs:sequence>
         </xs:complexType>
 
     </xs:element>
 
-    <xs:complexType name="interactionExecutionDto" abstract="true">
+    <xs:complexType name="memberExecutionDto" abstract="true">
         <xs:annotation>
-            <xs:documentation>Represents either an action invocation or a property modification.  Is subclassed by both.
+            <xs:documentation>Represents either an action invocation or a property edit.  Is subclassed by both.
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
@@ -80,13 +79,13 @@
             </xs:element>
             <xs:element name="target" type="common:oidDto" minOccurs="1" maxOccurs="1">
                 <xs:annotation>
-                    <xs:documentation>For target domain object being interacted with.  For regular actions/properties, represents the entity or view model upon which the action is to be invoked/property modified.  For mixin actions/properties, is the object being mixed-into (the constructor arg to the mixin).  For contributed actions/properties, is the domain service (the contributee object will be one of the action arguments within the payload).
+                    <xs:documentation>For target domain object being interacted with.  For regular actions/properties, represents the entity or view model upon which the action is to be invoked/property edited.  For mixin actions/properties, is the object being mixed-into (the constructor arg to the mixin).  For contributed actions/properties, is the domain service (the contributee object will be one of the action arguments within the payload).
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
             <xs:element name="memberIdentifier" type="xs:string">
                 <xs:annotation>
-                    <xs:documentation>Formal identifier of the member being interacted with (action or property).
+                    <xs:documentation>Formal identifier (class name and member name) of the member being interacted with (action or property).
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
@@ -102,9 +101,9 @@
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="timings" type="common:periodDto">
+            <xs:element name="metrics" type="metricsDto">
                 <xs:annotation>
-                    <xs:documentation>Captures the time taken to perform the member interaction (invoke the action, or modify the property).
+                    <xs:documentation>Profiling metrics capturng the this time/number of objects affected as a result of performing this member interaction (invoke the action, or edit the property).
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
@@ -114,12 +113,12 @@
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
-            <xs:element name="childExecutions" minOccurs="1" maxOccurs="1">
+            <xs:element name="childExecutions" minOccurs="0" maxOccurs="1">
                 <xs:complexType>
                     <xs:sequence>
-                        <xs:element name="execution" type="interactionExecutionDto" minOccurs="0" maxOccurs="unbounded">
+                        <xs:element name="execution" type="memberExecutionDto" minOccurs="0" maxOccurs="unbounded">
                             <xs:annotation>
-                                <xs:documentation>Capture interactions with other members from this interaction, using the WrapperFactory service.  Typically this will be actions invoking other actions, but it is also possible for an action to perform a property modification, and - much rarer - for a property modification to invoke an action.  Whatever; these interactions nest together into a call/stack, more generally into a graph.
+                                <xs:documentation>Capture interactions with other members from this interaction, using the WrapperFactory service.  Typically this will be actions invoking other actions, but it is also possible for an action to perform a property edit, and - much rarer - for a property edit to invoke an action.  Whatever; these interactions nest together into a call/stack, more generally into a graph.
                                 </xs:documentation>
                             </xs:annotation>
                         </xs:element>
@@ -127,25 +126,25 @@
                 </xs:complexType>
             </xs:element>
         </xs:sequence>
+        <xs:attribute  name="interactionType" type="common:interactionType">
+            <xs:annotation>
+                <xs:documentation>Indicates whether this is an intention to invoke an action, or edit a property.
+                </xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
     </xs:complexType>
 
     <xs:complexType name="actionInvocationDto">
         <xs:complexContent>
-            <xs:extension base="interactionExecutionDto">
+            <xs:extension base="memberExecutionDto">
                 <xs:sequence>
-                    <xs:element name="parameters" minOccurs="1" maxOccurs="1">
+                    <xs:element name="parameters" type="cmd:paramsDto">
                         <xs:annotation>
-                            <xs:documentation>
-                                The set of parameter/argument values for this action invocation.
+                            <xs:documentation>The list of parameter/argument values for this action invocation.
                             </xs:documentation>
                         </xs:annotation>
-                        <xs:complexType>
-                            <xs:sequence minOccurs="0" maxOccurs="unbounded">
-                                <xs:element name="parameter" type="cmd:paramDto"/>
-                            </xs:sequence>
-                        </xs:complexType>
                     </xs:element>
-                    <xs:element name="returned" type="returnDto" minOccurs="0" maxOccurs="1">
+                    <xs:element name="returned" type="common:valueWithTypeDto" minOccurs="0" maxOccurs="1">
                         <xs:annotation>
                             <xs:documentation>The value returned by this action (including the type of that returned value).  Either the 'returned' or the 'threw' element (from 'memberExecutionDto') will be populated.
                             </xs:documentation>
@@ -158,24 +157,54 @@
 
     <xs:complexType name="propertyEditDto">
         <xs:complexContent>
-            <xs:extension base="interactionExecutionDto">
+            <xs:extension base="memberExecutionDto">
                 <xs:sequence>
-                    <xs:element name="newValue" type="cmd:paramDto"/>
+                    <xs:element name="newValue" type="common:valueWithTypeDto"/>
                 </xs:sequence>
             </xs:extension>
         </xs:complexContent>
     </xs:complexType>
 
-    <xs:complexType name="returnDto">
-        <xs:annotation>
-            <xs:documentation>Captures both the value returned of an action, and also the type of that returned value.
-            </xs:documentation>
-        </xs:annotation>
+    <xs:complexType name="metricsDto">
         <xs:sequence>
-            <xs:element name="value" type="common:valueDto"/>
+            <xs:element name="timings" type="common:periodDto">
+                <xs:annotation>
+                    <xs:documentation>The time taken to perform the member interaction (invoke the action, or edit the property).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="objectCounts" type="objectCountsDto">
+                <xs:annotation>
+                    <xs:documentation>How many objets were affected by the member interaction.
+                    </xs:documentation>
+                </xs:annotation>
+
+            </xs:element>
         </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="objectCountsDto">
+        <xs:sequence>
+            <xs:element name="numberObjectsLoaded" type="common:differenceDto">
+                <xs:annotation>
+                    <xs:documentation>The number of objects loaded.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="numberObjectsDirtied" type="common:differenceDto">
+                <xs:annotation>
+                    <xs:documentation>The number of objects dirtied (ie updated).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="numberObjectPropertiesModified" type="common:differenceDto">
+                <xs:annotation>
+                    <xs:documentation>The number of individual properties of objects that were modified (eg as per individual calls to AuditingService).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+        </xs:sequence>
+
     </xs:complexType>
 
     <xs:complexType name="exceptionDto">