08-26-2009 02:21 AM
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.pdf
setContentStream
This method follows the Atom Publishing model where the media (content stream) is PUT at the edit-media or stream link.
08-26-2009 07:23 PM
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
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.