* <xs:element name="docName" type="xs:string" minOccurs="0" />\r
* <xs:element name="sourceField" type="xs:string" minOccurs="1" />\r
* <xs:element name="uri" type="xs:anyURI" minOccurs="1" />\r
+ * <xs:element name="refName" type="xs:String" minOccurs="1" />\r
* <xs:element name="updatedAt" type="xs:string" minOccurs="1" />\r
* <xs:element name="workflowState" type="xs:string" minOccurs="1"\r
* />\r
*/\r
- String fieldList = "docType|docId|docNumber|docName|sourceField|uri|updatedAt|workflowState";\r
+ String fieldList = "docType|docId|docNumber|docName|sourceField|uri|refName|updatedAt|workflowState";\r
commonList.setFieldsReturned(fieldList);\r
\r
// As a side-effect, the method called below modifies the value of\r
\r
return whereClauseStr;\r
}\r
+ \r
+ // TODO there are multiple copies of this that should be put somewhere common.\r
+ protected static String getRefname(DocumentModel docModel) throws ClientException {\r
+ String result = (String)docModel.getProperty(CollectionSpaceClient.COLLECTIONSPACE_CORE_SCHEMA,\r
+ CollectionSpaceClient.COLLECTIONSPACE_CORE_REFNAME);\r
+ return result;\r
+ }\r
+\r
\r
/*\r
* Runs through the list of found docs, processing them. If list is\r
}\r
ilistItem = new AuthorityRefDocList.AuthorityRefDocItem();\r
String csid = NuxeoUtils.getCsid(docModel);//NuxeoUtils.extractId(docModel.getPathAsString());\r
+ try {\r
+ String itemRefName = getRefname(docModel);\r
+ ilistItem.setRefName(itemRefName);\r
+ } catch (ClientException ce) {\r
+ throw new RuntimeException(\r
+ "processRefObjsDocList: Problem fetching refName from item Object: " \r
+ + ce.getLocalizedMessage());\r
+ }\r
ilistItem.setDocId(csid);\r
String uri = "";\r
UriTemplateRegistry registry = ServiceMain.getInstance().getUriTemplateRegistry();\r
<xs:element name="docName" type="xs:string" minOccurs="0" />
<xs:element name="sourceField" type="xs:string" minOccurs="1" />
<xs:element name="uri" type="xs:anyURI" minOccurs="1" />
+ <xs:element name="refName" type="xs:string" minOccurs="1" />
<xs:element name="updatedAt" type="xs:string" minOccurs="1" />
<xs:element name="workflowState" type="xs:string" minOccurs="1" />
</xs:sequence>