From 805a0c44300a61e0de4505c785231482a1ebbe07 Mon Sep 17 00:00:00 2001 From: Patrick Schmitz Date: Thu, 17 Nov 2011 06:58:04 +0000 Subject: [PATCH] CSPACE-4084 Added updatedAt to each item in refObjs results. --- .../common/vocabulary/RefNameServiceUtils.java | 6 ++++++ .../services/nuxeo/client/java/DocHandlerBase.java | 14 +++++++++----- .../jaxb/src/main/resources/authorityrefdocs.xsd | 1 + 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/RefNameServiceUtils.java b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/RefNameServiceUtils.java index eedc243c7..5e22beb2a 100644 --- a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/RefNameServiceUtils.java +++ b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/RefNameServiceUtils.java @@ -51,6 +51,7 @@ import org.collectionspace.services.common.document.DocumentNotFoundException; import org.collectionspace.services.common.document.DocumentUtils; import org.collectionspace.services.common.document.DocumentWrapper; import org.collectionspace.services.common.repository.RepositoryClient; +import org.collectionspace.services.nuxeo.client.java.DocHandlerBase; import org.collectionspace.services.nuxeo.client.java.RepositoryJavaClientImpl; import org.collectionspace.services.common.service.ServiceBindingType; import org.collectionspace.services.jaxb.AbstractCommonList; @@ -296,6 +297,11 @@ public class RefNameServiceUtils { String csid = NuxeoUtils.getCsid(docModel);//NuxeoUtils.extractId(docModel.getPathAsString()); ilistItem.setDocId(csid); ilistItem.setUri(serviceContextPath + csid); + try { + ilistItem.setUpdatedAt(DocHandlerBase.getUpdatedAtAsString(docModel)); + } catch(Exception e) { + logger.error("Error getting udpatedAt value for doc ["+csid+"]: "+e.getLocalizedMessage()); + } // The id and URI are the same on all doctypes ilistItem.setDocType(docType); ilistItem.setDocNumber( diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java index 2ce34ae91..91ae0a9b2 100755 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/client/java/DocHandlerBase.java @@ -163,6 +163,14 @@ public abstract class DocHandlerBase extends RemoteDocumentModelHandlerImpl wrapDoc) throws Exception { String classname = getDocHandlerParams().getAbstractCommonListClassname(); @@ -192,11 +200,7 @@ public abstract class DocHandlerBase extends RemoteDocumentModelHandlerImpl + -- 2.47.3