@NotNull private static CloudBlob getCloudBlob(@NotNull CloudBlobDirectory parentDirectory, @NotNull BlobFile blobFile) throws URISyntaxException, StorageException { CloudBlob blob; if (blobFile.getType().equals(BlobType.BLOCK_BLOB.toString())) { blob = parentDirectory.getBlockBlobReference(blobFile.getName()); } else { blob = parentDirectory.getPageBlobReference(blobFile.getName()); } return blob; }
final BlobAttributes attributes = new BlobAttributes(BlobType.parse(blobType)); final BlobProperties properties = attributes.getProperties(); if (!Utility.isNullOrEmpty(blobTierString) && properties.getBlobType().equals(BlobType.PAGE_BLOB)) { PremiumPageBlobTier premiumPageBlobTier = PremiumPageBlobTier.parse(blobTierString); properties.setPremiumPageBlobTier(premiumPageBlobTier); else if (!Utility.isNullOrEmpty(blobTierString) && properties.getBlobType().equals(BlobType.BLOCK_BLOB)) { StandardBlobTier standardBlobTier = StandardBlobTier.parse(blobTierString); properties.setStandardBlobTier(standardBlobTier); else if (!Utility.isNullOrEmpty(blobTierString) && properties.getBlobType().equals(BlobType.UNSPECIFIED)) { PremiumPageBlobTier premiumPageBlobTier = PremiumPageBlobTier.parse(blobTierString); StandardBlobTier standardBlobTier = StandardBlobTier.parse(blobTierString);
if (properties.getBlobType().equals(BlobType.PAGE_BLOB)) { PremiumPageBlobTier premiumPageBlobTier = PremiumPageBlobTier.parse(value); this.properties.setPremiumPageBlobTier(premiumPageBlobTier); else if (properties.getBlobType().equals(BlobType.BLOCK_BLOB)) { StandardBlobTier standardBlobTier = StandardBlobTier.parse(value); this.properties.setStandardBlobTier(standardBlobTier); else if (properties.getBlobType().equals(BlobType.UNSPECIFIED)) { PremiumPageBlobTier premiumPageBlobTier = PremiumPageBlobTier.parse(value); StandardBlobTier standardBlobTier = StandardBlobTier.parse(value);
final BlobAttributes attributes = new BlobAttributes(BlobType.parse(blobType)); final BlobProperties properties = attributes.getProperties(); if (!Utility.isNullOrEmpty(blobTierString) && properties.getBlobType().equals(BlobType.PAGE_BLOB)) { PremiumPageBlobTier premiumPageBlobTier = PremiumPageBlobTier.parse(blobTierString); properties.setPremiumPageBlobTier(premiumPageBlobTier); else if (!Utility.isNullOrEmpty(blobTierString) && properties.getBlobType().equals(BlobType.BLOCK_BLOB)) { StandardBlobTier standardBlobTier = StandardBlobTier.parse(blobTierString); properties.setStandardBlobTier(standardBlobTier); else if (!Utility.isNullOrEmpty(blobTierString) && properties.getBlobType().equals(BlobType.UNSPECIFIED)) { PremiumPageBlobTier premiumPageBlobTier = PremiumPageBlobTier.parse(blobTierString); StandardBlobTier standardBlobTier = StandardBlobTier.parse(blobTierString);
if (properties.getBlobType().equals(BlobType.PAGE_BLOB)) { PremiumPageBlobTier premiumPageBlobTier = PremiumPageBlobTier.parse(value); this.properties.setPremiumPageBlobTier(premiumPageBlobTier); else if (properties.getBlobType().equals(BlobType.BLOCK_BLOB)) { StandardBlobTier standardBlobTier = StandardBlobTier.parse(value); this.properties.setStandardBlobTier(standardBlobTier); else if (properties.getBlobType().equals(BlobType.UNSPECIFIED)) { PremiumPageBlobTier premiumPageBlobTier = PremiumPageBlobTier.parse(value); StandardBlobTier standardBlobTier = StandardBlobTier.parse(value);
@NotNull private static CloudBlob getCloudBlob(@NotNull CloudBlobContainer container, @NotNull BlobFile blobFile) throws URISyntaxException, StorageException { CloudBlob blob; if (blobFile.getType().equals(BlobType.BLOCK_BLOB.toString())) { blob = container.getBlockBlobReference(blobFile.getPath()); } else { blob = container.getPageBlobReference(blobFile.getPath()); } return blob; }
type = properties.getBlobType().toString();
type = properties.getBlobType().toString();