Skip to content

Commit

Permalink
remove deprecated API
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslansennov committed Dec 18, 2024
1 parent b3823ff commit 33ea673
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 334 deletions.
171 changes: 0 additions & 171 deletions src/main/java/io/vertx/ext/consul/AclToken.java

This file was deleted.

29 changes: 0 additions & 29 deletions src/main/java/io/vertx/ext/consul/Check.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public class Check {
private String serviceId;
private String serviceName;
private String node;
@Deprecated
private String nodeName;

/**
* Default constructor
Expand All @@ -58,7 +56,6 @@ public Check(Check other) {
this.output = other.output;
this.serviceId = other.serviceId;
this.serviceName = other.serviceName;
this.nodeName = other.nodeName;
this.node = other.node;
}

Expand Down Expand Up @@ -100,17 +97,6 @@ public String getName() {
return name;
}

/**
* Get the name of node.
* Deprecated since consul 1.11, renamed to 'node'. Use {@link #getNode()} instead
*
* @return name of node
*/
@Deprecated
public String getNodeName() {
return nodeName;
}

/**
* Get the name of node
*
Expand Down Expand Up @@ -242,19 +228,6 @@ public Check setServiceName(String serviceName) {
return this;
}

/**
* Set the name of node
* Deprecated since consul 1.11, renamed to 'node'. Use {@link #setNode(String)} ()} instead
*
* @param nodeName the name of node
* @return reference to this, for fluency
*/
@Deprecated
public Check setNodeName(String nodeName) {
this.nodeName = nodeName;
return this;
}

/**
* Set the name of node
*
Expand All @@ -280,7 +253,6 @@ public boolean equals(Object o) {
if (output != null ? !output.equals(check.output) : check.output != null) return false;
if (serviceId != null ? !serviceId.equals(check.serviceId) : check.serviceId != null) return false;
if (serviceName != null ? !serviceName.equals(check.serviceName) : check.serviceName != null) return false;
if (nodeName != null ? !nodeName.equals(check.nodeName) : check.nodeName != null) return false;
return node != null ? node.equals(check.node) : check.node == null;
}

Expand All @@ -293,7 +265,6 @@ public int hashCode() {
result = 31 * result + (output != null ? output.hashCode() : 0);
result = 31 * result + (serviceId != null ? serviceId.hashCode() : 0);
result = 31 * result + (serviceName != null ? serviceName.hashCode() : 0);
result = 31 * result + (nodeName != null ? nodeName.hashCode() : 0);
result = 31 * result + (node != null ? node.hashCode() : 0);
return result;
}
Expand Down
73 changes: 5 additions & 68 deletions src/main/java/io/vertx/ext/consul/ConsulClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.vertx.core.json.JsonObject;
import io.vertx.ext.consul.impl.ConsulClientImpl;
import io.vertx.ext.consul.policy.AclPolicy;
import io.vertx.ext.consul.token.AclToken;
import io.vertx.ext.consul.token.CloneAclTokenOptions;

import java.util.List;
Expand Down Expand Up @@ -228,7 +229,7 @@ static ConsulClient create(Vertx vertx, ConsulClientOptions options) {
/**
* This endpoint updates an existing ACL policy
*
* @param id uuid of existing policy
* @param id uuid of existing policy
* @param policy options that will be applied to the existing policy
* @return a future of AclPolicy
* @see <a href="https://developer.hashicorp.com/consul/api-docs/v1.11.x/acl/policies#update-a-policy">PUT /acl/policy/:id</a>
Expand Down Expand Up @@ -262,7 +263,7 @@ static ConsulClient create(Vertx vertx, ConsulClientOptions options) {
* {@link AclToken} secretId - using in {@link ConsulClientOptions#setAclToken(String)}.
* @see <a href="https://developer.hashicorp.com/consul/api-docs/v1.11.x/acl/tokens#create-a-token">/v1/acl/create</a> endpoint
*/
Future<io.vertx.ext.consul.token.AclToken> createAclToken(io.vertx.ext.consul.token.AclToken token);
Future<AclToken> createAclToken(AclToken token);

/**
* Update an existing Acl token
Expand All @@ -277,7 +278,7 @@ static ConsulClient create(Vertx vertx, ConsulClientOptions options) {
/**
* Clones an existing ACL token
*
* @param accessorId uuid of the token
* @param accessorId uuid of the token
* @param cloneAclTokenOptions properties of cloned token
* @return a future NewAclToken like in {@link #createAclToken(io.vertx.ext.consul.token.AclToken)}
* @see <a href="https://developer.hashicorp.com/consul/api-docs/v1.11.x/acl/tokens#clone-a-token">/acl/token/:accessorId/clone</a> endpoint
Expand All @@ -303,76 +304,12 @@ static ConsulClient create(Vertx vertx, ConsulClientOptions options) {

/**
* Deletes an ACL token
*
* @param accessorId uuid of token
* @return a future boolean value: true or false, indicating whether the deletion was successful.
*/
Future<Boolean> deleteAclToken(String accessorId);

/**
* Legacy create new Acl token
*
* @param token properties of the token
* @return a future provided with ID of created token
* @see <a href="https://www.consul.io/api/acl.html#create-acl-token">/v1/acl/create</a> endpoint
* @deprecated Use {@link #createAclToken(io.vertx.ext.consul.token.AclToken)} instead
*/
@Deprecated
Future<String> createAclToken(AclToken token);

/**
* Update Acl token
*
* @param token properties of the token to be updated
* @return a future provided with ID of updated
* @see <a href="https://www.consul.io/api/acl.html#update-acl-token">/v1/acl/update</a> endpoint
* @deprecated Use {@link #updateAclToken(String, io.vertx.ext.consul.token.AclToken)} instead
*/
@Deprecated
Future<String> updateAclToken(AclToken token);

/**
* Clone Acl token
*
* @param id the ID of token to be cloned
* @return a future provided with ID of cloned token
* @see <a href="https://www.consul.io/api/acl.html#clone-acl-token">/v1/acl/clone/:uuid</a> endpoint
* @deprecated Use {@link #cloneAclToken(String, CloneAclTokenOptions)} instead
*/
@Deprecated
Future<String> cloneAclToken(String id);

/**
* Get list of Acl token
*
* @return a future provided with list of tokens
* @see <a href="https://www.consul.io/api/acl.html#list-acls">/v1/acl/list</a> endpoint
* @deprecated Use {@link #getAclTokens()} instead
*/
@Deprecated
Future<List<AclToken>> listAclTokens();

/**
* Get info of Acl token
*
* @param id the ID of token
* @return a future provided with token
* @see <a href="https://www.consul.io/api/acl.html#read-acl-token">/v1/acl/info/:uuid</a> endpoint
* @deprecated Use {@link #readAclToken(String)} instead
*/
@Deprecated
Future<AclToken> infoAclToken(String id);

/**
* Destroy Acl token
*
* @param id the ID of token
* @return a future notified on complete
* @see <a href="https://www.consul.io/api/acl.html#delete-acl-token">/v1/acl/destroy/:uuid</a> endpoint
* @deprecated Use {@link #deleteAclToken(String)} instead
*/
@Deprecated
Future<Void> destroyAclToken(String id);

/**
* Fires a new user event
*
Expand Down
Loading

0 comments on commit 33ea673

Please sign in to comment.