From 8222a0f436c41378062f3e1c4ecafcb40abd2100 Mon Sep 17 00:00:00 2001 From: Laramie Crocker Date: Thu, 7 Apr 2011 20:30:38 +0000 Subject: [PATCH] NOJIRA this is a better way to fix binding between CollectionObjectResource and RelationResource --- .../services/collectionobject/CollectionObjectResource.java | 2 +- .../collectionspace/services/relation/RelationResource.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/collectionobject/service/src/main/java/org/collectionspace/services/collectionobject/CollectionObjectResource.java b/services/collectionobject/service/src/main/java/org/collectionspace/services/collectionobject/CollectionObjectResource.java index 1ea0235d9..d7791c7b6 100644 --- a/services/collectionobject/service/src/main/java/org/collectionspace/services/collectionobject/CollectionObjectResource.java +++ b/services/collectionobject/service/src/main/java/org/collectionspace/services/collectionobject/CollectionObjectResource.java @@ -412,7 +412,7 @@ public class CollectionObjectResource String predicate = RelationshipType.COLLECTIONOBJECT_INTAKE.value(); String objectCsid = null; RelationResource relationResource = new RelationResource(); - RelationsCommonList relationsCommonList = (RelationsCommonList)relationResource.getRelationList(queryParams, + RelationsCommonList relationsCommonList = relationResource.getRelationList(queryParams, subjectCsid, null, /*subjectType*/ predicate, diff --git a/services/relation/service/src/main/java/org/collectionspace/services/relation/RelationResource.java b/services/relation/service/src/main/java/org/collectionspace/services/relation/RelationResource.java index 6a96f8655..46191de21 100644 --- a/services/relation/service/src/main/java/org/collectionspace/services/relation/RelationResource.java +++ b/services/relation/service/src/main/java/org/collectionspace/services/relation/RelationResource.java @@ -73,7 +73,7 @@ public class RelationResource extends ResourceBase { @GET @Produces("application/xml") - public AbstractCommonList getRelationList(@Context UriInfo ui, + public RelationsCommonList getRelationList(@Context UriInfo ui, @QueryParam(IRelationsManager.SUBJECT_QP) String subjectCsid, @QueryParam(IRelationsManager.SUBJECT_TYPE_QP) String subjectType, @QueryParam(IRelationsManager.PREDICATE_QP) String predicate, @@ -83,7 +83,7 @@ public class RelationResource extends ResourceBase { return this.getRelationList(queryParams, subjectCsid, subjectType, predicate, objectCsid, objectType); } - public AbstractCommonList getRelationList(MultivaluedMap queryParams, String subjectCsid, String subjectType, + public RelationsCommonList getRelationList(MultivaluedMap queryParams, String subjectCsid, String subjectType, String predicate, String objectCsid, String objectType) throws WebApplicationException { try { ServiceContext ctx = createServiceContext(queryParams); @@ -92,7 +92,7 @@ public class RelationResource extends ResourceBase { String relationClause = RelationsUtils.buildWhereClause(subjectCsid, subjectType, predicate, objectCsid, objectType); handler.getDocumentFilter().appendWhereClause(relationClause, IQueryManager.SEARCH_QUALIFIER_AND); - return finish_getList(ctx, handler); + return (RelationsCommonList)finish_getList(ctx, handler); } catch (Exception e) { throw bigReThrow(e, ServiceMessages.LIST_FAILED); } -- 2.47.3