Package org.jets3t.service

Examples of org.jets3t.service.StorageService


                StorageObject encryptedCredentialsObject = null;

                try {
                    credentials = null;
                    StorageService service = getStorageService();
                    encryptedCredentialsObject = service.getObject(
                        bucketName[0], credentialObjectKey[0]);
                } catch (ServiceException e) {
                    SwingUtilities.invokeLater(new Runnable() {
                        public void run() {
                            progressDialog.stopDialog();
View Full Code Here


                        new StorageObject(credentialObjectKey[0]);
                    encryptedCredentialsObject.setDataInputStream(bais[0]);
                    encryptedCredentialsObject.setAcl(AccessControlList.REST_CANNED_PUBLIC_READ);

                    // Store credentials
                    StorageService service = getStorageService();
                    service.createBucket(bucketName[0]);
                    service.putObject(bucketName[0], encryptedCredentialsObject);

                    SwingUtilities.invokeLater(new Runnable() {
                        public void run() {
                            progressDialog.stopDialog();
                        }
View Full Code Here

            System.err.println("ERROR: Acess Control List setting \"acl\" must have one of the values "
                + "PRIVATE, PUBLIC_READ, PUBLIC_READ_WRITE");
            System.exit(2);
        }

        StorageService service = null;
        if ("S3".equalsIgnoreCase(providerId)) {
            service = new RestS3Service(
                providerCredentials, APPLICATION_DESCRIPTION,
                new CommandLineCredentialsProvider(), myProperties);
        } else if ("GS".equalsIgnoreCase(providerId)) {
View Full Code Here

        }
    }

    protected StorageBucket createBucketForTest(String testName, String location) throws Exception {
        String bucketName = getBucketNameForTest(testName);
        StorageService service = getStorageService(getCredentials());
        String projectId = testProperties.getProperty("gsservice.project_id");
        return ((GoogleStorageService)service).createBucket(bucketName, null, null, projectId);
    }
View Full Code Here

        return this.createBucketForTest(testName, null);
    }

    protected StorageBucket createBucketForTest(String testName, String location) throws Exception {
        String bucketName = getBucketNameForTest(testName);
        StorageService service = getStorageService(getCredentials());
        if (service instanceof S3Service) {
            return ((S3Service)service).getOrCreateBucket(bucketName, location);
        } else {
            GSBucket bucket = new GSBucket(bucketName, location);
            return ((GoogleStorageService)service).createBucket(bucket);
View Full Code Here

            cleanupBucketForTest("testFileComparer");
        }
    }

    public void testBucketLogging() throws Exception {
        StorageService service = getStorageService(getCredentials());

        // TODO Test case doesn't work when accessing GS via S3 service (perhaps impossible
        // due to Google Storage API?)
        if (TARGET_SERVICE_GS.equals(getTargetService()) && !(service instanceof GoogleStorageService)) {
            return;
View Full Code Here

TOP

Related Classes of org.jets3t.service.StorageService

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.