class S3Helper {

    public void restoreFileVersion(String bucket, String path, String version) {
        AmazonS3 client = getDefaultS3Client();
        if (fileSizeExceedsLimit(client, bucket, path, version)) {
            throw new DataStorageException(String.format("Restoring file '%s' version '%s' was aborted because " +
                    "file size exceeds the limit of %s bytes", path, version, COPYING_FILE_SIZE_LIMIT));
        }
        moveS3Object(client, bucket, new MoveObjectRequest(path, version, path));
    }

}