Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into use-high-level-azur…
Browse files Browse the repository at this point in the history
…e-service-bus-client
  • Loading branch information
dylanpiergies committed Apr 24, 2024
2 parents 00239e9 + af40039 commit 3086054
Show file tree
Hide file tree
Showing 2,569 changed files with 7,754 additions and 7,928 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"drive-changes": { "consumerOnly": false, "producerOnly": false, "description": "The changes collection of methods", "methods": { "list": { "description": "Lists the changes for a user or shared drive", "signatures": [ "com.google.api.services.drive.Drive$Changes$List list(String pageToken)" ] }, "watch": { "description": "Subscribes to changes for a user", "signatures": [ "com.google.api.services.drive.Drive$Changes$Watch watch(String pageToken, com.google.api.services.drive.model.Channel content)" ] } } },
"drive-channels": { "consumerOnly": false, "producerOnly": false, "description": "The channels collection of methods", "methods": { "stop": { "description": "Stops watching resources through this channel", "signatures": [ "com.google.api.services.drive.Drive$Channels$Stop stop(com.google.api.services.drive.model.Channel content)" ] } } },
"drive-comments": { "consumerOnly": false, "producerOnly": false, "description": "The comments collection of methods", "methods": { "create": { "description": "Creates a comment on a file", "signatures": [ "com.google.api.services.drive.Drive$Comments$Create create(String fileId, com.google.api.services.drive.model.Comment content)" ] }, "delete": { "description": "Deletes a comment", "signatures": [ "com.google.api.services.drive.Drive$Comments$Delete delete(String fileId, String commentId)" ] }, "get": { "description": "Gets a comment by ID", "signatures": [ "com.google.api.services.drive.Drive$Comments$Get get(String fileId, String commentId)" ] }, "list": { "description": "Lists a file's comments", "signatures": [ "com.google.api.services.drive.Drive$Comments$List list(String fileId)" ] }, "update": { "description": "Updates a comment with patch semantics", "signatures": [ "com.google.api.services.drive.Drive$Comments$Update update(String fileId, String commentId, com.google.api.services.drive.model.Comment content)" ] } } },
"drive-drives": { "consumerOnly": false, "producerOnly": false, "description": "The drives collection of methods", "methods": { "create": { "description": "Creates a shared drive", "signatures": [ "com.google.api.services.drive.Drive$Drives$Create create(String requestId, com.google.api.services.drive.model.Drive content)" ] }, "delete": { "description": "Permanently deletes a shared drive for which the user is an organizer", "signatures": [ "com.google.api.services.drive.Drive$Drives$Delete delete(String driveId)" ] }, "get": { "description": "Gets a shared drive's metadata by ID", "signatures": [ "com.google.api.services.drive.Drive$Drives$Get get(String driveId)" ] }, "hide": { "description": "Hides a shared drive from the default view", "signatures": [ "com.google.api.services.drive.Drive$Drives$Hide hide(String driveId)" ] }, "unhide": { "description": "Restores a shared drive to the default view", "signatures": [ "com.google.api.services.drive.Drive$Drives$Unhide unhide(String driveId)" ] }, "update": { "description": "Updates the metadate for a shared drive", "signatures": [ "com.google.api.services.drive.Drive$Drives$Update update(String driveId, com.google.api.services.drive.model.Drive content)" ] } } },
"drive-drives": { "consumerOnly": false, "producerOnly": false, "description": "The drives collection of methods", "methods": { "create": { "description": "Creates a shared drive", "signatures": [ "com.google.api.services.drive.Drive$Drives$Create create(String requestId, com.google.api.services.drive.model.Drive content)" ] }, "delete": { "description": "Permanently deletes a shared drive for which the user is an organizer", "signatures": [ "com.google.api.services.drive.Drive$Drives$Delete delete(String driveId)" ] }, "get": { "description": "Gets a shared drive's metadata by ID", "signatures": [ "com.google.api.services.drive.Drive$Drives$Get get(String driveId)" ] }, "hide": { "description": "Hides a shared drive from the default view", "signatures": [ "com.google.api.services.drive.Drive$Drives$Hide hide(String driveId)" ] }, "unhide": { "description": "Restores a shared drive to the default view", "signatures": [ "com.google.api.services.drive.Drive$Drives$Unhide unhide(String driveId)" ] }, "update": { "description": "Updates the metadata for a shared drive", "signatures": [ "com.google.api.services.drive.Drive$Drives$Update update(String driveId, com.google.api.services.drive.model.Drive content)" ] } } },
"drive-files": { "consumerOnly": false, "producerOnly": false, "description": "The files collection of methods", "methods": { "copy": { "description": "Creates a copy of a file and applies any requested updates with patch semantics", "signatures": [ "com.google.api.services.drive.Drive$Files$Copy copy(String fileId, com.google.api.services.drive.model.File content)" ] }, "create": { "description": "Creates a new file", "signatures": [ "com.google.api.services.drive.Drive$Files$Create create(com.google.api.services.drive.model.File content)", "com.google.api.services.drive.Drive$Files$Create create(com.google.api.services.drive.model.File content, com.google.api.client.http.AbstractInputStreamContent mediaContent)" ] }, "delete": { "description": "Permanently deletes a file owned by the user without moving it to the trash", "signatures": [ "com.google.api.services.drive.Drive$Files$Delete delete(String fileId)" ] }, "export": { "description": "Exports a Google Workspace document to the requested MIME type and returns exported byte content", "signatures": [ "com.google.api.services.drive.Drive$Files$Export export(String fileId, String mimeType)" ] }, "get": { "description": "Gets a file's metadata or content by ID", "signatures": [ "com.google.api.services.drive.Drive$Files$Get get(String fileId)" ] }, "listLabels": { "description": "Lists the labels on a file", "signatures": [ "com.google.api.services.drive.Drive$Files$ListLabels listLabels(String fileId)" ] }, "modifyLabels": { "description": "Modifies the set of labels applied to a file", "signatures": [ "com.google.api.services.drive.Drive$Files$ModifyLabels modifyLabels(String fileId, com.google.api.services.drive.model.ModifyLabelsRequest content)" ] }, "update": { "description": "Updates a file's metadata and\/or content", "signatures": [ "com.google.api.services.drive.Drive$Files$Update update(String fileId, com.google.api.services.drive.model.File content)", "com.google.api.services.drive.Drive$Files$Update update(String fileId, com.google.api.services.drive.model.File content, com.google.api.client.http.AbstractInputStreamContent mediaContent)" ] }, "watch": { "description": "Subscribes to changes to a file", "signatures": [ "com.google.api.services.drive.Drive$Files$Watch watch(String fileId, com.google.api.services.drive.model.Channel content)" ] } } },
"drive-permissions": { "consumerOnly": false, "producerOnly": false, "description": "The permissions collection of methods", "methods": { "create": { "description": "Creates a permission for a file or shared drive", "signatures": [ "com.google.api.services.drive.Drive$Permissions$Create create(String fileId, com.google.api.services.drive.model.Permission content)" ] }, "delete": { "description": "Deletes a permission", "signatures": [ "com.google.api.services.drive.Drive$Permissions$Delete delete(String fileId, String permissionId)" ] }, "get": { "description": "Gets a permission by ID", "signatures": [ "com.google.api.services.drive.Drive$Permissions$Get get(String fileId, String permissionId)" ] }, "list": { "description": "Lists a file's or shared drive's permissions", "signatures": [ "com.google.api.services.drive.Drive$Permissions$List list(String fileId)" ] }, "update": { "description": "Updates a permission with patch semantics", "signatures": [ "com.google.api.services.drive.Drive$Permissions$Update update(String fileId, String permissionId, com.google.api.services.drive.model.Permission content)" ] } } },
"drive-replies": { "consumerOnly": false, "producerOnly": false, "description": "The replies collection of methods", "methods": { "create": { "description": "Creates a reply to a comment", "signatures": [ "com.google.api.services.drive.Drive$Replies$Create create(String fileId, String commentId, com.google.api.services.drive.model.Reply content)" ] }, "delete": { "description": "Deletes a reply", "signatures": [ "com.google.api.services.drive.Drive$Replies$Delete delete(String fileId, String commentId, String replyId)" ] }, "get": { "description": "Gets a reply by ID", "signatures": [ "com.google.api.services.drive.Drive$Replies$Get get(String fileId, String commentId, String replyId)" ] }, "list": { "description": "Lists a comment's replies", "signatures": [ "com.google.api.services.drive.Drive$Replies$List list(String fileId, String commentId)" ] }, "update": { "description": "Updates a reply with patch semantics", "signatures": [ "com.google.api.services.drive.Drive$Replies$Update update(String fileId, String commentId, String replyId, com.google.api.services.drive.model.Reply content)" ] } } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ azure-servicebus-application-cloudevents
azure-storage-blob-application-cloudevents
azure-storage-datalake-application-cloudevents
azure-storage-queue-application-cloudevents
google-calendar-stream-application-cloudevents
google-mail-stream-application-cloudevents
google-pubsub-application-cloudevents
google-sheets-application-x-struct
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"transformer": {
"kind": "transformer",
"name": "google-calendar-stream:application-cloudevents",
"title": "Google Calendar Stream (Application Cloudevents)",
"description": "Adds CloudEvent headers to the Camel message with Google Calendar Stream consumer response details",
"deprecated": false,
"javaType": "org.apache.camel.component.google.calendar.transform.GoogleCalendarStreamCloudEventDataTypeTransformer",
"groupId": "org.apache.camel",
"artifactId": "camel-google-calendar",
"version": "4.6.0-SNAPSHOT"
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Stream;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -39,6 +40,9 @@
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -55,6 +59,14 @@ public class CamelCatalogTest {

private static final Logger LOG = LoggerFactory.getLogger(CamelCatalogTest.class);

private static Stream<Arguments> properties() {
return Stream.of(
Arguments.of("netty-http:http://localhost:8080/foo/bar?disconnect=true&keepAlive=false", "localhost", "8080"),
Arguments.of("netty-http:http://{{myhost}}:{{myport}}/foo/bar?disconnect=true&keepAlive=false", "{{myhost}}",
"{{myport}}"),
Arguments.of("netty-http:http://localhost:8080/foo/bar?disconnect=true&keepAlive=false", "localhost", "8080"));
}

@BeforeAll
public static void createCamelCatalog() {
catalog = new DefaultCamelCatalog();
Expand Down Expand Up @@ -429,16 +441,17 @@ public void testEndpointPropertiesPlaceholders() throws Exception {
assertEquals("5", map.get("repeatCount"));
}

@Test
public void testEndpointPropertiesNettyHttp() throws Exception {
@ParameterizedTest
@MethodSource("properties")
public void testEndpointPropertiesNettyHttp(String endpoint, String host, String port) throws Exception {
Map<String, String> map
= catalog.endpointProperties("netty-http:http://localhost:8080/foo/bar?disconnect=true&keepAlive=false");
= catalog.endpointProperties(endpoint);
assertNotNull(map);
assertEquals(6, map.size());

assertEquals("http", map.get("protocol"));
assertEquals("localhost", map.get("host"));
assertEquals("8080", map.get("port"));
assertEquals(host, map.get("host"));
assertEquals(port, map.get("port"));
assertEquals("foo/bar", map.get("path"));
assertEquals("true", map.get("disconnect"));
assertEquals("false", map.get("keepAlive"));
Expand All @@ -458,36 +471,6 @@ public void testEndpointPropertiesNettyHttpDefaultPort() throws Exception {
assertEquals("false", map.get("keepAlive"));
}

@Test
public void testEndpointPropertiesNettyHttpPlaceholder() throws Exception {
Map<String, String> map
= catalog.endpointProperties("netty-http:http://{{myhost}}:{{myport}}/foo/bar?disconnect=true&keepAlive=false");
assertNotNull(map);
assertEquals(6, map.size());

assertEquals("http", map.get("protocol"));
assertEquals("{{myhost}}", map.get("host"));
assertEquals("{{myport}}", map.get("port"));
assertEquals("foo/bar", map.get("path"));
assertEquals("true", map.get("disconnect"));
assertEquals("false", map.get("keepAlive"));
}

@Test
public void testEndpointPropertiesNettyHttpWithDoubleSlash() throws Exception {
Map<String, String> map
= catalog.endpointProperties("netty-http:http://localhost:8080/foo/bar?disconnect=true&keepAlive=false");
assertNotNull(map);
assertEquals(6, map.size());

assertEquals("http", map.get("protocol"));
assertEquals("localhost", map.get("host"));
assertEquals("8080", map.get("port"));
assertEquals("foo/bar", map.get("path"));
assertEquals("true", map.get("disconnect"));
assertEquals("false", map.get("keepAlive"));
}

@Test
public void testAsEndpointUriLog() throws Exception {
Map<String, String> map = new HashMap<>();
Expand Down
Loading

0 comments on commit 3086054

Please sign in to comment.