10-06-2015 12:33 PM
public class CatalogManager extends BaseScopableProcessorExtension {
….
public void saveFileOnRepositoty(String fileName, File zipfile) {
File zipfile = File.createTempFile(fileName, ".zip");
…
InputStream in = null;
ScriptNode node = null;
try {
in = new FileInputStream(zipfile);
node = parentDir.createFile(fileName + ".zip");;
ContentWriter contentWriter = contentService.getWriter(node.getNodeRef(), ContentModel.PROP_CONTENT, true);
contentWriter.putContent(in);
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
IOUtils.closeQuietly(in);
}
String nodeRefResult = "";
if (node != null) {
nodeRefResult = node.getNodeRef().toString();
}
return nodeRefResult;
}
….
}
10-06-2015 12:52 PM
10-06-2015 05:26 PM
10-06-2015 05:38 PM
10-07-2015 01:13 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.