09-24-2009 07:29 AM
09-24-2009 02:24 PM
private Store versionStore = new Store("versionStore", "lightWeightVersionStore");
VersionHistory versionHistory = WebServiceFactory.getAuthoringService().getVersionHistory(ReferenceFactory.newReference(uuid, nodePath));
Version[] versions = versionHistory.getVersions();
for(Version nodeVersion : versions) {
if(nodeVersion.getLabel().equals(version)) {
InputStream result = null;
Reference reference = new Reference(versionStore, nodeVersion.getId().getUuid(), nodeVersion.getId().getPath());
Predicate predicate = new Predicate(new Reference[] { reference }, versionStore, null);
Content[] contents = WebServiceFactory.getContentService().read(predicate, Constants.TYPE_CONTENT);
result = ContentUtils.getContentAsInputStream(contents[0]);
return result;
}
}
Hope this helps.
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.