Module org.elasticsearch.xcore
Class SetEnabledRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.AbstractTransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.LegacyActionRequest
org.elasticsearch.xpack.core.security.action.user.SetEnabledRequest
- All Implemented Interfaces:
WriteRequest<SetEnabledRequest>,Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest,TransportRequest,UserRequest
public class SetEnabledRequest
extends LegacyActionRequest
implements UserRequest, WriteRequest<SetEnabledRequest>
The request that allows to set a user as enabled or disabled
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>Nested classes/interfaces inherited from interface org.elasticsearch.action.support.WriteRequest
WriteRequest.RefreshPolicy -
Field Summary
Fields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionenabled()voidenabled(boolean enabled) Set whether the user should be enabled or not.Should this request trigger a refresh (WriteRequest.RefreshPolicy.IMMEDIATE, the default), wait for a refresh ( WriteRequest.RefreshPolicy.WAIT_UNTIL), or proceed ignore refreshes entirely (WriteRequest.RefreshPolicy.NONE).setRefreshPolicy(WriteRequest.RefreshPolicy refreshPolicy) username()voidSet the username that the request applies to.String[]Accessor for the usernames that this request pertains to.validate()voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.AbstractTransportRequest
getParentTask, getRequestId, remoteAddress, remoteAddress, setParentTask, setRequestId, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
decRef, hasReferences, incRef, mustIncRef, tryIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, createTask, getDescription, setParentTaskMethods inherited from interface org.elasticsearch.action.support.WriteRequest
setRefreshPolicy
-
Constructor Details
-
SetEnabledRequest
public SetEnabledRequest() -
SetEnabledRequest
- Throws:
IOException
-
-
Method Details
-
validate
- Specified by:
validatein interfaceWriteRequest<SetEnabledRequest>- Specified by:
validatein classActionRequest
-
enabled
- Returns:
- whether the user should be set to enabled or not
-
enabled
public void enabled(boolean enabled) Set whether the user should be enabled or not. -
username
- Returns:
- the username that this request applies to.
-
username
Set the username that the request applies to. Must not benull -
usernames
Description copied from interface:UserRequestAccessor for the usernames that this request pertains to.nullshould never be returned!- Specified by:
usernamesin interfaceUserRequest
-
getRefreshPolicy
Should this request trigger a refresh (WriteRequest.RefreshPolicy.IMMEDIATE, the default), wait for a refresh ( WriteRequest.RefreshPolicy.WAIT_UNTIL), or proceed ignore refreshes entirely (WriteRequest.RefreshPolicy.NONE).- Specified by:
getRefreshPolicyin interfaceWriteRequest<SetEnabledRequest>
-
setRefreshPolicy
- Specified by:
setRefreshPolicyin interfaceWriteRequest<SetEnabledRequest>
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classActionRequest- Throws:
IOException
-