public void updateContent(docEv document, String nuevoNombre, String nuevaDescr, String path){
try {
WebServiceFactory.setEndpointAddress("http://...:8080/alfresco/api");
AuthenticationUtils.startSession("admin", "admin");
Store storeRef = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
Query query = new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"" +path + "\"AND @ev\\:IDdoc:" + document.getIDdoc());
Predicate pred = new Predicate(null,storeRef,query);
NamedValue[] titledProps = new NamedValue[2];
titledProps[0] = Utils.createNamedValue(Constants.PROP_NAME, nuevoNombre);
titledProps[1] = Utils.createNamedValue(Constants.createQNameString(docEvModel.NAMESPACE_CONTENT_MODEL,
docEvModel.DESCRIPCIO), nuevaDescr);
CMLAddAspect addAspect = new CMLAddAspect(Constants.ASPECT_TITLED, titledProps, null, "1");
CMLUpdate update = new CMLUpdate(titledProps, pred, null);
CML cml = new CML();
cml.setUpdate(new CMLUpdate[] {update});
WebServiceFactory.getRepositoryService().update(cml);
//UpdateResult[] results = WebServiceFactory.getRepositoryService().update(cml);
//dumpUpdateResults (results);
}
catch (Exception e) {
e.printStackTrace();
} finally {
// tanca sessió
System.out.println("Desconectant…");
AuthenticationUtils.endSession();
}
//UpdateResult[] results = WebServiceFactory.getRepositoryService().update(cml);
//dumpUpdateResults (results);
me da el siguiente errorContent from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.