diff --git a/source/generated/org/alfresco/repo/webservice/repository/Association.java b/source/generated/org/alfresco/repo/webservice/repository/Association.java index 6ffdb3424b..cc281a4070 100644 --- a/source/generated/org/alfresco/repo/webservice/repository/Association.java +++ b/source/generated/org/alfresco/repo/webservice/repository/Association.java @@ -10,14 +10,14 @@ package org.alfresco.repo.webservice.repository; public class Association implements java.io.Serializable { private java.lang.String associationType; - private org.alfresco.repo.webservice.repository.AssociationDirectionEnum direction; + private java.lang.String direction; public Association() { } public Association( java.lang.String associationType, - org.alfresco.repo.webservice.repository.AssociationDirectionEnum direction) { + java.lang.String direction) { this.associationType = associationType; this.direction = direction; } @@ -48,7 +48,7 @@ public class Association implements java.io.Serializable { * * @return direction */ - public org.alfresco.repo.webservice.repository.AssociationDirectionEnum getDirection() { + public java.lang.String getDirection() { return direction; } @@ -58,7 +58,7 @@ public class Association implements java.io.Serializable { * * @param direction */ - public void setDirection(org.alfresco.repo.webservice.repository.AssociationDirectionEnum direction) { + public void setDirection(java.lang.String direction) { this.direction = direction; } @@ -111,13 +111,13 @@ public class Association implements java.io.Serializable { elemField.setFieldName("associationType"); elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/repository/1.0", "associationType")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); - elemField.setNillable(false); + elemField.setNillable(true); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("direction"); elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/repository/1.0", "direction")); - elemField.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/repository/1.0", "AssociationDirectionEnum")); - elemField.setNillable(false); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setNillable(true); typeDesc.addFieldDesc(elemField); } diff --git a/source/generated/org/alfresco/repo/webservice/repository/AssociationDirectionEnum.java b/source/generated/org/alfresco/repo/webservice/repository/AssociationDirectionEnum.java deleted file mode 100644 index 4177526f84..0000000000 --- a/source/generated/org/alfresco/repo/webservice/repository/AssociationDirectionEnum.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * AssociationDirectionEnum.java - * - * This file was auto-generated from WSDL - * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. - */ - -package org.alfresco.repo.webservice.repository; - -public class AssociationDirectionEnum implements java.io.Serializable { - private java.lang.String _value_; - private static java.util.HashMap _table_ = new java.util.HashMap(); - - // Constructor - protected AssociationDirectionEnum(java.lang.String value) { - _value_ = value; - _table_.put(_value_,this); - } - - public static final java.lang.String _source = "source"; - public static final java.lang.String _target = "target"; - public static final AssociationDirectionEnum source = new AssociationDirectionEnum(_source); - public static final AssociationDirectionEnum target = new AssociationDirectionEnum(_target); - public java.lang.String getValue() { return _value_;} - public static AssociationDirectionEnum fromValue(java.lang.String value) - throws java.lang.IllegalArgumentException { - AssociationDirectionEnum enumeration = (AssociationDirectionEnum) - _table_.get(value); - if (enumeration==null) throw new java.lang.IllegalArgumentException(); - return enumeration; - } - public static AssociationDirectionEnum fromString(java.lang.String value) - throws java.lang.IllegalArgumentException { - return fromValue(value); - } - public boolean equals(java.lang.Object obj) {return (obj == this);} - public int hashCode() { return toString().hashCode();} - public java.lang.String toString() { return _value_;} - public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);} - public static org.apache.axis.encoding.Serializer getSerializer( - java.lang.String mechType, - java.lang.Class _javaType, - javax.xml.namespace.QName _xmlType) { - return - new org.apache.axis.encoding.ser.EnumSerializer( - _javaType, _xmlType); - } - public static org.apache.axis.encoding.Deserializer getDeserializer( - java.lang.String mechType, - java.lang.Class _javaType, - javax.xml.namespace.QName _xmlType) { - return - new org.apache.axis.encoding.ser.EnumDeserializer( - _javaType, _xmlType); - } - // Type metadata - private static org.apache.axis.description.TypeDesc typeDesc = - new org.apache.axis.description.TypeDesc(AssociationDirectionEnum.class); - - static { - typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/repository/1.0", "AssociationDirectionEnum")); - } - /** - * Return type metadata object - */ - public static org.apache.axis.description.TypeDesc getTypeDesc() { - return typeDesc; - } - -} diff --git a/source/generated/org/alfresco/repo/webservice/repository/RepositoryServiceSoapPort.java b/source/generated/org/alfresco/repo/webservice/repository/RepositoryServiceSoapPort.java index d4e0cffb18..d85201f6c2 100644 --- a/source/generated/org/alfresco/repo/webservice/repository/RepositoryServiceSoapPort.java +++ b/source/generated/org/alfresco/repo/webservice/repository/RepositoryServiceSoapPort.java @@ -39,7 +39,7 @@ public interface RepositoryServiceSoapPort extends java.rmi.Remote { * Executes a query to retrieve associated resources of the specified * resource. */ - public org.alfresco.repo.webservice.repository.QueryResult queryAssociated(org.alfresco.repo.webservice.types.Reference node, org.alfresco.repo.webservice.repository.Association[] association) throws java.rmi.RemoteException, org.alfresco.repo.webservice.repository.RepositoryFault; + public org.alfresco.repo.webservice.repository.QueryResult queryAssociated(org.alfresco.repo.webservice.types.Reference node, org.alfresco.repo.webservice.repository.Association association) throws java.rmi.RemoteException, org.alfresco.repo.webservice.repository.RepositoryFault; /** * Fetches the next batch of query results. diff --git a/source/generated/org/alfresco/repo/webservice/repository/deploy.wsdd b/source/generated/org/alfresco/repo/webservice/repository/deploy.wsdd index 48f55771a5..e508afaf59 100644 --- a/source/generated/org/alfresco/repo/webservice/repository/deploy.wsdd +++ b/source/generated/org/alfresco/repo/webservice/repository/deploy.wsdd @@ -201,14 +201,6 @@ deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" /> - assocs = nodeService.getTargetAssocs(nodeRef, - RegexQNamePattern.MATCH_ALL); + NodeRef nodeRef = Utils.convertToNodeRef(this.node, nodeService, searchService, namespaceService); + List assocs = null; + if (association != null) + { + assocs = nodeService.getTargetAssocs(nodeRef, RegexQNamePattern.MATCH_ALL); + } + else + { + QNamePattern name = RegexQNamePattern.MATCH_ALL; + String assocType = association.getAssociationType(); + if (assocType != null) + { + name = QName.createQName(assocType); + } + if ("source".equals(association.getDirection()) == true) + { + assocs = nodeService.getSourceAssocs(nodeRef, name); + } + else + { + assocs = nodeService.getTargetAssocs(nodeRef, name); + } + } int totalRows = assocs.size(); int lastRow = calculateLastRowIndex(totalRows); diff --git a/source/java/org/alfresco/repo/webservice/repository/RepositoryWebService.java b/source/java/org/alfresco/repo/webservice/repository/RepositoryWebService.java index 79be0369c8..8b6f0903a1 100644 --- a/source/java/org/alfresco/repo/webservice/repository/RepositoryWebService.java +++ b/source/java/org/alfresco/repo/webservice/repository/RepositoryWebService.java @@ -345,7 +345,7 @@ public class RepositoryWebService extends AbstractWebService implements * @see org.alfresco.repo.webservice.repository.RepositoryServiceSoapPort#queryAssociated(org.alfresco.repo.webservice.types.Reference, * org.alfresco.repo.webservice.repository.Association[]) */ - public QueryResult queryAssociated(Reference node, Association[] association) + public QueryResult queryAssociated(Reference node, Association association) throws RemoteException, RepositoryFault { UserTransaction tx = null; @@ -356,7 +356,7 @@ public class RepositoryWebService extends AbstractWebService implements tx.begin(); // setup a query session and get the first batch of results - QuerySession querySession = new AssociatedQuerySession(Utils.getBatchSize(MessageContext.getCurrentContext()), node); + QuerySession querySession = new AssociatedQuerySession(Utils.getBatchSize(MessageContext.getCurrentContext()), node, association); QueryResult queryResult = querySession .getNextResultsBatch(this.searchService, this.nodeService, this.namespaceService, this.dictionaryService); diff --git a/source/web/WEB-INF/server-config.wsdd b/source/web/WEB-INF/server-config.wsdd index 2119f3068a..9c51fce62b 100644 --- a/source/web/WEB-INF/server-config.wsdd +++ b/source/web/WEB-INF/server-config.wsdd @@ -613,14 +613,6 @@ deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" /> - - + @@ -203,19 +203,12 @@ - - + + - - - - - - -