From 876e9e3860df136bf02cabbc576b08f5d1598960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Tue, 26 Sep 2023 16:08:28 -0600 Subject: [PATCH] Deprecate utility methods in RabbitMQ module --- .../containers/RabbitMQContainer.java | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/modules/rabbitmq/src/main/java/org/testcontainers/containers/RabbitMQContainer.java b/modules/rabbitmq/src/main/java/org/testcontainers/containers/RabbitMQContainer.java index 6c1fa919316..bac998b85ac 100644 --- a/modules/rabbitmq/src/main/java/org/testcontainers/containers/RabbitMQContainer.java +++ b/modules/rabbitmq/src/main/java/org/testcontainers/containers/RabbitMQContainer.java @@ -216,6 +216,10 @@ public RabbitMQContainer withSSL( .withCopyFileToContainer(keyFile, "/etc/rabbitmq/rabbitmq_key.pem"); } + /** + * @deprecated use {@link #execInContainer(String...)} instead + */ + @Deprecated public RabbitMQContainer withPluginsEnabled(String... pluginNames) { List command = new ArrayList<>(Arrays.asList("rabbitmq-plugins", "enable")); command.addAll(Arrays.asList(pluginNames)); @@ -223,6 +227,10 @@ public RabbitMQContainer withPluginsEnabled(String... pluginNames) { return self(); } + /** + * @deprecated use {@link #execInContainer(String...)} instead + */ + @Deprecated public RabbitMQContainer withBinding(String source, String destination) { values.add( Arrays.asList("rabbitmqadmin", "declare", "binding", "source=" + source, "destination=" + destination) @@ -230,6 +238,10 @@ public RabbitMQContainer withBinding(String source, String destination) { return self(); } + /** + * @deprecated use {@link #execInContainer(String...)} instead + */ + @Deprecated public RabbitMQContainer withBinding(String vhost, String source, String destination) { values.add( Arrays.asList( @@ -244,6 +256,10 @@ public RabbitMQContainer withBinding(String vhost, String source, String destina return self(); } + /** + * @deprecated use {@link #execInContainer(String...)} instead + */ + @Deprecated public RabbitMQContainer withBinding( String source, String destination, @@ -266,6 +282,10 @@ public RabbitMQContainer withBinding( return self(); } + /** + * @deprecated use {@link #execInContainer(String...)} instead + */ + @Deprecated public RabbitMQContainer withBinding( String vhost, String source, @@ -290,6 +310,10 @@ public RabbitMQContainer withBinding( return self(); } + /** + * @deprecated use {@link #execInContainer(String...)} instead + */ + @Deprecated public RabbitMQContainer withParameter(String component, String name, String value) { values.add( Arrays.asList( @@ -304,6 +328,10 @@ public RabbitMQContainer withParameter(String component, String name, String val return self(); } + /** + * @deprecated use {@link #execInContainer(String...)} instead + */ + @Deprecated public RabbitMQContainer withPermission(String vhost, String user, String configure, String write, String read) { values.add( Arrays.asList( @@ -320,11 +348,19 @@ public RabbitMQContainer withPermission(String vhost, String user, String config return self(); } + /** + * @deprecated use {@link #execInContainer(String...)} instead + */ + @Deprecated public RabbitMQContainer withUser(String name, String password) { values.add(Arrays.asList("rabbitmqadmin", "declare", "user", "name=" + name, "password=" + password, "tags=")); return self(); } + /** + * @deprecated use {@link #execInContainer(String...)} instead + */ + @Deprecated public RabbitMQContainer withUser(String name, String password, Set tags) { values.add( Arrays.asList( @@ -339,6 +375,10 @@ public RabbitMQContainer withUser(String name, String password, Set tags return self(); } + /** + * @deprecated use {@link #execInContainer(String...)} instead + */ + @Deprecated public RabbitMQContainer withPolicy(String name, String pattern, Map definition) { values.add( Arrays.asList( @@ -353,6 +393,10 @@ public RabbitMQContainer withPolicy(String name, String pattern, Map definition) { values.add( Arrays.asList( @@ -368,6 +412,10 @@ public RabbitMQContainer withPolicy(String vhost, String name, String pattern, M return self(); } + /** + * @deprecated use {@link #execInContainer(String...)} instead + */ + @Deprecated public RabbitMQContainer withPolicy( String name, String pattern, @@ -390,6 +438,10 @@ public RabbitMQContainer withPolicy( return self(); } + /** + * @deprecated use {@link #execInContainer(String...)} instead + */ + @Deprecated public RabbitMQContainer withOperatorPolicy(String name, String pattern, Map definition) { values.add( new ArrayList<>( @@ -406,6 +458,10 @@ public RabbitMQContainer withOperatorPolicy(String name, String pattern, Map