Search in sources :

Example 6 with Bucket

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

the class S3Request method getBucket.

protected Bucket getBucket(String bucket) throws GWException {
    Bucket bucketInfo = null;
    try {
        setObjManager();
        bucketInfo = objManager.getBucket(bucket);
    } catch (ResourceNotFoundException e) {
        return null;
    } 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 bucketInfo;
}
Also used : Bucket(com.pspace.ifs.ksan.objmanager.Bucket) GWException(com.pspace.ifs.ksan.gw.exception.GWException) ResourceNotFoundException(com.pspace.ifs.ksan.objmanager.ObjManagerException.ResourceNotFoundException) 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

Bucket (com.pspace.ifs.ksan.objmanager.Bucket)6 GWException (com.pspace.ifs.ksan.gw.exception.GWException)4 ResourceNotFoundException (com.pspace.ifs.ksan.objmanager.ObjManagerException.ResourceNotFoundException)4 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)3 JsonMappingException (com.fasterxml.jackson.databind.JsonMappingException)3 Metadata (com.pspace.ifs.ksan.objmanager.Metadata)2 ResourceAlreadyExistException (com.pspace.ifs.ksan.objmanager.ObjManagerException.ResourceAlreadyExistException)2 XMLStreamException (javax.xml.stream.XMLStreamException)2 XmlMapper (com.fasterxml.jackson.dataformat.xml.XmlMapper)1 ReplicationConfiguration (com.pspace.ifs.ksan.gw.format.ReplicationConfiguration)1 Rule (com.pspace.ifs.ksan.gw.format.ReplicationConfiguration.Rule)1 Tag (com.pspace.ifs.ksan.gw.format.ReplicationConfiguration.Rule.Filter.And.Tag)1 S3Bucket (com.pspace.ifs.ksan.gw.identity.S3Bucket)1 S3User (com.pspace.ifs.ksan.gw.identity.S3User)1 MQSender (com.pspace.ifs.ksan.mq.MQSender)1 ObjManager (com.pspace.ifs.ksan.objmanager.ObjManager)1 ObjManagerConfig (com.pspace.ifs.ksan.objmanager.ObjManagerConfig)1 AllServiceOfflineException (com.pspace.ifs.ksan.objmanager.ObjManagerException.AllServiceOfflineException)1 ObjManagerUtil (com.pspace.ifs.ksan.objmanager.ObjManagerUtil)1 ObjectMover (com.pspace.ifs.ksan.utility.ObjectMover)1