Hello
I'm trying to write a class which get a content via a lucene query, very if the content has a custom aspect and then update a specific property inside this aspect.I'm new to the web service api. I've read the sample codes in the SDK but there are some points I don't understand…Here is my current code : // get the corresponding nodeRef in the Repository
Query query = new Query(Constants.QUERY_LANG_LUCENE, "+TYPE:\"mcm:resource\" AND +PATH:\"/app:company_home/custom:company_home//*\" AND +@mcm\\:xpath:\"" + docXpath + "\"");
QueryResult queryResult = repositoryService.query(STORE, query, false);
// Display the results
ResultSet resultSet = queryResult.getResultSet();
ResultSetRow[] rows = resultSet.getRows();
if (rows != null){
// Get the id of the first result
String firstResultId = rows[0].getNode().getId();
Reference reference = new Reference(STORE, firstResultId, null);
// Read the node from the respository
Content[] readResult = contentService.read(
new Predicate(new Reference[]{reference}, STORE, null),
Constants.PROP_CONTENT);
Content content = readResult[0];I don't know what to do with my Content object. Could you give me a hand please ?
Thank you.