07-08-2010 05:25 AM
Store storeRef = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
query = new Query(Constants.QUERY_LANG_LUCENE, "PATH:\"/app:company_home/app:dictionary/app:webclient_extension/" + FileName + "\"");
ResultSet rs =repositoryService.query(storeRef, query, false).getResultSet();
ResultSetRow[] rsRows = rs.getRows();
07-08-2010 05:59 AM
07-08-2010 09:02 AM
ContentFormat format = new ContentFormat("text/plain", "UTF-8");
CMLCreate create = new CMLCreate("1", companyHomeParent, companyHomeParent.getUuid(), Constants.ASSOC_CONTAINS, null, Constants.PROP_CONTENT, contentProps);
cml = new CML();
cml.setCreate(new CMLCreate[] {create});
cml.setAddAspect(new CMLAddAspect[] {addAspect});
UpdateResult[] result = repositoryService.update(cml);
Reference content = result[0].getDestination();
contentService.write(content,Constants.PROP_CONTENT , bytes, format);
The same querry works fine and the file is getting created in alfresco.
Tags
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.