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:13:56 UTC

[14/50] [abbrv] isis git commit: ISIS-1397: bringing applib Interaction and MemberInteractionMementoDto closer into line; to whit...

http://git-wip-us.apache.org/repos/asf/isis/blob/1222341a/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.0.xsd
----------------------------------------------------------------------
diff --git a/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.0.xsd b/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.0.xsd
new file mode 100644
index 0000000..2c2f586
--- /dev/null
+++ b/core/schema/src/main/resources/org/apache/isis/schema/ixn/ixn-1.0.xsd
@@ -0,0 +1,197 @@
+\ufeff<?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.
+-->
+<xs:schema targetNamespace="http://isis.apache.org/schema/ixn"
+           elementFormDefault="qualified"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           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"/>
+
+    <xs:element name="interactionDto">
+        <xs:annotation>
+            <xs:documentation>Represents v1.0 of this schema, replacing and generalizing the earlier 'actionInvocationMemento'.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="majorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="2">
+                    <xs:annotation>
+                        <xs:documentation>The major version of the schema that an XML instance was created using.
+                        </xs:documentation>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="0">
+                    <xs:annotation>
+                        <xs:documentation>The minor version of the schema that an XML instance was created using.
+                        </xs:documentation>
+                    </xs:annotation>
+                </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>
+                    </xs:annotation>
+                </xs:element>
+                <xs:element name="execution" type="interactionExecutionDto"/>
+            </xs:sequence>
+        </xs:complexType>
+
+    </xs:element>
+
+    <xs:complexType name="interactionExecutionDto" abstract="true">
+        <xs:annotation>
+            <xs:documentation>Represents either an action invocation or a property modification.  Is subclassed by both.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="id" type="xs:string">
+                <xs:annotation>
+                    <xs:documentation>Unique identifier for this individual member interaction, in the format &quot;transactionId.sequence&quot; (where 'transactionId' is part of the owning 'memberInteractionMementoDto' and 'sequence' is defined below).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="sequence" type="xs:int">
+                <xs:annotation>
+                    <xs:documentation>Unique sequence number of an individual member interaction within a transaction.  There could be many such member interactions (within a single transaction ) for two reasons: either a single top-level interaction could call sub-interactions (by virtue of WrapperFactory), or there may be a bulk action interaction against many targets.
+                    </xs:documentation>
+                </xs:annotation>
+            </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>
+                </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>
+                </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:element name="timings" type="common:periodDto">
+                <xs:annotation>
+                    <xs:documentation>Captures the time taken to perform the member interaction (invoke the action, or modify the property).
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="threw" type="exceptionDto" minOccurs="0" maxOccurs="1">
+                <xs:annotation>
+                    <xs:documentation>Captures any exception thrown by an action.  Either the 'returned' or the 'threw' element will be populated.
+                    </xs:documentation>
+                </xs:annotation>
+            </xs:element>
+            <xs:element name="subExecutions" minOccurs="1" maxOccurs="1">
+                <xs:complexType>
+                    <xs:sequence>
+                        <xs:element name="subExecution" type="interactionExecutionDto" 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>
+                            </xs:annotation>
+                        </xs:element>
+                    </xs:sequence>
+                </xs:complexType>
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+
+    <xs:complexType name="actionInvocationDto">
+        <xs:complexContent>
+            <xs:extension base="interactionExecutionDto">
+                <xs:sequence>
+                    <xs:element name="parameters" minOccurs="1" maxOccurs="1">
+                        <xs:annotation>
+                            <xs:documentation>
+                                The set 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:annotation>
+                            <xs:documentation>The value returned by this action (including the type of that returned value).  Either the 'returned' or the 'threw' element (from 'memberInteractionDto') will be populated.
+                            </xs:documentation>
+                        </xs:annotation>
+                    </xs:element>
+                </xs:sequence>
+            </xs:extension>
+        </xs:complexContent>
+    </xs:complexType>
+
+    <xs:complexType name="propertyModificationDto">
+        <xs:complexContent>
+            <xs:extension base="interactionExecutionDto">
+                <xs:sequence>
+                    <xs:element name="newValue" type="cmd:paramDto"/>
+                </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: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>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>

http://git-wip-us.apache.org/repos/asf/isis/blob/1222341a/core/schema/src/main/resources/org/apache/isis/schema/mim/mim-1.0-binding.xml
----------------------------------------------------------------------
diff --git a/core/schema/src/main/resources/org/apache/isis/schema/mim/mim-1.0-binding.xml b/core/schema/src/main/resources/org/apache/isis/schema/mim/mim-1.0-binding.xml
deleted file mode 100644
index b185a42..0000000
--- a/core/schema/src/main/resources/org/apache/isis/schema/mim/mim-1.0-binding.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?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.
--->
-<jaxb:bindings xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
-               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-               jaxb:version="2.0"
-               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-               xmlns:namespace="http://jaxb2-commons.dev.java.net/namespace-prefix"
-               xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
-			  http://jaxb2-commons.dev.java.net/namespace-prefix http://java.net/projects/jaxb2-commons/sources/svn/content/namespace-prefix/trunk/src/main/resources/prefix-namespace-schema.xsd"
->
-    <jaxb:bindings schemaLocation="mim-1.0.xsd">
-        <jaxb:schemaBindings>
-            <!--
-            we don't include the minor version, because the
-            generated Java class will be backwards compatible
-            -->
-            <jaxb:package name="org.apache.isis.schema.mim.v1"/>
-        </jaxb:schemaBindings>
-        <jaxb:bindings>
-            <namespace:prefix name="aim" />
-        </jaxb:bindings>
-    </jaxb:bindings>
-    <!-- since mim-1.0.xsd does an xs:import of common-1.0.xsd, we need to specify common's package bindings -->
-    <jaxb:bindings schemaLocation="../common/common-1.0.xsd">
-        <jaxb:schemaBindings>
-            <!--
-            we don't include the minor version, because the
-            generated Java class will be backwards compatible
-            -->
-            <jaxb:package name="org.apache.isis.schema.common.v1"/>
-        </jaxb:schemaBindings>
-        <jaxb:bindings>
-            <namespace:prefix name="common" />
-        </jaxb:bindings>
-    </jaxb:bindings>
-    <!-- since mim-1.0.xsd does an xs:import of cmd-1.0.xsd, we need to specify common's package bindings -->
-    <jaxb:bindings schemaLocation="../cmd/cmd-1.0.xsd">
-        <jaxb:schemaBindings>
-            <!--
-            we don't include the minor version, because the
-            generated Java class will be backwards compatible
-            -->
-            <jaxb:package name="org.apache.isis.schema.cmd.v1"/>
-        </jaxb:schemaBindings>
-        <jaxb:bindings>
-            <namespace:prefix name="cmd" />
-        </jaxb:bindings>
-    </jaxb:bindings>
-</jaxb:bindings>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/1222341a/core/schema/src/main/resources/org/apache/isis/schema/mim/mim-1.0.xsd
----------------------------------------------------------------------
diff --git a/core/schema/src/main/resources/org/apache/isis/schema/mim/mim-1.0.xsd b/core/schema/src/main/resources/org/apache/isis/schema/mim/mim-1.0.xsd
deleted file mode 100644
index 2a2a49e..0000000
--- a/core/schema/src/main/resources/org/apache/isis/schema/mim/mim-1.0.xsd
+++ /dev/null
@@ -1,191 +0,0 @@
-\ufeff<?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.
--->
-<xs:schema targetNamespace="http://isis.apache.org/schema/mim"
-           elementFormDefault="qualified"
-           xmlns:xs="http://www.w3.org/2001/XMLSchema"
-           xmlns="http://isis.apache.org/schema/mim"
-           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"/>
-
-    <xs:element name="memberInteractionMementoDto">
-        <xs:annotation>
-            <xs:documentation>Represents v1.0 of this schema, replacing and generalizing the earlier 'actionInvocationMemento'.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element name="majorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="2">
-                    <xs:annotation>
-                        <xs:documentation>The major version of the schema that an XML instance was created using.
-                        </xs:documentation>
-                    </xs:annotation>
-                </xs:element>
-                <xs:element name="minorVersion" type="xs:string" minOccurs="0" maxOccurs="1" default="0">
-                    <xs:annotation>
-                        <xs:documentation>The minor version of the schema that an XML instance was created using.
-                        </xs:documentation>
-                    </xs:annotation>
-                </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>
-                    </xs:annotation>
-                </xs:element>
-                <xs:element name="interaction" type="memberInteractionDto"/>
-                <xs:element name="subInteractions" type="memberInteractionDto" 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>
-                    </xs:annotation>
-                </xs:element>
-            </xs:sequence>
-        </xs:complexType>
-
-    </xs:element>
-
-    <xs:complexType name="memberInteractionDto" abstract="true">
-        <xs:annotation>
-            <xs:documentation>Represents either an action invocation or a property modification.  Is subclassed by both.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:sequence>
-            <xs:element name="id" type="xs:string">
-                <xs:annotation>
-                    <xs:documentation>Unique identifier for this individual member interaction, in the format &quot;transactionId.sequence&quot; (where 'transactionId' is part of the owning 'memberInteractionMementoDto' and 'sequence' is defined below).
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="sequence" type="xs:int">
-                <xs:annotation>
-                    <xs:documentation>Unique sequence number of an individual member interaction within a transaction.  There could be many such member interactions (within a single transaction ) for two reasons: either a single top-level interaction could call sub-interactions (by virtue of WrapperFactory), or there may be a bulk action interaction against many targets.
-                    </xs:documentation>
-                </xs:annotation>
-            </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>
-                </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>
-                </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:element name="timings" type="common:periodDto">
-                <xs:annotation>
-                    <xs:documentation>Captures the time taken to perform the member interaction (invoke the action, or modify the property).
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-            <xs:element name="threw" type="exceptionDto" minOccurs="0" maxOccurs="1">
-                <xs:annotation>
-                    <xs:documentation>Captures any exception thrown by an action.  Either the 'returned' or the 'threw' element will be populated.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:element>
-        </xs:sequence>
-    </xs:complexType>
-
-    <xs:complexType name="actionInvocationDto">
-        <xs:complexContent>
-            <xs:extension base="memberInteractionDto">
-                <xs:sequence>
-                    <xs:element name="parameters" minOccurs="1" maxOccurs="1">
-                        <xs:annotation>
-                            <xs:documentation>
-                                The set 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:annotation>
-                            <xs:documentation>The value returned by this action (including the type of that returned value).  Either the 'returned' or the 'threw' element (from 'memberInteractionDto') will be populated.
-                            </xs:documentation>
-                        </xs:annotation>
-                    </xs:element>
-                </xs:sequence>
-            </xs:extension>
-        </xs:complexContent>
-    </xs:complexType>
-
-    <xs:complexType name="propertyModificationDto">
-        <xs:complexContent>
-            <xs:extension base="memberInteractionDto">
-                <xs:sequence>
-                    <xs:element name="newValue" type="cmd:paramDto"/>
-                </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: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>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>