07-07-2010 11:49 PM
ParentReference contentReference = new ParentReference(storeRef,null,path,ASSOC_CONTAINS,ASSOC_CONTAINS);
CMLCreate createDoc = new CMLCreate("ref1", contentReference, null, null, null, Constants.createQNameString(NAMESPACE, "report"), contentProps);
cml.setCreate(new CMLCreate[]{createDoc});
UpdateResult[] result = WebServiceFactory.getRepositoryService().update(cml);
Reference newContentNode = result[0].getDestination();
ContentFormat format = new ContentFormat("application/excel", "UTF-8");
WebServiceFactory.getContentService().write(newContentNode, Constants.PROP_CONTENT, bytes, format);
07-08-2010 06:29 AM
String luceneQuery = "+PATH:\"/app:company_home/cm:Operations/cm:Reports/cm:myReport/*\" +@cm\\:name:\"myReport.xls\"";
You have to encode all the space names in the ISO 9075 format, this because Alfresco store paths in that format.
String luceneQuery = "+PATH:\"/app:company_home/cm:"+ISO9075.encode("Operations")+"/cm:"+ISO9075.encode("Reports")+"/cm:"+ISO9075.encode("myReport")+"/*\" +@cm\\:name:\"myReport.xls\"";
Hope this helps.
07-08-2010 10:10 AM
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.