getSession().getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
try {
ResourceServiceClient client =
new ResourceServiceClient(cookie, config, request.getSession());
client.restoreVersion(versionPath);
} catch (Exception e) {
String msg = "Failed to restore the resource " + versionPath + ". " + e.getMessage();
log.error(msg, e);
throw new UIException(msg, e);