/** * Assert that if validation is on, an encryption policy is not specified. */ protected void assertNoEncryptionPolicyOrStrictMode() { // Throw if an encryption policy is set and encryption validation is on if (this.getEncryptionPolicy() != null) { throw new IllegalArgumentException(SR.ENCRYPTION_NOT_SUPPORTED_FOR_OPERATION); } // Throw if an encryption policy is not set but strict mode is on this.assertPolicyIfRequired(); }
final TableRequestOptions options, final OperationContext opContext) throws StorageException { options.assertPolicyIfRequired();
private static Map<String, EntityProperty> getPropertiesFromDictionary(TableEntity entity, TableRequestOptions options, final OperationContext opContext) throws IOException, StorageException { Map<String, EntityProperty> properties = entity.writeEntity(opContext); if (properties == null) { properties = new HashMap<String, EntityProperty>(); } options.assertPolicyIfRequired(); // Check if encryption policy is set and invoke EncryptEnity if it is set. if (options.getEncryptionPolicy() != null) { properties = options.getEncryptionPolicy().encryptEntity(properties, entity.getPartitionKey(), entity.getRowKey(), options.getEncryptionResolver()); } return properties; } }