From 4aab89c7817810bbda5effe1d2a7d9093d1b72c9 Mon Sep 17 00:00:00 2001 From: Richard Millet Date: Thu, 9 Apr 2009 18:39:34 +0000 Subject: [PATCH] Fixing missing CSID bug in CollectionObject service --- HelloWorld/HelloWorldJaxb/src/main/resources/hello.xsd | 1 + .../hello/services/CollectionObjectResource.java | 2 ++ .../hello/services/DomainIdentifierResource.java | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HelloWorld/HelloWorldJaxb/src/main/resources/hello.xsd b/HelloWorld/HelloWorldJaxb/src/main/resources/hello.xsd index bf3dcfc21..221a00bba 100644 --- a/HelloWorld/HelloWorldJaxb/src/main/resources/hello.xsd +++ b/HelloWorld/HelloWorldJaxb/src/main/resources/hello.xsd @@ -130,6 +130,7 @@ + diff --git a/HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/CollectionObjectResource.java b/HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/CollectionObjectResource.java index af28915c7..90255d06d 100644 --- a/HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/CollectionObjectResource.java +++ b/HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/CollectionObjectResource.java @@ -131,6 +131,7 @@ public class CollectionObjectResource implements CollectionSpaceResource { Element element = (Element) i.next(); if ("docRef".equals(element.getName())){ csid = (String) element.getData(); + co.setCsid(csid); } } } catch(Exception e){ @@ -139,6 +140,7 @@ public class CollectionObjectResource implements CollectionSpaceResource { throw new WebApplicationException(response); } + verbose("createCollectionObject: ", co); UriBuilder path = UriBuilder.fromResource(PersonNuxeoResource.class); path.path("" + csid); diff --git a/HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/DomainIdentifierResource.java b/HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/DomainIdentifierResource.java index 67e30515b..16a465c11 100644 --- a/HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/DomainIdentifierResource.java +++ b/HelloWorld/HelloWorldNuxeoService/src/main/java/org/collectionspace/hello/services/DomainIdentifierResource.java @@ -39,7 +39,7 @@ public class DomainIdentifierResource implements CollectionSpaceResource { if (newId.getDsid() == null) { newId.setDsid("org.collectionspace"); } - newId.setDsid(newId.getDsid() + System.currentTimeMillis()); + newId.setDsid(newId.getDsid() + "." + System.currentTimeMillis()); idDB.put(newId.getDsid(), newId); verbose("createIdentifier: ", newId); -- 2.47.3