protected boolean isWritable(StorageAccount acct) { return Boolean.valueOf(acct.getOptions().get(StorageAccount.OPTS.WRITABLE.name())); }
public static AmazonS3Client getAmazonS3Client(String accessKey, String secretKey, Map<String, String> options) { AmazonS3Client client = s3Clients.get(key(accessKey, secretKey)); if (null == client) { Region region = null; if (options != null && options.get(StorageAccount.OPTS.AWS_REGION.name()) != null) { region = com.amazonaws.services.s3.model.Region.fromValue( options.get(StorageAccount.OPTS.AWS_REGION.name())).toAWSRegion(); } client = newS3Client(accessKey, secretKey, region); s3Clients.put(key(accessKey, secretKey), client); } return client; }
acct.setOption(StorageAccount.OPTS.CF_ACCOUNT_ID.name(), value); acct.setOption(StorageAccount.OPTS.CF_KEY_ID.name(), value); acct.setOption(StorageAccount.OPTS.CF_KEY_PATH.name(), value); acct.setOption(StorageAccount.OPTS.ZONE.name(), value); acct.setOption(StorageAccount.OPTS.HOST.name(), value); acct.setOption(StorageAccount.OPTS.PORT.name(), value); acct.setOption(StorageAccount.OPTS.BASE_DIRECTORY.name(), value); acct.setOption(StorageAccount.OPTS.RESOURCE.name(), value); acct.setOption(StorageAccount.OPTS.SNAPSHOT_USER.name(), value); acct.setOption(StorageAccount.OPTS.BRIDGE_HOST.name(), value); acct.setOption(StorageAccount.OPTS.BRIDGE_PORT.name(), value); acct.setOption(StorageAccount.OPTS.BRIDGE_USER.name(), value); acct.setOption(StorageAccount.OPTS.BRIDGE_PASS.name(), value); acct.setOption(StorageAccount.OPTS.BRIDGE_MEMBER_ID.name(), value);
public IrodsStorageProvider(String username, String password, Map<String, String> options) { if (options == null) { throw new StorageException("Missing required options"); } this.password = password; this.username = username; this.zone = getOptionString(ZONE.name(), options); this.port = getOptionInt(PORT.name(), options); this.host = getOptionString(HOST.name(), options); this.baseDirectory = getOptionString(BASE_DIRECTORY.name(), options); this.storageResource = getOptionString(RESOURCE.name(), options); log.trace("Creating new irods provider " + username + "#" + zone + "@" + host + ":" + port + baseDirectory + " rsrc " + storageResource); }