i have to set the Alfresco cm:title property using Apache Camel integration framework. The document is imported correctly in Alfresco but without the cm:title.
I tried to set the aspect cm:titled and after the cm:title property but doesn't work.
My processor method:
List<String> secondary = new ArrayList<String>();
secondary.add("P:cm:titled");
exchange.getIn().getHeaders().put(PropertyIds.CONTENT_STREAM_MIME_TYPE, "text/plain; charset=UTF-8");
exchange.getIn().getHeaders().put(PropertyIds.NAME, exchange.getIn().getHeader("file_name"));
exchange.getIn().getHeaders().put(CamelCMISConstants.CMIS_FOLDER_PATH, "/Sites/test/documentLibrary/demo");
exchange.getIn().getHeaders().put(PropertyIds.OBJECT_TYPE_ID, CamelCMISConstants.CMIS_DOCUMENT);
exchange.getIn().getHeaders().put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, secondary);
exchange.getIn().getHeaders().put("cm:title", exchange.getIn().getHeader("year"));
Any solution?
Solved using this cmis connection:
from("jms:importer")
.process(executeFirstProcessor())
.to("cmis://http://localhost:8080/alfresco/api/-default-/cmis/versions/1.1/atom?username={username}&password={password}")
.end();
Instead of:
from("jms:importer")
.process(executeFirstProcessor())
.to("cmis://http://localhost:8080/alfresco/cmisatom?username={username}&password={password}")
.end();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.