public void setStorageAccounts(Set<StorageAccount> storageAccts) { this.storageAccounts = new HashMap<>(); for (StorageAccount storageAcct : storageAccts) { this.storageAccounts.put(storageAcct.getId(), storageAcct); } }
protected String validateStoreId(String storeId) throws ManifestArgumentException { // validate storeId; if (StringUtils.isBlank(storeId)) { for (StorageAccount storageAccount : this.storageProviderFactory.getStorageAccounts()) { if (storageAccount.isPrimary()) { storeId = storageAccount.getId(); break; } } if (StringUtils.isBlank(storeId)) { throw new ManifestArgumentException("storeId is blank and " + "no primary storage account is " + "indicated for this account."); } } else { boolean matches = false; for (StorageAccount storageAccount : this.storageProviderFactory.getStorageAccounts()) { if (storageAccount.getId().equals(storeId)) { matches = true; break; } } if (!matches) { throw new ManifestArgumentException("The storeId you supplied (" + storeId + ") is not associated with this domain."); } } return storeId; }
protected ContentStore newContentStoreImpl(StorageAccount acct, int maxRetries) { return new ContentStoreImpl(baseURL, acct.getType(), acct.getId(), isWritable(acct), getRestHelper(), maxRetries); }
protected ContentStore newContentStoreImpl(StorageAccount acct) { return new ContentStoreImpl(baseURL, acct.getType(), acct.getId(), isWritable(acct), getRestHelper()); }
protected ContentStore newContentStoreImpl(StorageAccount acct) { return new CachingContentStoreImpl(getBaseURL(), acct.getType(), acct.getId(), isWritable(acct), getRestHelper()); }