03-11-2013 07:52 PM
Hi,
thanks a lot for this complex plateform, make it simpler to build them all.
I try to connect my android application with Nuxeo Plateform 5.6
I would like to retrieve my custom schema attribute and don't find how to do that.
DocumentService rs = new DocumentService(session);
DocRef wsRef = new DocRef("/default-domain/workspaces/mypublicws");
docs = rs.getChildren(wsRef);
for (Iterator iterator = docs.iterator(); iterator.hasNext();) {
Document document = (Document) iterator.next();
PropertyMap map = document.getProperties();
Log.i("Public Hut", document.getTitle() + "--" + map.getString("vendorseed:datesowingmin"));
}
The PropertyMap result does not contain my custom attributes even during debug phase.
THE QUESTION IS: How to get my custom schema properties (maybe called metadata ?).
nuxeo-android-connector version:
<dependency>
<groupId>org.nuxeo.android</groupId>
<artifactId>nuxeo-android-connector</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
Thanks in advance
03-13-2013 07:55 AM
Hi,
By default, only the minimal document properties are returned. You can ask for more mapped properties by specifying the wanted schemas in the header (or "*" to get all):
import org.nuxeo.ecm.automation.client.Constants;
import org.nuxeo.ecm.automation.client.adapters.DocumentService;
import org.nuxeo.ecm.automation.client.model.Documents;
Documents docs = (Documents) session.newRequest(DocumentService.GetDocumentChildren)
.setInput(doc)
.setHeader(Constants.HEADER_NX_SCHEMAS, "*").execute();
See org.nuxeo.ecm.automation.client.Constants.HEADER_NX_SCHEMAS.
/>
Since 5.7, it is possible to change the default schemas for the whole session instead of per request, see org.nuxeo.ecm.automation.client.Session.setDefaultSchemas(String).
03-13-2013 07:55 AM
Hi,
By default, only the minimal document properties are returned. You can ask for more mapped properties by specifying the wanted schemas in the header (or "*" to get all):
import org.nuxeo.ecm.automation.client.Constants;
import org.nuxeo.ecm.automation.client.adapters.DocumentService;
import org.nuxeo.ecm.automation.client.model.Documents;
Documents docs = (Documents) session.newRequest(DocumentService.GetDocumentChildren)
.setInput(doc)
.setHeader(Constants.HEADER_NX_SCHEMAS, "*").execute();
See org.nuxeo.ecm.automation.client.Constants.HEADER_NX_SCHEMAS.
/>
Since 5.7, it is possible to change the default schemas for the whole session instead of per request, see org.nuxeo.ecm.automation.client.Session.setDefaultSchemas(String).
Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.