Package com.cloud.bridge.service.exception

Examples of com.cloud.bridge.service.exception.NoSuchObjectException


      S3AccessControlPolicy policy = new S3AccessControlPolicy()
     
      String bucketName = request.getBucketName();
      SBucketVO sbucket = bucketDao.getByName( bucketName );
      if (sbucket == null)
        throw new NoSuchObjectException("Bucket " + bucketName + " does not exist");
     
      //SObjectDaoImpl sobjectDao = new SObjectDaoImpl();
      String nameKey = request.getKey();
      SObjectVO sobject = objectDao.getByNameKey( sbucket, nameKey );
      if (sobject == null)
        throw new NoSuchObjectException("Object " + request.getKey() + " does not exist");
       
    String deletionMark = sobject.getDeletionMark();
    if (null != deletionMark) {
      policy.setResultCode(404);
      policy.setResultDescription("Object " + request.getKey() + " has been deleted (1)");
View Full Code Here


        int maxKeys = request.getMaxKeys();
        if(maxKeys <= 0) maxKeys = 1000;

        //
        SBucketVO sbucket = bucketDao.getByName(bucketName);
        if (sbucket == null) throw new NoSuchObjectException("Bucket " + bucketName + " does not exist");

        PolicyActions action = (includeVersions ? PolicyActions.ListBucketVersions : PolicyActions.ListBucket);
        S3PolicyContext context = new S3PolicyContext( action, bucketName );
        context.setEvalParam( ConditionKeys.MaxKeys, new String( "" + maxKeys ));
        context.setEvalParam( ConditionKeys.Prefix, prefix );
View Full Code Here

    {
        S3AccessControlPolicy policy = new S3AccessControlPolicy();    
        String bucketName = request.getBucketName();
        SBucketVO sbucket = bucketDao.getByName( bucketName );
        if (sbucket == null)
            throw new NoSuchObjectException("Bucket " + bucketName + " does not exist");

        S3CanonicalUser owner = new S3CanonicalUser();
        owner.setID(sbucket.getOwnerCanonicalId());
        owner.setDisplayName("");
        policy.setOwner(owner);
View Full Code Here

        long contentLength = request.getContentLength();
        S3MetaDataEntry[] meta = request.getMetaEntries();
        S3AccessControlList acl = request.getAcl();

        SBucketVO bucket = bucketDao.getByName(bucketName);
        if (bucket == null) throw new NoSuchObjectException("Bucket " + bucketName + " does not exist");


        // Is the caller allowed to write the object?
        // The allocObjectItem checks for the bucket policy PutObject permissions
        OrderedPair<SObjectVO, SObjectItemVO> object_objectitem_pair = allocObjectItem(bucket, key, meta, acl, request.getCannedAccess());
View Full Code Here

        long contentLength = request.getContentLength();
        S3MetaDataEntry[] meta = request.getMetaEntries();
        S3AccessControlList acl = request.getAcl();

        SBucketVO bucket = bucketDao.getByName(bucketName);
        if(bucket == null) throw new NoSuchObjectException("Bucket " + bucketName + " does not exist");

        // Is the caller allowed to write the object? 
        // The allocObjectItem checks for the bucket policy PutObject permissions
        OrderedPair<SObjectVO, SObjectItemVO> object_objectitem_pair = allocObjectItem(bucket, key, meta, acl, null);
        OrderedPair<SHostVO, String> host_storagelocation_pair = getBucketStorageHost(bucket);
View Full Code Here

        S3AccessControlPolicy policy = new S3AccessControlPolicy()

        String bucketName = request.getBucketName();
        SBucketVO sbucket = bucketDao.getByName( bucketName );
        if (sbucket == null)
            throw new NoSuchObjectException("Bucket " + bucketName + " does not exist");

        //SObjectDaoImpl sobjectDao = new SObjectDaoImpl();
        String nameKey = request.getKey();
        SObjectVO sobject = objectDao.getByNameKey( sbucket, nameKey );
        if (sobject == null)
            throw new NoSuchObjectException("Object " + request.getKey() + " does not exist");

        String deletionMark = sobject.getDeletionMark();
        if (null != deletionMark) {
            policy.setResultCode(404);
            policy.setResultDescription("Object " + request.getKey() + " has been deleted (1)");
View Full Code Here

        int maxKeys = request.getMaxKeys();
        if(maxKeys <= 0) maxKeys = 1000;

        //
        SBucketVO sbucket = bucketDao.getByName(bucketName);
        if (sbucket == null) throw new NoSuchObjectException("Bucket " + bucketName + " does not exist");

        PolicyActions action = (includeVersions ? PolicyActions.ListBucketVersions : PolicyActions.ListBucket);
        S3PolicyContext context = new S3PolicyContext( action, bucketName );
        context.setEvalParam( ConditionKeys.MaxKeys, new String( "" + maxKeys ));
        context.setEvalParam( ConditionKeys.Prefix, prefix );
View Full Code Here

    {
        S3AccessControlPolicy policy = new S3AccessControlPolicy();    
        String bucketName = request.getBucketName();
        SBucketVO sbucket = bucketDao.getByName( bucketName );
        if (sbucket == null)
            throw new NoSuchObjectException("Bucket " + bucketName + " does not exist");

        S3CanonicalUser owner = new S3CanonicalUser();
        owner.setID(sbucket.getOwnerCanonicalId());
        owner.setDisplayName("");
        policy.setOwner(owner);
View Full Code Here

        long contentLength = request.getContentLength();
        S3MetaDataEntry[] meta = request.getMetaEntries();
        S3AccessControlList acl = request.getAcl();

        SBucketVO bucket = bucketDao.getByName(bucketName);
        if (bucket == null) throw new NoSuchObjectException("Bucket " + bucketName + " does not exist");


        // Is the caller allowed to write the object?
        // The allocObjectItem checks for the bucket policy PutObject permissions
        OrderedPair<SObjectVO, SObjectItemVO> object_objectitem_pair = allocObjectItem(bucket, key, meta, acl, request.getCannedAccess());
View Full Code Here

        long contentLength = request.getContentLength();
        S3MetaDataEntry[] meta = request.getMetaEntries();
        S3AccessControlList acl = request.getAcl();

        SBucketVO bucket = bucketDao.getByName(bucketName);
        if(bucket == null) throw new NoSuchObjectException("Bucket " + bucketName + " does not exist");

        // Is the caller allowed to write the object? 
        // The allocObjectItem checks for the bucket policy PutObject permissions
        OrderedPair<SObjectVO, SObjectItemVO> object_objectitem_pair = allocObjectItem(bucket, key, meta, acl, null);
        OrderedPair<SHostVO, String> host_storagelocation_pair = getBucketStorageHost(bucket);
View Full Code Here

TOP

Related Classes of com.cloud.bridge.service.exception.NoSuchObjectException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.