- Added Cml id to update results to allow id mapping in PHP client

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3608 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2006-08-25 13:00:44 +00:00
parent 04f64235e3
commit ab9de68b03
24 changed files with 110 additions and 121 deletions

View File

@@ -320,14 +320,6 @@
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:>Store>address"
type="java:java.lang.String"
serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:AssociationDefinition"

View File

@@ -339,14 +339,6 @@
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:>Store>address"
type="java:java.lang.String"
serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:AssociationDefinition"

View File

@@ -284,14 +284,6 @@
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:>Store>address"
type="java:java.lang.String"
serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:AssociationDefinition"

View File

@@ -327,14 +327,6 @@
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:>Store>address"
type="java:java.lang.String"
serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:AssociationDefinition"

View File

@@ -251,14 +251,6 @@
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:>Store>address"
type="java:java.lang.String"
serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:AssociationDefinition"

View File

@@ -247,14 +247,6 @@
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:>Store>address"
type="java:java.lang.String"
serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/service/content/1.0"
qname="ns:ContentFault"

View File

@@ -248,14 +248,6 @@
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:>Store>address"
type="java:java.lang.String"
serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:AssociationDefinition"

View File

@@ -12,6 +12,8 @@ public class UpdateResult implements java.io.Serializable {
private org.alfresco.repo.webservice.types.ResultSet updateCount;
private java.lang.String sourceId;
private org.alfresco.repo.webservice.types.Reference source;
private org.alfresco.repo.webservice.types.Reference destination;
@@ -22,10 +24,12 @@ public class UpdateResult implements java.io.Serializable {
public UpdateResult(
java.lang.String statement,
org.alfresco.repo.webservice.types.ResultSet updateCount,
java.lang.String sourceId,
org.alfresco.repo.webservice.types.Reference source,
org.alfresco.repo.webservice.types.Reference destination) {
this.statement = statement;
this.updateCount = updateCount;
this.sourceId = sourceId;
this.source = source;
this.destination = destination;
}
@@ -71,6 +75,26 @@ public class UpdateResult implements java.io.Serializable {
}
/**
* Gets the sourceId value for this UpdateResult.
*
* @return sourceId
*/
public java.lang.String getSourceId() {
return sourceId;
}
/**
* Sets the sourceId value for this UpdateResult.
*
* @param sourceId
*/
public void setSourceId(java.lang.String sourceId) {
this.sourceId = sourceId;
}
/**
* Gets the source value for this UpdateResult.
*
@@ -128,6 +152,9 @@ public class UpdateResult implements java.io.Serializable {
((this.updateCount==null && other.getUpdateCount()==null) ||
(this.updateCount!=null &&
this.updateCount.equals(other.getUpdateCount()))) &&
((this.sourceId==null && other.getSourceId()==null) ||
(this.sourceId!=null &&
this.sourceId.equals(other.getSourceId()))) &&
((this.source==null && other.getSource()==null) ||
(this.source!=null &&
this.source.equals(other.getSource()))) &&
@@ -151,6 +178,9 @@ public class UpdateResult implements java.io.Serializable {
if (getUpdateCount() != null) {
_hashCode += getUpdateCount().hashCode();
}
if (getSourceId() != null) {
_hashCode += getSourceId().hashCode();
}
if (getSource() != null) {
_hashCode += getSource().hashCode();
}
@@ -180,6 +210,12 @@ public class UpdateResult implements java.io.Serializable {
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("sourceId");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/repository/1.0", "sourceId"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("source");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/repository/1.0", "source"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Reference"));

View File

@@ -241,14 +241,6 @@
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/model/content/1.0"
qname="ns:>Store>address"
type="java:java.lang.String"
serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
encodingStyle=""
/>
<typeMapping
xmlns:ns="http://www.alfresco.org/ws/cml/1.0"
qname="ns:>CML>create"

View File

@@ -202,14 +202,14 @@ public class CMLAddAspect implements java.io.Serializable {
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Predicate"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("where_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
}

View File

@@ -232,13 +232,14 @@ public class CMLAddChild implements java.io.Serializable {
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "to"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "ParentReference"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("to_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "to_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(false);
elemField.setMinOccurs(0);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("associationType");
@@ -259,14 +260,14 @@ public class CMLAddChild implements java.io.Serializable {
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Predicate"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("where_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
}

View File

@@ -262,13 +262,14 @@ public class CMLCopy implements java.io.Serializable {
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "to"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "ParentReference"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("to_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "to_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(false);
elemField.setMinOccurs(0);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("associationType");
@@ -289,14 +290,14 @@ public class CMLCopy implements java.io.Serializable {
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Predicate"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("where_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("children");

View File

@@ -202,28 +202,28 @@ public class CMLCreateAssociation implements java.io.Serializable {
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "from"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Predicate"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("from_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "from_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("to");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "to"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Predicate"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("to_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "to_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("association");

View File

@@ -232,13 +232,14 @@ public class CMLMove implements java.io.Serializable {
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "to"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "ParentReference"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("to_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "to_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(false);
elemField.setMinOccurs(0);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("associationType");
@@ -259,14 +260,14 @@ public class CMLMove implements java.io.Serializable {
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Predicate"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("where_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
}

View File

@@ -148,14 +148,14 @@ public class CMLRemoveAspect implements java.io.Serializable {
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Predicate"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("where_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
}

View File

@@ -202,28 +202,28 @@ public class CMLRemoveAssociation implements java.io.Serializable {
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "from"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Predicate"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("from_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "from_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("to");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "to"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Predicate"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("to_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "to_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("association");

View File

@@ -172,28 +172,28 @@ public class CMLRemoveChild implements java.io.Serializable {
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "from"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Reference"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("from_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "from_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("where");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Predicate"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("where_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
}

View File

@@ -165,14 +165,14 @@ public class CMLUpdate implements java.io.Serializable {
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Predicate"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("where_id");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/cml/1.0", "where_id"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
}

View File

@@ -111,13 +111,13 @@ public class Store implements java.io.Serializable {
elemField.setFieldName("scheme");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "scheme"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(true);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("address");
elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "address"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setNillable(true);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}

View File

@@ -253,7 +253,7 @@ public class CMLUtil
context.addId(id, nodeRef);
}
results.add(createResult(CREATE, null, nodeRef));
results.add(createResult(CREATE, id, null, nodeRef));
}
/**
@@ -277,10 +277,14 @@ public class CMLUtil
return properties;
}
private UpdateResult createResult(String cmd, NodeRef sourceNodeRef, NodeRef destinationNodeRef)
private UpdateResult createResult(String cmd, String sourceId, NodeRef sourceNodeRef, NodeRef destinationNodeRef)
{
UpdateResult result = new UpdateResult();
result.setStatement(cmd);
if (sourceId != null)
{
result.setSourceId(sourceId);
}
if (sourceNodeRef != null)
{
result.setSource(Utils.convertToReference(sourceNodeRef));
@@ -313,7 +317,7 @@ public class CMLUtil
this.nodeService.addAspect(nodeRef, aspectQName, properties);
// Create the result
results.add(createResult(ADD_ASPECT, nodeRef, nodeRef));
results.add(createResult(ADD_ASPECT, null, nodeRef, nodeRef));
}
}
@@ -331,7 +335,7 @@ public class CMLUtil
this.nodeService.removeAspect(nodeRef, aspectQName);
// Create the result
results.add(createResult(REMOVE_ASPECT, nodeRef, nodeRef));
results.add(createResult(REMOVE_ASPECT, null, nodeRef, nodeRef));
}
}
@@ -367,7 +371,7 @@ public class CMLUtil
this.nodeService.setProperties(nodeRef, currentProps);
// Get the result
results.add(createResult(UPDATE, nodeRef, nodeRef));
results.add(createResult(UPDATE, null, nodeRef, nodeRef));
}
}
@@ -380,7 +384,7 @@ public class CMLUtil
this.nodeService.deleteNode(nodeRef);
// Create the result
results.add(createResult(DELETE, nodeRef, null));
results.add(createResult(DELETE, null, nodeRef, null));
}
}
@@ -408,7 +412,7 @@ public class CMLUtil
NodeRef newNodeRef = this.nodeService.moveNode(nodeToMove, destinationNodeRef, assocType, assocName).getChildRef();
// Create the result
results.add(createResult(MOVE, nodeToMove, newNodeRef));
results.add(createResult(MOVE, null, nodeToMove, newNodeRef));
}
}
}
@@ -474,7 +478,7 @@ public class CMLUtil
NodeRef newNodeRef = this.copyService.copy(nodeToCopy, destinationNodeRef, assocType, assocName, copyChildren);
// Create the result
results.add(createResult(COPY, nodeToCopy, newNodeRef));
results.add(createResult(COPY, null, nodeToCopy, newNodeRef));
}
}
@@ -504,7 +508,7 @@ public class CMLUtil
this.nodeService.addChild(nodeRef, whereNodeRef, assocType, assocName);
// Create the result
results.add(createResult(ADD_CHILD, nodeRef, whereNodeRef));
results.add(createResult(ADD_CHILD, null, nodeRef, whereNodeRef));
}
}
}
@@ -520,7 +524,7 @@ public class CMLUtil
this.nodeService.removeChild(parentNodeRef, childNodeRef);
// Create the result
results.add(createResult(REMOVE_CHILD, parentNodeRef, null));
results.add(createResult(REMOVE_CHILD, null, parentNodeRef, null));
}
}
@@ -540,7 +544,7 @@ public class CMLUtil
this.nodeService.createAssociation(fromNodeRef, toNodeRef, assocType);
// Create the result
results.add(createResult(CREATE_ASSOCIATION, fromNodeRef, toNodeRef));
results.add(createResult(CREATE_ASSOCIATION, null, fromNodeRef, toNodeRef));
}
}
}
@@ -560,7 +564,7 @@ public class CMLUtil
this.nodeService.removeAssociation(fromNodeRef, toNodeRef, assocType);
// Create the result
results.add(createResult(REMOVE_ASSOCIATION, fromNodeRef, toNodeRef));
results.add(createResult(REMOVE_ASSOCIATION, null, fromNodeRef, toNodeRef));
}
}
}
@@ -569,15 +573,22 @@ public class CMLUtil
private class ExecutionContext
{
private Map<String, NodeRef> idMap = new HashMap<String, NodeRef>();
private Map<NodeRef, String> nodeRefMap = new HashMap<NodeRef, String>();
public void addId(String id, NodeRef nodeRef)
{
this.idMap.put(id, nodeRef);
this.nodeRefMap.put(nodeRef, id);
}
public NodeRef getNodeRef(String id)
{
return this.idMap.get(id);
}
public String getId(NodeRef nodeRef)
{
return this.nodeRefMap.get(nodeRef);
}
}
}

View File

@@ -265,6 +265,8 @@ public class RepositoryWebService extends AbstractWebService implements
return queryResult;
} catch (Throwable e)
{
e.printStackTrace();
// rollback the transaction
try
{

View File

@@ -94,8 +94,8 @@
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:element name="from" type="cms:Reference"></xsd:element>
<xsd:element name="from_id" type="xsd:string"></xsd:element>
<xsd:element name="from" type="cms:Reference" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
<xsd:element name="from_id" type="xsd:string" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
</xsd:choice>
<xsd:group ref="cml:Where"></xsd:group>
</xsd:sequence>
@@ -159,31 +159,31 @@
<xsd:group name="Where">
<xsd:choice>
<xsd:element name="where" type="cms:Predicate"></xsd:element>
<xsd:element name="where_id" type="xsd:string"></xsd:element>
<xsd:element name="where" type="cms:Predicate" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
<xsd:element name="where_id" type="xsd:string" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
</xsd:choice>
</xsd:group>
<xsd:group name="From">
<xsd:choice>
<xsd:element name="from" type="cms:Predicate"></xsd:element>
<xsd:element name="from_id" type="xsd:string"></xsd:element>
<xsd:element name="from" type="cms:Predicate" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
<xsd:element name="from_id" type="xsd:string" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
</xsd:choice>
</xsd:group>
<xsd:group name="To">
<xsd:choice>
<xsd:element name="to" type="cms:Predicate"></xsd:element>
<xsd:element name="to_id" type="xsd:string"></xsd:element>
<xsd:element name="to" type="cms:Predicate" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
<xsd:element name="to_id" type="xsd:string" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
</xsd:choice>
</xsd:group>
<xsd:group name="ToParent">
<xsd:choice>
<xsd:element name="to" type="cms:ParentReference"></xsd:element>
<xsd:element name="to" type="cms:ParentReference" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
<xsd:sequence>
<xsd:element name="to_id" type="xsd:string"></xsd:element>
<xsd:group ref="cms:ChildAssociation"></xsd:group>
<xsd:element name="to_id" type="xsd:string" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
<xsd:group ref="cms:ChildAssociation" maxOccurs="1" minOccurs="0" nillable="true"></xsd:group>
</xsd:sequence>
</xsd:choice>
</xsd:group>

View File

@@ -192,6 +192,7 @@
<sequence>
<element name="statement" type="xsd:string"/>
<element name="updateCount" type="cms:ResultSet" nillable="true"/>
<element name="sourceId" type="xsd:string" nillable="true"/>
<element name="source" type="cms:Reference" nillable="true"/>
<element name="destination" type="cms:Reference" nillable="true"/>
</sequence>

View File

@@ -243,8 +243,8 @@
<xsd:element name="nodes" type="cms:Reference" maxOccurs="unbounded" minOccurs="0" nillable="true">
</xsd:element>
<xsd:sequence>
<xsd:element name="store" type="cms:Store" minOccurs="0" nillable="true"></xsd:element>
<xsd:element name="query" type="cms:Query" minOccurs="0" nillable="true"></xsd:element>
<xsd:element name="store" type="cms:Store" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
<xsd:element name="query" type="cms:Query" maxOccurs="1" minOccurs="0" nillable="true"></xsd:element>
</xsd:sequence>
</xsd:choice>
</xsd:complexType>