From dcc4916922cd8fe76a772e81371df13708118640 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Thu, 17 Nov 2011 04:06:40 +0000 Subject: [PATCH] CSPACE-4469: The value of the uri element in the collectionspace_core part for Contact records now reflects the contextual path through which the Contact was created, with the 'owning' authority and item. --- .../services/contact/AuthorityResourceWithContacts.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/contact/service/src/main/java/org/collectionspace/services/contact/AuthorityResourceWithContacts.java b/services/contact/service/src/main/java/org/collectionspace/services/contact/AuthorityResourceWithContacts.java index 36e720d6a..7494b590b 100644 --- a/services/contact/service/src/main/java/org/collectionspace/services/contact/AuthorityResourceWithContacts.java +++ b/services/contact/service/src/main/java/org/collectionspace/services/contact/AuthorityResourceWithContacts.java @@ -109,7 +109,8 @@ public abstract class AuthorityResourceWithContacts public Response createContact( @PathParam("parentcsid") String parentspecifier, @PathParam("itemcsid") String itemspecifier, - String xmlPayload) { + String xmlPayload, + @Context UriInfo ui) { try { PoxPayloadIn input = new PoxPayloadIn(xmlPayload); String parentcsid = lookupParentCSID(parentspecifier, "createContact(authority)", "CREATE_ITEM_CONTACT", null); @@ -120,7 +121,7 @@ public abstract class AuthorityResourceWithContacts // Note that we have to create the service context and document // handler for the Contact service, not the main service. ServiceContext ctx = createServiceContext(getContactServiceName(), input); - DocumentHandler handler = createContactDocumentHandler(ctx, parentcsid, itemcsid); + DocumentHandler handler = createContactDocumentHandler(ctx, parentcsid, itemcsid, ui); String csid = getRepositoryClient(ctx).create(ctx, handler); UriBuilder path = UriBuilder.fromResource(resourceClass); path.path("" + parentcsid + "/items/" + itemcsid + "/contacts/" + csid); -- 2.47.3