return false;
}
public String restoreResources(long version, long snapshotID) throws RegistryException {
// get the archived resource
ResourceDO resourceDO = getResourceDOArchived(version);
String resourcePath =
resourceDAO.getPath(resourceDO.getPathID(), resourceDO.getName(), false);
// create the resourceId
ResourceImpl oldResource;
if (resourceDO.getName() == null) {
// this is a collection
oldResource = new CollectionImpl(resourcePath, resourceDO);
} else {
oldResource = new ResourceImpl(resourcePath, resourceDO);
}
int oldContentID = resourceDO.getContentID();
if (oldContentID > 0) {
// if the non-collection restore content
// get the archived content
InputStream contentData = getContentArchived(oldContentID);
if (contentData != null) {
resourceDO.setContentID(resourceDAO.addContentBytes(contentData));
}
}
resourceDAO.addResourceDO(resourceDO);
// copy comments, taggings, ratings to new version
ResourceImpl newResource;
if (resourceDO.getName() == null) {
newResource = new CollectionImpl(resourcePath, resourceDO);
} else {
newResource = new ResourceImpl(resourcePath, resourceDO);
}