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/04 09:11:57 UTC

[5/8] isis git commit: ISIS-1389: renaming PropertyModification to PropertyEdit.

ISIS-1389: renaming PropertyModification to PropertyEdit.


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

Branch: refs/heads/ISIS-1291
Commit: d08a4e18450e480779eee328de38d3c14088e357
Parents: 501fcb8
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed May 4 00:36:15 2016 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed May 4 00:36:15 2016 +0100

----------------------------------------------------------------------
 .../isis/applib/services/iactn/Interaction.java | 16 ++++-----
 .../isis/schema/utils/InteractionDtoUtils.java  | 36 ++++++++++----------
 .../org/apache/isis/schema/utils/Roundtrip.java |  2 +-
 ...etterOrClearFacetForDomainEventAbstract.java |  8 ++---
 .../ixn/InteractionDtoServiceInternal.java      |  4 +--
 .../CommandDtoServiceInternalDefault.java       |  6 ++--
 .../InteractionDtoServiceInternalDefault.java   |  4 +--
 .../apache/isis/schema/common/common-1.0.xsd    |  4 +--
 .../org/apache/isis/schema/ixn/ixn-1.0.xsd      | 16 ++++-----
 9 files changed, 48 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/d08a4e18/core/applib/src/main/java/org/apache/isis/applib/services/iactn/Interaction.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/iactn/Interaction.java b/core/applib/src/main/java/org/apache/isis/applib/services/iactn/Interaction.java
index 3479eaf..ea95a6c 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/iactn/Interaction.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/iactn/Interaction.java
@@ -43,7 +43,7 @@ import org.apache.isis.schema.common.v1.InteractionType;
 import org.apache.isis.schema.common.v1.PeriodDto;
 import org.apache.isis.schema.ixn.v1.ActionInvocationDto;
 import org.apache.isis.schema.ixn.v1.InteractionExecutionDto;
-import org.apache.isis.schema.ixn.v1.PropertyModificationDto;
+import org.apache.isis.schema.ixn.v1.PropertyEditDto;
 import org.apache.isis.schema.utils.jaxbadapters.JavaSqlTimestampXmlGregorianCalendarAdapter;
 
 /**
@@ -319,16 +319,16 @@ public class Interaction implements HasTransactionId {
 
         //region > fields, constructor
 
-        private final String memberId;
+        private final String memberIdentifier;
         private final Object target;
         private final InteractionType interactionType;
 
         public Execution(
                 final InteractionType interactionType,
-                final String memberId,
+                final String memberIdentifier,
                 final Object target) {
             this.interactionType = interactionType;
-            this.memberId = memberId;
+            this.memberIdentifier = memberIdentifier;
             this.target = target;
         }
         //endregion
@@ -339,8 +339,8 @@ public class Interaction implements HasTransactionId {
             return interactionType;
         }
 
-        public String getMemberId() {
-            return memberId;
+        public String getMemberIdentifier() {
+            return memberIdentifier;
         }
 
         public Object getTarget() {
@@ -543,7 +543,7 @@ public class Interaction implements HasTransactionId {
         }
     }
 
-    public static class PropertyModification extends Execution<PropertyModificationDto, PropertyDomainEvent<?,?>> {
+    public static class PropertyModification extends Execution<PropertyEditDto, PropertyDomainEvent<?,?>> {
 
         private final Object newValue;
 
@@ -551,7 +551,7 @@ public class Interaction implements HasTransactionId {
                 final String memberId,
                 final Object target,
                 final Object newValue) {
-            super(InteractionType.PROPERTY_MODIFICATION, memberId, target);
+            super(InteractionType.PROPERTY_EDIT, memberId, target);
             this.newValue = newValue;
         }
 

http://git-wip-us.apache.org/repos/asf/isis/blob/d08a4e18/core/applib/src/main/java/org/apache/isis/schema/utils/InteractionDtoUtils.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/schema/utils/InteractionDtoUtils.java b/core/applib/src/main/java/org/apache/isis/schema/utils/InteractionDtoUtils.java
index 7572384..8c70cf2 100644
--- a/core/applib/src/main/java/org/apache/isis/schema/utils/InteractionDtoUtils.java
+++ b/core/applib/src/main/java/org/apache/isis/schema/utils/InteractionDtoUtils.java
@@ -57,7 +57,7 @@ import org.apache.isis.schema.common.v1.ValueType;
 import org.apache.isis.schema.ixn.v1.ActionInvocationDto;
 import org.apache.isis.schema.ixn.v1.InteractionDto;
 import org.apache.isis.schema.ixn.v1.InteractionExecutionDto;
-import org.apache.isis.schema.ixn.v1.PropertyModificationDto;
+import org.apache.isis.schema.ixn.v1.PropertyEditDto;
 import org.apache.isis.schema.ixn.v1.ValueWithTypeDto;
 import org.apache.isis.schema.utils.jaxbadapters.JavaSqlTimestampXmlGregorianCalendarAdapter;
 
@@ -161,7 +161,7 @@ public final class InteractionDtoUtils {
 
         final InteractionDto interactionDto = newInteractionDto(transactionId);
 
-        final InteractionExecutionDto executionDto = newPropertyModification(
+        final InteractionExecutionDto executionDto = newPropertyEdit(
                 sequence, targetBookmark, targetTitle,
                 propertyIdentifier, newValueDto,
                 user, transactionId);
@@ -191,7 +191,7 @@ public final class InteractionDtoUtils {
                 user);
     }
 
-    public static PropertyModificationDto newPropertyModification(
+    public static PropertyEditDto newPropertyEdit(
             final int sequence,
             final Bookmark targetBookmark,
             final String targetTitle,
@@ -199,8 +199,8 @@ public final class InteractionDtoUtils {
             final ValueWithTypeDto newValueDto,
             final String user,
             final String transactionId) {
-        return (PropertyModificationDto) newInteractionExecutionDto(
-                InteractionType.PROPERTY_MODIFICATION, transactionId, sequence,
+        return (PropertyEditDto) newInteractionExecutionDto(
+                InteractionType.PROPERTY_EDIT, transactionId, sequence,
                 targetBookmark, targetTitle, propertyIdentifier,
                 null, newValueDto,
                 user);
@@ -212,7 +212,7 @@ public final class InteractionDtoUtils {
             final int sequence,
             final Bookmark targetBookmark,
             final String targetTitle,
-            final String memberIdentifier,
+            final String memberId,
             final List<ParamDto> parameterDtos,
             final ValueWithTypeDto newValueDto,
             final String user) {
@@ -227,10 +227,10 @@ public final class InteractionDtoUtils {
 
             executionDto = invocation;
         } else {
-            final PropertyModificationDto modification = new PropertyModificationDto();
-            modification.setNewValue(newValueDto);
+            final PropertyEditDto edit = new PropertyEditDto();
+            edit.setNewValue(newValueDto);
 
-            executionDto = modification;
+            executionDto = edit;
         }
 
         executionDto.setSequence(sequence);
@@ -244,7 +244,7 @@ public final class InteractionDtoUtils {
         executionDto.setTitle(targetTitle);
         executionDto.setUser(user);
 
-        executionDto.setMemberIdentifier(memberIdentifier);
+        executionDto.setMemberId(memberId);
         return executionDto;
     }
 
@@ -258,7 +258,7 @@ public final class InteractionDtoUtils {
         interactionDto.setInteractionType(
                 executionDto instanceof ActionInvocationDto
                         ? InteractionType.ACTION_INVOCATION
-                        : InteractionType.PROPERTY_MODIFICATION);
+                        : InteractionType.PROPERTY_EDIT);
     }
 
 
@@ -288,14 +288,14 @@ public final class InteractionDtoUtils {
         return invocation;
     }
 
-    private static PropertyModificationDto propertyModificationFor(final InteractionDto interactionDto) {
-        PropertyModificationDto modification = (PropertyModificationDto) interactionDto.getExecution();
-        if(modification == null) {
-            modification = new PropertyModificationDto();
-            interactionDto.setExecution(modification);
-            interactionDto.setInteractionType(InteractionType.PROPERTY_MODIFICATION);
+    private static PropertyEditDto propertyEditFor(final InteractionDto interactionDto) {
+        PropertyEditDto edit = (PropertyEditDto) interactionDto.getExecution();
+        if(edit == null) {
+            edit = new PropertyEditDto();
+            interactionDto.setExecution(edit);
+            interactionDto.setInteractionType(InteractionType.PROPERTY_EDIT);
         }
-        return modification;
+        return edit;
     }
 
     private static List<ParamDto> parametersFor(final InteractionDto ixnDto) {

http://git-wip-us.apache.org/repos/asf/isis/blob/d08a4e18/core/applib/src/test/java/org/apache/isis/schema/utils/Roundtrip.java
----------------------------------------------------------------------
diff --git a/core/applib/src/test/java/org/apache/isis/schema/utils/Roundtrip.java b/core/applib/src/test/java/org/apache/isis/schema/utils/Roundtrip.java
index 91c8a2b..a0aa7e1 100644
--- a/core/applib/src/test/java/org/apache/isis/schema/utils/Roundtrip.java
+++ b/core/applib/src/test/java/org/apache/isis/schema/utils/Roundtrip.java
@@ -131,7 +131,7 @@ public class Roundtrip {
 
 
         // then
-        assertThat(recreated.getExecution().getMemberIdentifier(), Matchers.is(interactionDto.getExecution().getMemberIdentifier()));
+        assertThat(recreated.getExecution().getMemberId(), Matchers.is(interactionDto.getExecution().getMemberId()));
         assertThat(recreated.getExecution().getTarget().getObjectType(), Matchers.is(interactionDto.getExecution().getTarget().getObjectType()));
         assertThat(recreated.getExecution().getTarget().getObjectIdentifier(), Matchers.is(interactionDto.getExecution().getTarget().getObjectIdentifier()));
 

http://git-wip-us.apache.org/repos/asf/isis/blob/d08a4e18/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterOrClearFacetForDomainEventAbstract.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterOrClearFacetForDomainEventAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterOrClearFacetForDomainEventAbstract.java
index 83c8fbe..982b852 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterOrClearFacetForDomainEventAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/modify/PropertySetterOrClearFacetForDomainEventAbstract.java
@@ -42,7 +42,7 @@ import org.apache.isis.core.metamodel.facets.properties.update.modify.PropertySe
 import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
 import org.apache.isis.core.metamodel.services.ixn.InteractionDtoServiceInternal;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
-import org.apache.isis.schema.ixn.v1.PropertyModificationDto;
+import org.apache.isis.schema.ixn.v1.PropertyEditDto;
 
 public abstract class PropertySetterOrClearFacetForDomainEventAbstract
         extends SingleValueFacetAbstract<Class<? extends PropertyDomainEvent<?,?>>> {
@@ -200,10 +200,10 @@ public abstract class PropertySetterOrClearFacetForDomainEventAbstract
                             try {
 
                                 // update the current execution with the DTO (memento)
-                                final PropertyModificationDto invocationDto =
-                                        getInteractionDtoServiceInternal().asPropertyModificationDto(
+                                final PropertyEditDto editDto =
+                                        getInteractionDtoServiceInternal().asPropertyEditDto(
                                                 owningProperty, targetAdapter, newValueAdapter);
-                                currentExecution.setDto(invocationDto);
+                                currentExecution.setDto(editDto);
 
 
                                 // ... post the executing event

http://git-wip-us.apache.org/repos/asf/isis/blob/d08a4e18/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ixn/InteractionDtoServiceInternal.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ixn/InteractionDtoServiceInternal.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ixn/InteractionDtoServiceInternal.java
index 80f89ae..6b5fe90 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ixn/InteractionDtoServiceInternal.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/ixn/InteractionDtoServiceInternal.java
@@ -25,7 +25,7 @@ import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.isis.schema.ixn.v1.ActionInvocationDto;
-import org.apache.isis.schema.ixn.v1.PropertyModificationDto;
+import org.apache.isis.schema.ixn.v1.PropertyEditDto;
 
 public interface InteractionDtoServiceInternal {
 
@@ -42,7 +42,7 @@ public interface InteractionDtoServiceInternal {
             Object resultPojo);
 
     @Programmatic
-    PropertyModificationDto asPropertyModificationDto(
+    PropertyEditDto asPropertyEditDto(
             OneToOneAssociation property,
             ObjectAdapter targetAdapter,
             ObjectAdapter newValueAdapterIfAny);

http://git-wip-us.apache.org/repos/asf/isis/blob/d08a4e18/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandDtoServiceInternalDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandDtoServiceInternalDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandDtoServiceInternalDefault.java
index 9511faf..1d8a7ed 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandDtoServiceInternalDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/command/CommandDtoServiceInternalDefault.java
@@ -162,7 +162,7 @@ public class CommandDtoServiceInternalDefault implements CommandDtoServiceIntern
 
         final CommandDto dto = asCommandDto(targetAdapters);
 
-        dto.setInteractionType(InteractionType.PROPERTY_MODIFICATION);
+        dto.setInteractionType(InteractionType.PROPERTY_EDIT);
         final PropertyDto propertyDto = new PropertyDto();
         dto.setMember(propertyDto);
 
@@ -192,8 +192,8 @@ public class CommandDtoServiceInternalDefault implements CommandDtoServiceIntern
             final ObjectAction objectAction,
             final ActionDto actionDto,
             final ObjectAdapter[] argAdapters) {
-        final String actionIdentifier = CommandUtil.memberIdentifierFor(objectAction);
-        actionDto.setMemberIdentifier(actionIdentifier);
+        final String actionId = CommandUtil.memberIdentifierFor(objectAction);
+        actionDto.setMemberIdentifier(actionId);
 
         List<ObjectActionParameter> actionParameters = objectAction.getParameters();
         for (int paramNum = 0; paramNum < actionParameters.size(); paramNum++) {

http://git-wip-us.apache.org/repos/asf/isis/blob/d08a4e18/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ixn/InteractionDtoServiceInternalDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ixn/InteractionDtoServiceInternalDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ixn/InteractionDtoServiceInternalDefault.java
index 733a252..14b096f 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ixn/InteractionDtoServiceInternalDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/ixn/InteractionDtoServiceInternalDefault.java
@@ -42,7 +42,7 @@ import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
 import org.apache.isis.schema.cmd.v1.ActionDto;
 import org.apache.isis.schema.ixn.v1.ActionInvocationDto;
-import org.apache.isis.schema.ixn.v1.PropertyModificationDto;
+import org.apache.isis.schema.ixn.v1.PropertyEditDto;
 import org.apache.isis.schema.ixn.v1.ValueWithTypeDto;
 import org.apache.isis.schema.utils.InteractionDtoUtils;
 
@@ -102,7 +102,7 @@ public class InteractionDtoServiceInternalDefault implements InteractionDtoServi
     }
 
     @Override @Programmatic
-    public PropertyModificationDto asPropertyModificationDto(
+    public PropertyEditDto asPropertyEditDto(
             final OneToOneAssociation property,
             final ObjectAdapter targetAdapter,
             final ObjectAdapter newValueAdapterIfAny) {

http://git-wip-us.apache.org/repos/asf/isis/blob/d08a4e18/core/schema/src/main/resources/org/apache/isis/schema/common/common-1.0.xsd
----------------------------------------------------------------------
diff --git a/core/schema/src/main/resources/org/apache/isis/schema/common/common-1.0.xsd b/core/schema/src/main/resources/org/apache/isis/schema/common/common-1.0.xsd
index 013a42e..acab2cd 100644
--- a/core/schema/src/main/resources/org/apache/isis/schema/common/common-1.0.xsd
+++ b/core/schema/src/main/resources/org/apache/isis/schema/common/common-1.0.xsd
@@ -120,11 +120,11 @@
 
     <xs:simpleType name="interactionType" >
         <xs:annotation>
-            <xs:documentation>Whether this interaction with a member is invoking an action, or modifying a property.</xs:documentation>
+            <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_modification" />
+            <xs:enumeration value="property_edit" />
         </xs:restriction>
     </xs:simpleType>
 

http://git-wip-us.apache.org/repos/asf/isis/blob/d08a4e18/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
index 071365b..c7e651a 100644
--- 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
@@ -49,7 +49,7 @@
                 </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>
@@ -62,7 +62,7 @@
 
     <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>Represents either an action invocation or a property edit.  Is subclassed by both.
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
@@ -80,11 +80,11 @@
             </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:element name="memberId" type="xs:string">
                 <xs:annotation>
                     <xs:documentation>Formal identifier of the member being interacted with (action or property).
                     </xs:documentation>
@@ -104,7 +104,7 @@
             </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>Captures the time taken to perform the member interaction (invoke the action, or edit the property).
                     </xs:documentation>
                 </xs:annotation>
             </xs:element>
@@ -119,7 +119,7 @@
                     <xs:sequence>
                         <xs:element name="execution" 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>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>
@@ -156,7 +156,7 @@
         </xs:complexContent>
     </xs:complexType>
 
-    <xs:complexType name="propertyModificationDto">
+    <xs:complexType name="propertyEditDto">
         <xs:complexContent>
             <xs:extension base="interactionExecutionDto">
                 <xs:sequence>
@@ -168,7 +168,7 @@
 
     <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 modifications.
+            <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:sequence>