Fix the path being set on the Reference objects as it wasn't a valid XPath. Added some unit tests to clear up AR-1186.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4993 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2007-02-01 11:19:20 +00:00
parent fccfa9fc65
commit fd6e9643b9
9 changed files with 38 additions and 37 deletions

View File

@@ -176,7 +176,7 @@ public class ClassificationWebService extends AbstractWebService implements
}
Category category = new Category();
category.setId(Utils.convertToReference(this.nodeService, nodeRef));
category.setId(Utils.convertToReference(this.nodeService, this.namespaceService, nodeRef));
category.setTitle(title);
// TODO need to set the description
return category;
@@ -274,7 +274,7 @@ public class ClassificationWebService extends AbstractWebService implements
int iIndex = 0;
for (NodeRef categoryNodeRef : categoryNodeRefs)
{
categoryReferences[iIndex] = Utils.convertToReference(ClassificationWebService.this.nodeService, categoryNodeRef);
categoryReferences[iIndex] = Utils.convertToReference(ClassificationWebService.this.nodeService, ClassificationWebService.this.namespaceService, categoryNodeRef);
iIndex ++;
}
@@ -291,7 +291,7 @@ public class ClassificationWebService extends AbstractWebService implements
// Create the category result object
CategoriesResult categoryResult = new CategoriesResult();
categoryResult.setNode(Utils.convertToReference(ClassificationWebService.this.nodeService, nodeRef));
categoryResult.setNode(Utils.convertToReference(ClassificationWebService.this.nodeService, ClassificationWebService.this.namespaceService, nodeRef));
categoryResult.setCategories(appliedCategories.toArray(new AppliedCategory[appliedCategories.size()]));
result.add(categoryResult);
@@ -400,7 +400,7 @@ public class ClassificationWebService extends AbstractWebService implements
// Create the category result object
CategoriesResult categoryResult = new CategoriesResult();
categoryResult.setNode(Utils.convertToReference(ClassificationWebService.this.nodeService, nodeRef));
categoryResult.setNode(Utils.convertToReference(ClassificationWebService.this.nodeService, ClassificationWebService.this.namespaceService, nodeRef));
categoryResult.setCategories(appliedCategories.toArray(new AppliedCategory[appliedCategories.size()]));
result.add(categoryResult);