/** * Returns the named bucket. * * @param bucketName * the name of the bucket to find. * @return the bucket, or null if no the named bucket has found. * @throws SdkClientException */ public Bucket getBucket( String bucketName ) throws SdkClientException { return s3Client.doesBucketExistV2( bucketName ) ? new Bucket( bucketName ) : null; }
@Override protected void doStartElement( String uri, String name, String qName, Attributes attrs) { if (in("ListAllMyBucketsResult")) { if (name.equals("Owner")) { bucketsOwner = new Owner(); } } else if (in("ListAllMyBucketsResult", "Buckets")) { if (name.equals("Bucket")) { currentBucket = new Bucket(); currentBucket.setOwner(bucketsOwner); } } }
return new Bucket(bucketName);
@Override protected void doStartElement( String uri, String name, String qName, Attributes attrs) { if (in("ListAllMyBucketsResult")) { if (name.equals("Owner")) { bucketsOwner = new Owner(); } } else if (in("ListAllMyBucketsResult", "Buckets")) { if (name.equals("Bucket")) { currentBucket = new Bucket(); currentBucket.setOwner(bucketsOwner); } } }
return new Bucket(bucketName);
@Override public SyncableRepository getPushRepository() { return new RepositoryS3(new Bucket(props.getProperty(ENV_BUCKET)), repository, client, branch); }
private LambdaConfig() { try (InputStream is = getClass().getClassLoader().getResourceAsStream("env.properties")) { this.props.load(is); this.repository = new FileRepository(new File(System.getProperty("java.io.tmpdir"), "s3")); } catch (IOException e) { throw new IllegalArgumentException(e); } overwriteWithSystemProperty(ENV_BRANCH); overwriteWithSystemProperty(ENV_BUCKET); overwriteWithSystemProperty(ENV_GITHUB); this.remote = new Remote(Constants.DEFAULT_REMOTE_NAME); this.branch = new Branch(props.getProperty(ENV_BRANCH, Constants.MASTER)); this.authentication = new SecureShellAuthentication(new Bucket(props.getProperty(ENV_BUCKET)), client); }
@Override protected void doStartElement( String uri, String name, String qName, Attributes attrs) { if (in("ListAllMyBucketsResult")) { if (name.equals("Owner")) { bucketsOwner = new Owner(); } } else if (in("ListAllMyBucketsResult", "Buckets")) { if (name.equals("Bucket")) { currentBucket = new Bucket(); currentBucket.setOwner(bucketsOwner); } } }
@Override protected void doStartElement( String uri, String name, String qName, Attributes attrs) { if (in("ListAllMyBucketsResult")) { if (name.equals("Owner")) { bucketsOwner = new Owner(); } } else if (in("ListAllMyBucketsResult", "Buckets")) { if (name.equals("Bucket")) { currentBucket = new Bucket(); currentBucket.setOwner(bucketsOwner); } } }
return new Bucket(bucketName);
return new Bucket(bucketName);