Remove generics from ActionRequest
x-plugins side of elastic/elasticsearchelastic/elasticsearch#21556 Original commit: elastic/x-pack-elasticsearch@a8e8873c84
This commit is contained in:
parent
23e6cab7f1
commit
f2c4d1f4da
|
@ -39,7 +39,7 @@ public class Licensing implements ActionPlugin {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ActionHandler<? extends ActionRequest<?>, ? extends ActionResponse>> getActions() {
|
||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
||||
if (isTribeNode) {
|
||||
return emptyList();
|
||||
}
|
||||
|
|
|
@ -357,8 +357,8 @@ public class XPackPlugin extends Plugin implements ScriptPlugin, ActionPlugin, I
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ActionHandler<? extends ActionRequest<?>, ? extends ActionResponse>> getActions() {
|
||||
List<ActionHandler<? extends ActionRequest<?>, ? extends ActionResponse>> actions = new ArrayList<>();
|
||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
||||
List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> actions = new ArrayList<>();
|
||||
actions.add(new ActionHandler<>(XPackInfoAction.INSTANCE, TransportXPackInfoAction.class));
|
||||
actions.add(new ActionHandler<>(XPackUsageAction.INSTANCE, TransportXPackUsageAction.class));
|
||||
actions.addAll(licensing.getActions());
|
||||
|
|
|
@ -14,7 +14,7 @@ import java.io.IOException;
|
|||
import java.util.EnumSet;
|
||||
import java.util.Locale;
|
||||
|
||||
public class XPackInfoRequest extends ActionRequest<XPackInfoRequest> {
|
||||
public class XPackInfoRequest extends ActionRequest {
|
||||
|
||||
public enum Category {
|
||||
BUILD, LICENSE, FEATURES;
|
||||
|
|
|
@ -42,7 +42,7 @@ public class Graph extends Plugin implements ActionPlugin {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ActionHandler<? extends ActionRequest<?>, ? extends ActionResponse>> getActions() {
|
||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
||||
if (false == enabled) {
|
||||
return emptyList();
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.util.List;
|
|||
* Holds the criteria required to guide the exploration of connected terms which
|
||||
* can be returned as a graph.
|
||||
*/
|
||||
public class GraphExploreRequest extends ActionRequest<GraphExploreRequest> implements IndicesRequest.Replaceable {
|
||||
public class GraphExploreRequest extends ActionRequest implements IndicesRequest.Replaceable {
|
||||
|
||||
public static final String NO_HOPS_ERROR_MESSAGE = "Graph explore request must have at least one hop";
|
||||
public static final String NO_VERTICES_ERROR_MESSAGE = "Graph explore hop must have at least one VertexRequest";
|
||||
|
|
|
@ -125,7 +125,7 @@ public class Monitoring implements ActionPlugin {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ActionHandler<? extends ActionRequest<?>, ? extends ActionResponse>> getActions() {
|
||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
||||
if (false == enabled || tribeNode) {
|
||||
return emptyList();
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
* type and id of the final document to be indexed. A {@link MonitoringBulkDoc} can also hold its own index/type/id values but there's no
|
||||
* guarantee that these information will be effectively used.
|
||||
*/
|
||||
public class MonitoringBulkRequest extends ActionRequest<MonitoringBulkRequest> {
|
||||
public class MonitoringBulkRequest extends ActionRequest {
|
||||
|
||||
final List<MonitoringBulkDoc> docs = new ArrayList<>();
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class InternalClient extends FilterClient {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected <Request extends ActionRequest<Request>, Response extends ActionResponse, RequestBuilder extends
|
||||
protected <Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends
|
||||
ActionRequestBuilder<Request, Response, RequestBuilder>> void doExecute(
|
||||
Action<Request, Response, RequestBuilder> action, Request request, ActionListener<Response> listener) {
|
||||
|
||||
|
|
|
@ -469,7 +469,7 @@ public class Security implements ActionPlugin, IngestPlugin, NetworkPlugin {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ActionHandler<? extends ActionRequest<?>, ? extends ActionResponse>> getActions() {
|
||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
||||
if (enabled == false) {
|
||||
return emptyList();
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* A request delete a role from the security index
|
||||
*/
|
||||
public class DeleteRoleRequest extends ActionRequest<DeleteRoleRequest> implements WriteRequest<DeleteRoleRequest> {
|
||||
public class DeleteRoleRequest extends ActionRequest implements WriteRequest<DeleteRoleRequest> {
|
||||
|
||||
private String name;
|
||||
private RefreshPolicy refreshPolicy = RefreshPolicy.IMMEDIATE;
|
||||
|
|
|
@ -18,7 +18,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* Request to retrieve roles from the security index
|
||||
*/
|
||||
public class GetRolesRequest extends ActionRequest<GetRolesRequest> {
|
||||
public class GetRolesRequest extends ActionRequest {
|
||||
|
||||
private String[] names = Strings.EMPTY_ARRAY;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* Request object for adding a role to the security index
|
||||
*/
|
||||
public class PutRoleRequest extends ActionRequest<PutRoleRequest> implements WriteRequest<PutRoleRequest> {
|
||||
public class PutRoleRequest extends ActionRequest implements WriteRequest<PutRoleRequest> {
|
||||
|
||||
private String name;
|
||||
private String[] clusterPrivileges = Strings.EMPTY_ARRAY;
|
||||
|
|
|
@ -15,7 +15,7 @@ import java.io.IOException;
|
|||
|
||||
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
||||
|
||||
public class AuthenticateRequest extends ActionRequest<AuthenticateRequest> implements UserRequest {
|
||||
public class AuthenticateRequest extends ActionRequest implements UserRequest {
|
||||
|
||||
private String username;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* Request to change a user's password.
|
||||
*/
|
||||
public class ChangePasswordRequest extends ActionRequest<ChangePasswordRequest>
|
||||
public class ChangePasswordRequest extends ActionRequest
|
||||
implements UserRequest, WriteRequest<ChangePasswordRequest> {
|
||||
|
||||
private String username;
|
||||
|
|
|
@ -18,7 +18,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* A request to delete a native user.
|
||||
*/
|
||||
public class DeleteUserRequest extends ActionRequest<DeleteUserRequest> implements UserRequest, WriteRequest<DeleteUserRequest> {
|
||||
public class DeleteUserRequest extends ActionRequest implements UserRequest, WriteRequest<DeleteUserRequest> {
|
||||
|
||||
private String username;
|
||||
private RefreshPolicy refreshPolicy = RefreshPolicy.IMMEDIATE;
|
||||
|
|
|
@ -18,7 +18,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* Request to retrieve a native user.
|
||||
*/
|
||||
public class GetUsersRequest extends ActionRequest<GetUsersRequest> implements UserRequest {
|
||||
public class GetUsersRequest extends ActionRequest implements UserRequest {
|
||||
|
||||
private String[] usernames;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* Request object to put a native user.
|
||||
*/
|
||||
public class PutUserRequest extends ActionRequest<PutUserRequest> implements UserRequest, WriteRequest<PutUserRequest> {
|
||||
public class PutUserRequest extends ActionRequest implements UserRequest, WriteRequest<PutUserRequest> {
|
||||
|
||||
private String username;
|
||||
private String[] roles;
|
||||
|
|
|
@ -21,7 +21,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* The request that allows to set a user as enabled or disabled
|
||||
*/
|
||||
public class SetEnabledRequest extends ActionRequest<SetEnabledRequest> implements UserRequest, WriteRequest<SetEnabledRequest> {
|
||||
public class SetEnabledRequest extends ActionRequest implements UserRequest, WriteRequest<SetEnabledRequest> {
|
||||
|
||||
private Boolean enabled;
|
||||
private String username;
|
||||
|
|
|
@ -395,7 +395,7 @@ public class SecurityIndexSearcherWrapper extends IndexSearcherWrapper {
|
|||
throws IOException {
|
||||
Client client = new FilterClient(original.getClient()) {
|
||||
@Override
|
||||
protected <Request extends ActionRequest<Request>, Response extends ActionResponse,
|
||||
protected <Request extends ActionRequest, Response extends ActionResponse,
|
||||
RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder>>
|
||||
void doExecute(Action<Request, Response, RequestBuilder> action, Request request, ActionListener<Response> listener) {
|
||||
throw new IllegalStateException("role queries are not allowed to execute additional requests");
|
||||
|
|
|
@ -395,7 +395,7 @@ public class Watcher implements ActionPlugin, ScriptPlugin {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ActionHandler<? extends ActionRequest<?>, ? extends ActionResponse>> getActions() {
|
||||
public List<ActionHandler<? extends ActionRequest, ? extends ActionResponse>> getActions() {
|
||||
if (false == enabled) {
|
||||
return emptyList();
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.elasticsearch.action;
|
|||
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
|
||||
public class MockIndicesRequest extends ActionRequest<MockIndicesRequest> implements IndicesRequest {
|
||||
public class MockIndicesRequest extends ActionRequest implements IndicesRequest {
|
||||
|
||||
private final String[] indices;
|
||||
private final IndicesOptions indicesOptions;
|
||||
|
|
|
@ -43,7 +43,7 @@ public class InternalClientTests extends ESTestCase {
|
|||
public void testContextIsPreserved() throws IOException, InterruptedException {
|
||||
FilterClient dummy = new FilterClient(Settings.EMPTY, threadPool, null) {
|
||||
@Override
|
||||
protected <Request extends ActionRequest<Request>, Response extends ActionResponse, RequestBuilder extends
|
||||
protected <Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends
|
||||
ActionRequestBuilder<Request, Response, RequestBuilder>> void doExecute(Action<Request, Response, RequestBuilder>
|
||||
action, Request request,
|
||||
ActionListener<Response> listener) {
|
||||
|
@ -96,7 +96,7 @@ public class InternalClientTests extends ESTestCase {
|
|||
public void testContextIsPreservedOnError() throws IOException, InterruptedException {
|
||||
FilterClient dummy = new FilterClient(Settings.EMPTY, threadPool, null) {
|
||||
@Override
|
||||
protected <Request extends ActionRequest<Request>, Response extends ActionResponse, RequestBuilder extends
|
||||
protected <Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends
|
||||
ActionRequestBuilder<Request, Response, RequestBuilder>> void doExecute(Action<Request, Response, RequestBuilder>
|
||||
action, Request request,
|
||||
ActionListener<Response> listener) {
|
||||
|
|
|
@ -73,7 +73,7 @@ public class SecurityTemplateServiceTests extends ESTestCase {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected <Request extends ActionRequest<Request>, Response extends ActionResponse, RequestBuilder extends
|
||||
protected <Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends
|
||||
ActionRequestBuilder<Request, Response, RequestBuilder>> void doExecute(
|
||||
Action<Request, Response, RequestBuilder> action, Request request
|
||||
, ActionListener<Response> listener) {
|
||||
|
|
|
@ -66,7 +66,7 @@ public class IndexAuditTrailMutedTests extends ESTestCase {
|
|||
super(Settings.EMPTY, null, transportClient, null);
|
||||
}
|
||||
@Override
|
||||
protected <Request extends ActionRequest<Request>, Response extends ActionResponse, RequestBuilder extends
|
||||
protected <Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends
|
||||
ActionRequestBuilder<Request, Response, RequestBuilder>> void doExecute(
|
||||
Action<Request, Response, RequestBuilder> action, Request request, ActionListener<Response> listener) {
|
||||
clientCalled.set(true);
|
||||
|
|
Loading…
Reference in New Issue