Package com.cloud.bridge.service.controller.s3

Examples of com.cloud.bridge.service.controller.s3.ServiceProvider


          return new S3BucketAction();
        }
        else {
          String objectKey = pathInfo.substring(1);
          request.setAttribute(S3Constants.OBJECT_ATTR_KEY, objectKey);
          return new S3ObjectAction();
        }
      }
     
      else
       
      {
            
        int endPos = pathInfo.indexOf('/')// Subsequent / character?
       
          if (endPos < 1)
          {
             bucketName = pathInfo;
             S3Engine.verifyBucketName( bucketName, false );
              request.setAttribute(S3Constants.BUCKET_ATTR_KEY, bucketName);
              return new S3BucketAction();
           }
          else
        {
           bucketName = pathInfo.substring(0, endPos);
             key        = pathInfo.substring(endPos + 1);     
              S3Engine.verifyBucketName( bucketName, false );
        
           if (!key.isEmpty())
           {
               request.setAttribute(S3Constants.BUCKET_ATTR_KEY, bucketName);
              request.setAttribute(S3Constants.OBJECT_ATTR_KEY, pathInfo.substring(endPos + 1));
              return new S3ObjectAction();
           }
           else {
                request.setAttribute(S3Constants.BUCKET_ATTR_KEY, bucketName);
                return new S3BucketAction();
           }
View Full Code Here


      authenticateRequest( request, params );
        }
    catch (Exception e)
    { logger.warn("Authentication details insufficient"); }

    return new S3ObjectAction();
   
  }
View Full Code Here

                return new S3BucketAction();
            }
            else {
                String objectKey = pathInfo.substring(1);
                request.setAttribute(S3Constants.OBJECT_ATTR_KEY, objectKey);
                return new S3ObjectAction();
            }
        }

        else

        {

            int endPos = pathInfo.indexOf('/')// Subsequent / character?

            if (endPos < 1)
            {
                bucketName = pathInfo;
                S3Engine.verifyBucketName( bucketName, false );
                request.setAttribute(S3Constants.BUCKET_ATTR_KEY, bucketName);
                return new S3BucketAction();
            }
            else
            {
                bucketName = pathInfo.substring(0, endPos);
                key        = pathInfo.substring(endPos + 1);     
                S3Engine.verifyBucketName( bucketName, false );

                if (!key.isEmpty())
                {
                    request.setAttribute(S3Constants.BUCKET_ATTR_KEY, bucketName);
                    request.setAttribute(S3Constants.OBJECT_ATTR_KEY, pathInfo.substring(endPos + 1));
                    return new S3ObjectAction();
                }
                else {
                    request.setAttribute(S3Constants.BUCKET_ATTR_KEY, bucketName);
                    return new S3BucketAction();
                }
View Full Code Here

            authenticateRequest( request, params );
        }
        catch (Exception e)
        { logger.warn("Authentication details insufficient"); }

        return new S3ObjectAction();

    }
View Full Code Here

            if ( !((method.equalsIgnoreCase( "POST" ) && !(request.getQueryString().equalsIgnoreCase("delete"))) ) ){
                S3AuthParams params = extractRequestHeaders( request );
                authenticateRequest( request, params );
            }

            ServletAction action = routeRequest(request);
            if ( action != null ) {
                action.execute(request, response);
            }
            else {
                response.setStatus(404);
                endResponse(response, "File not found");
            }
View Full Code Here

            if (!((method.equalsIgnoreCase("POST") && !(request.getQueryString().equalsIgnoreCase("delete"))))) {
                S3AuthParams params = extractRequestHeaders(request);
                authenticateRequest(request, params);
            }

            ServletAction action = routeRequest(request);
            if (action != null) {
                action.execute(request, response);
            } else {
                response.setStatus(404);
                endResponse(response, "File not found");
            }
            txn.close();
View Full Code Here

          if ( !((method.equalsIgnoreCase( "POST" ) && !(request.getQueryString().equalsIgnoreCase("delete"))) ) ){
              S3AuthParams params = extractRequestHeaders( request );
            authenticateRequest( request, params );
          }

          ServletAction action = routeRequest(request);
          if ( action != null ) {
             action.execute(request, response);
          }
          else {
             response.setStatus(404);
               endResponse(response, "File not found");
          }
View Full Code Here

            if ( !((method.equalsIgnoreCase( "POST" ) && !(request.getQueryString().equalsIgnoreCase("delete"))) ) ){
                S3AuthParams params = extractRequestHeaders( request );
                authenticateRequest( request, params );
            }

            ServletAction action = routeRequest(request);
            if ( action != null ) {
                action.execute(request, response);
            }
            else {
                response.setStatus(404);
                endResponse(response, "File not found");
            }
View Full Code Here

TOP

Related Classes of com.cloud.bridge.service.controller.s3.ServiceProvider

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.