From: Richard Millet Date: Fri, 31 Aug 2012 07:23:36 +0000 (-0700) Subject: CSPACE-5488: Added code to put a refname in the CollectionSpace_Core schema for all... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=4b6ae75b05fb5154005bf49487db9e7b5096cfaf;p=tmp%2Fjakarta-migration.git CSPACE-5488: Added code to put a refname in the CollectionSpace_Core schema for all records/resources. --- diff --git a/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/schemas/collectionspace_core.xsd b/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/schemas/collectionspace_core.xsd index 3a557f64e..7c9389798 100644 --- a/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/schemas/collectionspace_core.xsd +++ b/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/schemas/collectionspace_core.xsd @@ -17,6 +17,7 @@ + diff --git a/services/client/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java b/services/client/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java index a1eb74d2e..940983708 100644 --- a/services/client/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java +++ b/services/client/src/main/java/org/collectionspace/services/client/CollectionSpaceClient.java @@ -39,6 +39,7 @@ public interface CollectionSpaceClient extends RemoteDocumentModelHandlerImpl extends RemoteDocumentModelHandlerImpl extends RemoteDocumentModelHandlerImpl wrapDoc) throws Exception { - String classname = getDocHandlerParams().getAbstractCommonListClassname(); CommonList commonList = new CommonList(); String markRtSbj = null; RepositoryInstance repoSession = null; @@ -194,13 +200,14 @@ public abstract class DocHandlerBase extends RemoteDocumentModelHandlerImpl extends RemoteDocumentModelHandlerImpl // documentModel.setProperty(CollectionSpaceClient.COLLECTIONSPACE_CORE_SCHEMA, CollectionSpaceClient.COLLECTIONSPACE_CORE_URI, getUri(documentModel)); + // + // Add the resource's refname + // + String csid = documentModel.getName(); + String refname = RefName.Authority.buildAuthority(ctx.getTenantName(), ctx.getServiceName(), + csid, "" /*authorityDisplayName*/).toString(); + documentModel.setProperty(CollectionSpaceClient.COLLECTIONSPACE_CORE_SCHEMA, + CollectionSpaceClient.COLLECTIONSPACE_CORE_REFNAME, refname); // // Add the CSID to the DublinCore title so we can see the CSID in the default // Nuxeo webapp.