[backport camel-4.14.x] CAMEL-23579: camel-pdf - align Exchange header constant names with Camel naming convention#23561
Open
oscerd wants to merge 1 commit into
Open
Conversation
…mel naming convention (apache#23437) Renames the Exchange header string values in PdfHeaderConstants from non-Camel prefixed values (protection-policy, pdf-document, decryption-material, files-to-merge) to CamelPdf<Name>, following the convention used across the rest of the Camel component catalog and matching the pattern established in CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail), CAMEL-23461 (camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket / camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira). The Java field names (PROTECTION_POLICY_HEADER_NAME, PDF_DOCUMENT_HEADER_NAME, DECRYPTION_MATERIAL_HEADER_NAME, FILES_TO_MERGE_HEADER_NAME) are unchanged so routes referencing the constants symbolically continue to work; routes using the literal string values must be updated (documented in the 4.21 upgrade guide). The generated Endpoint DSL header accessors on PdfHeaderNameBuilder have been renamed accordingly: - protectionPolicy() -> pdfProtectionPolicy() - decryptionMaterial() -> pdfDecryptionMaterial() - filesToMerge() -> pdfFilesToMerge() - pdfDocument() unchanged in name but returns "CamelPdfDocument" All existing tests use symbolic constant references and continue to pass without changes. Tracker: CAMEL-23577 Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
a24f7a7 to
a6f3367
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports #23437 to `camel-4.14.x`.
Cherry-pick of merge commit `bdcfe4960` with two adaptations:
`camel-4x-upgrade-guide-4_21.adoc`, which does not exist on 4.14.x. Per
the project's backport policy the same content has been added to
`camel-4x-upgrade-guide-4_14.adoc` in the `== Upgrading from 4.14.7 to
4.14.8` section instead.
string concatenation to text blocks. On 4.14.x the existing string-concat
formatting has been preserved; only the four header string values are
changed.
Summary
Renames the four Exchange header string values in `PdfHeaderConstants` to
`CamelPdf` so they fall under the default `HeaderFilterStrategy`:
These headers carry security-sensitive PDFBox objects (`PDDocument`,
`DecryptionMaterial`, `ProtectionPolicy`); aligning with the `Camel`
namespace lets the default header filter strip them at transport boundaries.
Test plan
preserved (avoids touching unrelated code on the maintenance branch)
Tracker: CAMEL-23577
Reported by Claude Code on behalf of Andrea Cosentino