This is an automated email from the ASF dual-hosted git repository. nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers in repository https://gitbox.apache.org/repos/asf/camel.git
commit 639b10bb1232169312fcdb4203322c706d898555 Author: Nicolas Filotto <[email protected]> AuthorDate: Tue Mar 15 12:36:33 2022 +0100 CAMEL-17792: Add doc about the message headers of camel-atmos --- .../org/apache/camel/component/atmos/atmos.json | 8 +++++++ .../camel-atmos/src/main/docs/atmos-component.adoc | 6 +++-- .../camel/component/atmos/AtmosEndpoint.java | 3 ++- .../camel/component/atmos/dto/AtmosDelResult.java | 6 ++--- .../atmos/dto/AtmosFileDownloadResult.java | 6 ++--- .../component/atmos/dto/AtmosFileUploadResult.java | 6 ++--- .../camel/component/atmos/dto/AtmosMoveResult.java | 6 ++--- .../camel/component/atmos/util/AtmosConstants.java | 19 +++++++++++++++ .../component/atmos/util/AtmosResultHeader.java | 27 ---------------------- .../consumer/AtmosConsumerGetSingleTest.java | 4 ++-- .../integration/producer/AtmosProducerDelTest.java | 4 ++-- .../producer/AtmosProducerGetFolderTest.java | 4 ++-- .../producer/AtmosProducerGetSingleTest.java | 4 ++-- .../producer/AtmosProducerMoveTest.java | 4 ++-- .../AtmosProducerPutFolderWithRemotePathTest.java | 4 ++-- .../producer/AtmosProducerPutSingleFileTest.java | 4 ++-- ...mosProducerPutSingleFileWithRemotePathTest.java | 4 ++-- 17 files changed, 61 insertions(+), 58 deletions(-) diff --git a/components/camel-atmos/src/generated/resources/org/apache/camel/component/atmos/atmos.json b/components/camel-atmos/src/generated/resources/org/apache/camel/component/atmos/atmos.json index bef0175..1a3f9de 100644 --- a/components/camel-atmos/src/generated/resources/org/apache/camel/component/atmos/atmos.json +++ b/components/camel-atmos/src/generated/resources/org/apache/camel/component/atmos/atmos.json @@ -30,6 +30,14 @@ "secretKey": { "kind": "property", "displayName": "Secret Key", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "description": "The secret key to pass to the Atmos client (should be base64 encoded)" }, "sslValidation": { "kind": "property", "displayName": "Ssl Validation", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the Atmos client should perform SSL validation" } }, + "headers": { + "DOWNLOADED_FILE": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the remote path downloaded in case of a single file." }, + "DOWNLOADED_FILES": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the remote paths downloaded in case of multiple files (one per line)." }, + "UPLOADED_FILE": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the remote path uploaded in case of a single file." }, + "UPLOADED_FILES": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the remote paths uploaded in case of multiple files (one per line)." }, + "DELETED_PATH": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The remote path deleted on Atmos." }, + "MOVED_PATH": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The moved path." } + }, "properties": { "name": { "kind": "path", "displayName": "Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.atmos.AtmosConfiguration", "configurationField": "configuration", "description": "Atmos name" }, "operation": { "kind": "path", "displayName": "Operation", "group": "common", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.atmos.util.AtmosOperation", "enum": [ "put", "del", "search", "get", "move" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.atmos.AtmosConfiguration", "configurationField": "configuration", "description": "Operation to perform" }, diff --git a/components/camel-atmos/src/main/docs/atmos-component.adoc b/components/camel-atmos/src/main/docs/atmos-component.adoc index ec613d3..324ef8f 100644 --- a/components/camel-atmos/src/main/docs/atmos-component.adoc +++ b/components/camel-atmos/src/main/docs/atmos-component.adoc @@ -31,7 +31,9 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END - +// component headers: START +include::partial$component-endpoint-headers.adoc[] +// component headers: END == Dependencies @@ -73,7 +75,7 @@ exchange [source,text] ------------------------------- -DOWNLOADED_FILE, DOWNLOADED_FILES, UPLOADED_FILE, UPLOADED_FILES, FOUND_FILES, DELETED_PATH, MOVED_PATH +DOWNLOADED_FILE, DOWNLOADED_FILES, UPLOADED_FILE, UPLOADED_FILES, DELETED_PATH, MOVED_PATH ------------------------------- == Examples diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/AtmosEndpoint.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/AtmosEndpoint.java index 3318f6d..b125161 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/AtmosEndpoint.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/AtmosEndpoint.java @@ -26,6 +26,7 @@ import org.apache.camel.component.atmos.integration.producer.AtmosDelProducer; import org.apache.camel.component.atmos.integration.producer.AtmosGetProducer; import org.apache.camel.component.atmos.integration.producer.AtmosMoveProducer; import org.apache.camel.component.atmos.integration.producer.AtmosPutProducer; +import org.apache.camel.component.atmos.util.AtmosConstants; import org.apache.camel.component.atmos.util.AtmosException; import org.apache.camel.component.atmos.util.AtmosOperation; import org.apache.camel.spi.UriEndpoint; @@ -38,7 +39,7 @@ import static org.apache.camel.component.atmos.util.AtmosConstants.POLL_CONSUMER * Integrate with EMC's ViPR object data services using the Atmos Client. */ @UriEndpoint(firstVersion = "2.15.0", scheme = "atmos", title = "Atmos", syntax = "atmos:name/operation", - category = { Category.CLOUD, Category.FILE }) + category = { Category.CLOUD, Category.FILE }, headersClass = AtmosConstants.class) public class AtmosEndpoint extends DefaultEndpoint { @UriParam diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosDelResult.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosDelResult.java index c959dac..0058321 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosDelResult.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosDelResult.java @@ -17,19 +17,19 @@ package org.apache.camel.component.atmos.dto; import org.apache.camel.Exchange; -import org.apache.camel.component.atmos.util.AtmosResultHeader; +import org.apache.camel.component.atmos.util.AtmosConstants; public class AtmosDelResult extends AtmosResult { /** - * Object payload contained in Exchange Exchange Body is populated with the remote path deleted on atmos. + * Object payload contained in Exchange Body is populated with the remote path deleted on atmos. * * @param exchange */ @Override public void populateExchange(Exchange exchange) { String remotePath = (String) resultEntries; - exchange.getIn().setHeader(AtmosResultHeader.DELETED_PATH.name(), remotePath); + exchange.getIn().setHeader(AtmosConstants.DELETED_PATH, remotePath); exchange.getIn().setBody(remotePath); } } diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosFileDownloadResult.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosFileDownloadResult.java index 5e726e7..b6d494f 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosFileDownloadResult.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosFileDownloadResult.java @@ -20,7 +20,7 @@ import java.io.ByteArrayOutputStream; import java.util.Map; import org.apache.camel.Exchange; -import org.apache.camel.component.atmos.util.AtmosResultHeader; +import org.apache.camel.component.atmos.util.AtmosConstants; public class AtmosFileDownloadResult extends AtmosResult { @@ -45,14 +45,14 @@ public class AtmosFileDownloadResult extends AtmosResult { pathExtracted = entry.getKey(); baosExtracted = entry.getValue(); } - exchange.getIn().setHeader(AtmosResultHeader.DOWNLOADED_FILE.name(), pathExtracted); + exchange.getIn().setHeader(AtmosConstants.DOWNLOADED_FILE, pathExtracted); exchange.getIn().setBody(baosExtracted); } else { StringBuffer pathsExtracted = new StringBuffer(); for (Map.Entry<String, ByteArrayOutputStream> entry : map.entrySet()) { pathsExtracted.append(entry.getKey() + "\n"); } - exchange.getIn().setHeader(AtmosResultHeader.DOWNLOADED_FILES.name(), pathsExtracted.toString()); + exchange.getIn().setHeader(AtmosConstants.DOWNLOADED_FILES, pathsExtracted.toString()); exchange.getIn().setBody(map); } } diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosFileUploadResult.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosFileUploadResult.java index 65506f5..9b29212 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosFileUploadResult.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosFileUploadResult.java @@ -19,8 +19,8 @@ package org.apache.camel.component.atmos.dto; import java.util.Map; import org.apache.camel.Exchange; +import org.apache.camel.component.atmos.util.AtmosConstants; import org.apache.camel.component.atmos.util.AtmosResultCode; -import org.apache.camel.component.atmos.util.AtmosResultHeader; public class AtmosFileUploadResult extends AtmosResult { @@ -44,14 +44,14 @@ public class AtmosFileUploadResult extends AtmosResult { pathExtracted = entry.getKey(); codeExtracted = entry.getValue(); } - exchange.getIn().setHeader(AtmosResultHeader.UPLOADED_FILE.name(), pathExtracted); + exchange.getIn().setHeader(AtmosConstants.UPLOADED_FILE, pathExtracted); exchange.getIn().setBody(codeExtracted.name()); } else { StringBuffer pathsExtracted = new StringBuffer(); for (Map.Entry<String, AtmosResultCode> entry : map.entrySet()) { pathsExtracted.append(entry.getKey() + "\n"); } - exchange.getIn().setHeader(AtmosResultHeader.UPLOADED_FILES.name(), pathsExtracted.toString()); + exchange.getIn().setHeader(AtmosConstants.UPLOADED_FILES, pathsExtracted.toString()); exchange.getIn().setBody(map); } } diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosMoveResult.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosMoveResult.java index 6a7d9b2..f162e4f 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosMoveResult.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/dto/AtmosMoveResult.java @@ -17,19 +17,19 @@ package org.apache.camel.component.atmos.dto; import org.apache.camel.Exchange; -import org.apache.camel.component.atmos.util.AtmosResultHeader; +import org.apache.camel.component.atmos.util.AtmosConstants; public class AtmosMoveResult extends AtmosResult { /** - * Object payload contained in Exchange Exchange Header and Body contains the moved path + * Object payload contained in Exchange Header and Body contains the moved path * * @param exchange */ @Override public void populateExchange(Exchange exchange) { String movedPath = (String) resultEntries; - exchange.getIn().setHeader(AtmosResultHeader.MOVED_PATH.name(), movedPath); + exchange.getIn().setHeader(AtmosConstants.MOVED_PATH, movedPath); exchange.getIn().setBody(movedPath); } } diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/util/AtmosConstants.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/util/AtmosConstants.java index 64b0b67..c1f6df5 100644 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/util/AtmosConstants.java +++ b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/util/AtmosConstants.java @@ -16,11 +16,30 @@ */ package org.apache.camel.component.atmos.util; +import org.apache.camel.spi.Metadata; + public final class AtmosConstants { public static final String ATMOS_FILE_SEPARATOR = "/"; public static final long POLL_CONSUMER_DELAY = 60 * 60 * 1000L; + @Metadata(description = "The name of the remote path downloaded in case of a single file.", javaType = "java.lang.String") + public static final String DOWNLOADED_FILE = "DOWNLOADED_FILE"; + @Metadata(description = "The name of the remote paths downloaded in case of multiple files (one per line).", + javaType = "java.lang.String") + public static final String DOWNLOADED_FILES = "DOWNLOADED_FILES"; + @Metadata(label = "producer", description = "The name of the remote path uploaded in case of a single file.", + javaType = "java.lang.String") + public static final String UPLOADED_FILE = "UPLOADED_FILE"; + @Metadata(label = "producer", + description = "The name of the remote paths uploaded in case of multiple files (one per line).", + javaType = "java.lang.String") + public static final String UPLOADED_FILES = "UPLOADED_FILES"; + @Metadata(label = "producer", description = "The remote path deleted on Atmos.", javaType = "java.lang.String") + public static final String DELETED_PATH = "DELETED_PATH"; + @Metadata(label = "producer", description = "The moved path.", javaType = "java.lang.String") + public static final String MOVED_PATH = "MOVED_PATH"; + private AtmosConstants() { } diff --git a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/util/AtmosResultHeader.java b/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/util/AtmosResultHeader.java deleted file mode 100644 index da6a362..0000000 --- a/components/camel-atmos/src/main/java/org/apache/camel/component/atmos/util/AtmosResultHeader.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.atmos.util; - -public enum AtmosResultHeader { - DOWNLOADED_FILE, - DOWNLOADED_FILES, - UPLOADED_FILE, - UPLOADED_FILES, - FOUND_FILES, - DELETED_PATH, - MOVED_PATH; -} diff --git a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/consumer/AtmosConsumerGetSingleTest.java b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/consumer/AtmosConsumerGetSingleTest.java index 5ad2c1c..cb2b8ac 100644 --- a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/consumer/AtmosConsumerGetSingleTest.java +++ b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/consumer/AtmosConsumerGetSingleTest.java @@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit; import org.apache.camel.Exchange; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.atmos.integration.AtmosTestSupport; -import org.apache.camel.component.atmos.util.AtmosResultHeader; +import org.apache.camel.component.atmos.util.AtmosConstants; import org.apache.camel.component.mock.MockEndpoint; import org.junit.jupiter.api.Test; @@ -42,7 +42,7 @@ public class AtmosConsumerGetSingleTest extends AtmosTestSupport { List<Exchange> exchanges = mock.getReceivedExchanges(); Exchange exchange = exchanges.get(0); - Object header = exchange.getIn().getHeader(AtmosResultHeader.DOWNLOADED_FILE.name()); + Object header = exchange.getIn().getHeader(AtmosConstants.DOWNLOADED_FILE); Object body = exchange.getIn().getBody(); assertNotNull(header); assertNotNull(body); diff --git a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerDelTest.java b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerDelTest.java index a026e51..a113110 100644 --- a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerDelTest.java +++ b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerDelTest.java @@ -22,7 +22,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.atmos.integration.AtmosTestSupport; -import org.apache.camel.component.atmos.util.AtmosResultHeader; +import org.apache.camel.component.atmos.util.AtmosConstants; import org.apache.camel.component.mock.MockEndpoint; import org.junit.jupiter.api.Test; @@ -48,7 +48,7 @@ public class AtmosProducerDelTest extends AtmosTestSupport { List<Exchange> exchanges = mock.getReceivedExchanges(); Exchange exchange = exchanges.get(0); - Object header = exchange.getIn().getHeader(AtmosResultHeader.DELETED_PATH.name()); + Object header = exchange.getIn().getHeader(AtmosConstants.DELETED_PATH); Object body = exchange.getIn().getBody(); assertNotNull(header); assertNotNull(body); diff --git a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerGetFolderTest.java b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerGetFolderTest.java index 598e85b..c6371ca 100644 --- a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerGetFolderTest.java +++ b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerGetFolderTest.java @@ -23,7 +23,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.atmos.integration.AtmosTestSupport; -import org.apache.camel.component.atmos.util.AtmosResultHeader; +import org.apache.camel.component.atmos.util.AtmosConstants; import org.apache.camel.component.mock.MockEndpoint; import org.junit.jupiter.api.Test; import org.slf4j.Logger; @@ -52,7 +52,7 @@ public class AtmosProducerGetFolderTest extends AtmosTestSupport { List<Exchange> exchanges = mock.getReceivedExchanges(); Exchange exchange = exchanges.get(0); - Object header = exchange.getIn().getHeader(AtmosResultHeader.DOWNLOADED_FILES.name()); + Object header = exchange.getIn().getHeader(AtmosConstants.DOWNLOADED_FILES); Object body = exchange.getIn().getBody(); assertNotNull(header); assertNotNull(body); diff --git a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerGetSingleTest.java b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerGetSingleTest.java index c1196de..ea1dbb7 100644 --- a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerGetSingleTest.java +++ b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerGetSingleTest.java @@ -23,7 +23,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.atmos.integration.AtmosTestSupport; -import org.apache.camel.component.atmos.util.AtmosResultHeader; +import org.apache.camel.component.atmos.util.AtmosConstants; import org.apache.camel.component.mock.MockEndpoint; import org.junit.jupiter.api.Test; @@ -49,7 +49,7 @@ public class AtmosProducerGetSingleTest extends AtmosTestSupport { List<Exchange> exchanges = mock.getReceivedExchanges(); Exchange exchange = exchanges.get(0); - Object header = exchange.getIn().getHeader(AtmosResultHeader.DOWNLOADED_FILE.name()); + Object header = exchange.getIn().getHeader(AtmosConstants.DOWNLOADED_FILE); Object body = exchange.getIn().getBody(); assertNotNull(header); assertNotNull(body); diff --git a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerMoveTest.java b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerMoveTest.java index 34e546c..e33aa30 100644 --- a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerMoveTest.java +++ b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerMoveTest.java @@ -23,7 +23,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.atmos.integration.AtmosTestSupport; -import org.apache.camel.component.atmos.util.AtmosResultHeader; +import org.apache.camel.component.atmos.util.AtmosConstants; import org.apache.camel.component.mock.MockEndpoint; import org.junit.jupiter.api.Test; @@ -49,7 +49,7 @@ public class AtmosProducerMoveTest extends AtmosTestSupport { List<Exchange> exchanges = mock.getReceivedExchanges(); Exchange exchange = exchanges.get(0); - Object header = exchange.getIn().getHeader(AtmosResultHeader.MOVED_PATH.name()); + Object header = exchange.getIn().getHeader(AtmosConstants.MOVED_PATH); Object body = exchange.getIn().getBody(); assertNotNull(header); assertNotNull(body); diff --git a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerPutFolderWithRemotePathTest.java b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerPutFolderWithRemotePathTest.java index 5a996de..02ac594 100644 --- a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerPutFolderWithRemotePathTest.java +++ b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerPutFolderWithRemotePathTest.java @@ -22,7 +22,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.atmos.integration.AtmosTestSupport; -import org.apache.camel.component.atmos.util.AtmosResultHeader; +import org.apache.camel.component.atmos.util.AtmosConstants; import org.apache.camel.component.mock.MockEndpoint; import org.junit.jupiter.api.Test; @@ -48,7 +48,7 @@ public class AtmosProducerPutFolderWithRemotePathTest extends AtmosTestSupport { List<Exchange> exchanges = mock.getReceivedExchanges(); Exchange exchange = exchanges.get(0); - Object header = exchange.getIn().getHeader(AtmosResultHeader.UPLOADED_FILES.name()); + Object header = exchange.getIn().getHeader(AtmosConstants.UPLOADED_FILES); Object body = exchange.getIn().getBody(); assertNotNull(header); assertNotNull(body); diff --git a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerPutSingleFileTest.java b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerPutSingleFileTest.java index f367c1c..9f0a612 100644 --- a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerPutSingleFileTest.java +++ b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerPutSingleFileTest.java @@ -23,7 +23,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.atmos.integration.AtmosTestSupport; -import org.apache.camel.component.atmos.util.AtmosResultHeader; +import org.apache.camel.component.atmos.util.AtmosConstants; import org.apache.camel.component.mock.MockEndpoint; import org.junit.jupiter.api.Test; @@ -49,7 +49,7 @@ public class AtmosProducerPutSingleFileTest extends AtmosTestSupport { List<Exchange> exchanges = mock.getReceivedExchanges(); Exchange exchange = exchanges.get(0); - Object header = exchange.getIn().getHeader(AtmosResultHeader.UPLOADED_FILE.name()); + Object header = exchange.getIn().getHeader(AtmosConstants.UPLOADED_FILE); Object body = exchange.getIn().getBody(); assertNotNull(header); assertNotNull(body); diff --git a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerPutSingleFileWithRemotePathTest.java b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerPutSingleFileWithRemotePathTest.java index 074d6da..98df0b3 100644 --- a/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerPutSingleFileWithRemotePathTest.java +++ b/components/camel-atmos/src/test/java/org/apache/camel/component/atmos/integration/producer/AtmosProducerPutSingleFileWithRemotePathTest.java @@ -23,7 +23,7 @@ import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.atmos.integration.AtmosTestSupport; -import org.apache.camel.component.atmos.util.AtmosResultHeader; +import org.apache.camel.component.atmos.util.AtmosConstants; import org.apache.camel.component.mock.MockEndpoint; import org.junit.jupiter.api.Test; @@ -49,7 +49,7 @@ public class AtmosProducerPutSingleFileWithRemotePathTest extends AtmosTestSuppo List<Exchange> exchanges = mock.getReceivedExchanges(); Exchange exchange = exchanges.get(0); - Object header = exchange.getIn().getHeader(AtmosResultHeader.UPLOADED_FILE.name()); + Object header = exchange.getIn().getHeader(AtmosConstants.UPLOADED_FILE); Object body = exchange.getIn().getBody(); assertNotNull(header); assertNotNull(body);
