oscerd opened a new pull request, #22826:
URL: https://github.com/apache/camel/pull/22826

   ## Summary
   
   Adds support for Azure Blob Storage immutability policies and legal holds to 
the
   `camel-azure-storage-blob` component (CAMEL-23339). Both features are 
required for
   compliance and quarantine workflows where blobs must remain unmodified during
   processing (e.g. malware scanning).
   
   Two new producer operations:
   
   - **`setBlobLegalHold`** — sets/clears a legal hold on a blob. The boolean 
flag is read
     from the new `CamelAzureStorageBlobLegalHold` header or the message body. 
While a
     legal hold is set, the blob cannot be modified or deleted until the hold 
is cleared.
   - **`setBlobImmutabilityPolicy`** — applies a time-based retention policy. 
The expiry
     time (`OffsetDateTime`) and policy mode (`BlobImmutabilityPolicyMode`, 
default
     `UNLOCKED`) are read from the new
     `CamelAzureStorageBlobImmutabilityPolicyExpiryTime` /
     `CamelAzureStorageBlobImmutabilityPolicyMode` headers. A pre-built
     `BlobImmutabilityPolicy` can also be supplied via the message body or the
     `CamelAzureStorageBlobImmutabilityPolicy` header.
   
   ## Changes
   
   - `BlobOperationsDefinition` — new `setBlobLegalHold` and 
`setBlobImmutabilityPolicy`
     enum values
   - `BlobConstants` — four new headers (`BLOB_LEGAL_HOLD`, 
`BLOB_IMMUTABILITY_POLICY`,
     `BLOB_IMMUTABILITY_POLICY_EXPIRY_TIME`, `BLOB_IMMUTABILITY_POLICY_MODE`)
   - `BlobExchangeHeaders` — readers and writers for the new headers
   - `BlobConfigurationOptionsProxy` — resolves the new options from headers
   - `BlobClientWrapper` — `setLegalHold` and `setImmutabilityPolicy` 
delegating to the
     Azure SDK `BlobClientBase.setLegalHoldWithResponse` /
     `setImmutabilityPolicyWithResponse`
   - `BlobOperations` — `setBlobLegalHold` and `setBlobImmutabilityPolicy` 
methods, with
     validation of required inputs and sensible defaulting of policy mode to 
`UNLOCKED`
   - `BlobProducer` — dispatches the two new operations
   - Unit tests covering header- and body-driven inputs, mode defaulting and
     missing-input validation
   - Documentation update with operation table entries and usage examples
   - Catalog / endpoint DSL regenerated
   
   ## Test plan
   
   - [x] `mvn install` in `components/camel-azure/camel-azure-storage-blob` (50 
tests
         passing)
   - [x] Full root build `mvn clean install -DskipTests -Dquickly` succeeds
   - [x] Endpoint DSL regenerated and committed
   - [x] Catalog metadata regenerated and committed
   - [ ] Reviewer to validate API usage if possible against a real storage 
account with
         immutable storage / versioning enabled
   
   _Claude Code on behalf of Andrea Cosentino_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to