use of com.pspace.ifs.ksan.objmanager.ObjManagerException.ResourceNotFoundException in project ksan by infinistor.
the class S3Request method getObjectWithVersionId.
protected Metadata getObjectWithVersionId(String bucket, String object, String versionId) throws GWException {
Metadata objMeta = null;
try {
setObjManager();
objMeta = objManager.getObjectWithVersionId(bucket, object, versionId);
} catch (ResourceNotFoundException e) {
logger.info(GWConstants.LOG_REQUEST_NOT_FOUND_IN_DB, bucket, object);
throw new GWException(GWErrorCode.NO_SUCH_KEY, s3Parameter);
} catch (Exception e) {
PrintStack.logging(logger, e);
throw new GWException(GWErrorCode.SERVER_ERROR, s3Parameter);
} finally {
try {
releaseObjManager();
} catch (Exception e) {
PrintStack.logging(logger, e);
throw new GWException(GWErrorCode.SERVER_ERROR, s3Parameter);
}
}
return objMeta;
}
Aggregations