As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
public void setDocuement( String name ){ Entry entry = abdera.newEntry(); entry.setTitle(name); entry.setSummary("Summarize summarize…"); CMISObject cmisObject = entry.addExtension(CMISConstants.OBJECT); CMISProperties properties = cmisObject.addExtension(CMISConstants.PROPERTIES); CMISProperty property = properties.addExtension(CMISConstants.PROPERTY_STRING); property.setAttributeValue(CMISConstants.PROPERTY_NAME, CMISConstants.PROP_OBJECT_TYPE_ID); Element value = property.addExtension(CMISConstants.PROPERTY_VALUE); value.setText("document"); InputStream in = null; try { in = new FileInputStream( "c:/temp/test.pdf"); entry.setContent(in, "application/pdf"); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); }
CMIS Part II – REST-Atom Binding v0.5.pdfsetContentStreamThis method follows the Atom Publishing model where the media (content stream) is PUT at the edit-media or stream link.
Q1.does the file being upload need to have the explicit mime type set?if so what is the typically strategy to cater for many file types available?
application/octet-stream