Search in sources :

Example 31 with Metadata

use of com.pspace.ifs.ksan.objmanager.Metadata in project ksan by infinistor.

the class S3Request method createCopy.

protected Metadata createCopy(String srcBucket, String srcObjectName, String srcVersionId, String bucket, String object) throws GWException {
    Metadata objMeta;
    try {
        setObjManager();
        objMeta = objManager.createCopy(srcBucket, srcObjectName, srcVersionId, bucket, object);
    } 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;
}
Also used : Metadata(com.pspace.ifs.ksan.objmanager.Metadata) GWException(com.pspace.ifs.ksan.gw.exception.GWException) GWException(com.pspace.ifs.ksan.gw.exception.GWException) ResourceAlreadyExistException(com.pspace.ifs.ksan.objmanager.ObjManagerException.ResourceAlreadyExistException) XMLStreamException(javax.xml.stream.XMLStreamException) ResourceNotFoundException(com.pspace.ifs.ksan.objmanager.ObjManagerException.ResourceNotFoundException) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) JsonMappingException(com.fasterxml.jackson.databind.JsonMappingException)

Aggregations

Metadata (com.pspace.ifs.ksan.objmanager.Metadata)31 GWException (com.pspace.ifs.ksan.gw.exception.GWException)23 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)17 S3Bucket (com.pspace.ifs.ksan.gw.identity.S3Bucket)17 S3Metadata (com.pspace.ifs.ksan.gw.identity.S3Metadata)13 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)12 ResourceNotFoundException (com.pspace.ifs.ksan.objmanager.ObjManagerException.ResourceNotFoundException)12 XMLStreamException (javax.xml.stream.XMLStreamException)12 IOException (java.io.IOException)11 S3ObjectOperation (com.pspace.ifs.ksan.gw.object.S3ObjectOperation)10 JsonMappingException (com.fasterxml.jackson.databind.JsonMappingException)6 S3Object (com.pspace.ifs.ksan.gw.object.S3Object)6 XMLOutputFactory (javax.xml.stream.XMLOutputFactory)6 ResourceAlreadyExistException (com.pspace.ifs.ksan.objmanager.ObjManagerException.ResourceAlreadyExistException)5 ObjMultipart (com.pspace.ifs.ksan.objmanager.ObjMultipart)5 XmlMapper (com.fasterxml.jackson.dataformat.xml.XmlMapper)4 AccessControlPolicy (com.pspace.ifs.ksan.gw.format.AccessControlPolicy)4 AccessControlList (com.pspace.ifs.ksan.gw.format.AccessControlPolicy.AccessControlList)4 Grant (com.pspace.ifs.ksan.gw.format.AccessControlPolicy.AccessControlList.Grant)4 Owner (com.pspace.ifs.ksan.gw.format.AccessControlPolicy.Owner)4