public class AclSetuserArgs extends Object implements CompositeArgument
AclSetuserArgs
is a mutable object and instances should be used only once to avoid shared mutable state.
Modifier and Type | Class and Description |
---|---|
static class |
AclSetuserArgs.Builder
Builder entry points for
AclSetuserArgs . |
Constructor and Description |
---|
AclSetuserArgs() |
Modifier and Type | Method and Description |
---|---|
AclSetuserArgs |
addCategory(AclCategory category)
Adds all the commands in the specified category to the list of commands the user is able to execute.
|
AclSetuserArgs |
addCommand(CommandType command)
Adds this command to the list of the commands the user can call.
|
AclSetuserArgs |
addCommand(CommandType command,
ProtocolKeyword subCommand)
Adds all the commands there are in the server.
|
AclSetuserArgs |
addHashedPassword(String hashedPassword)
Adds the specified hashed password to the list of user passwords.
|
AclSetuserArgs |
addPassword(String password)
Adds the specified clear text password as an hashed password in the list of the users passwords.
|
AclSetuserArgs |
allChannels()
Allows the user to access all the Pub/Sub channels.
|
AclSetuserArgs |
allCommands()
Adds all the commands there are in the server.
|
AclSetuserArgs |
allKeys()
Allows the user to access all the keys.
|
<K,V> void |
build(CommandArgs<K,V> args)
Build command arguments and contribute arguments to
CommandArgs . |
AclSetuserArgs |
channelPattern(String channelPattern)
Adds accessible channel pattern.
|
AclSetuserArgs |
keyPattern(String keyPattern)
Adds accessible key pattern.
|
AclSetuserArgs |
noCommands()
Removes all the commands the user can execute.
|
AclSetuserArgs |
nopass()
Sets the user as a "no password".
|
AclSetuserArgs |
off()
Set user inactive.
|
AclSetuserArgs |
on()
Set user active.
|
AclSetuserArgs |
removeCategory(AclCategory category)
Removes all the commands in the specified category to the list of commands the user is able to execute.
|
AclSetuserArgs |
removeCommand(CommandType command)
Removes this command to the list of the commands the user can call.
|
AclSetuserArgs |
removeCommand(CommandType command,
ProtocolKeyword subCommand)
Removes the specified command to the list of the commands the user can execute.
|
AclSetuserArgs |
removeHashedPassword(String hashedPassword)
Removes the specified hashed password to the list of user passwords.
|
AclSetuserArgs |
removePassword(String password)
Removes the specified clear text password as an hashed password in the list of the users passwords.
|
AclSetuserArgs |
reset()
Removes any capability from the user.
|
AclSetuserArgs |
resetChannels()
Removes all channel patterns from the list of Pub/Sub channel patterns the user can access.
|
AclSetuserArgs |
resetKeys()
Removes all the key patterns from the list of key patterns the user can access.
|
AclSetuserArgs |
resetpass()
Flushes the list of allowed passwords and removes the "no password" status.
|
public AclSetuserArgs on()
this
public AclSetuserArgs off()
this
public AclSetuserArgs keyPattern(String keyPattern)
keyPattern
- accessible key patternthis
public AclSetuserArgs allKeys()
this
public AclSetuserArgs resetKeys()
this
public AclSetuserArgs channelPattern(String channelPattern)
channelPattern
- accessible channel patternthis
public AclSetuserArgs allChannels()
this
public AclSetuserArgs resetChannels()
this
public AclSetuserArgs addCommand(CommandType command)
command
- accessible commandthis
public AclSetuserArgs addCommand(CommandType command, ProtocolKeyword subCommand)
this
public AclSetuserArgs allCommands()
this
public AclSetuserArgs removeCommand(CommandType command)
command
- inaccessible commandthis
public AclSetuserArgs removeCommand(CommandType command, ProtocolKeyword subCommand)
command
- inaccessible commandsubCommand
- inaccessible subcommandthis
public AclSetuserArgs noCommands()
this
public AclSetuserArgs addCategory(AclCategory category)
category
- specified categorythis
public AclSetuserArgs removeCategory(AclCategory category)
category
- specified categorythis
public AclSetuserArgs nopass()
this
public AclSetuserArgs resetpass()
nopass()
later).this
public AclSetuserArgs addPassword(String password)
password
- clear text passwordthis
public AclSetuserArgs addHashedPassword(String hashedPassword)
hashedPassword
- hashed passwordthis
public AclSetuserArgs removePassword(String password)
password
- clear text passwordthis
public AclSetuserArgs removeHashedPassword(String hashedPassword)
hashedPassword
- hashed passwordthis
public AclSetuserArgs reset()
this
public <K,V> void build(CommandArgs<K,V> args)
CompositeArgument
CommandArgs
.
Implementing classes are required to implement this method. Depending on the command nature and configured arguments, this method may contribute arguments but is not required to add arguments if none are specified.
build
in interface CompositeArgument
K
- Key type.V
- Value type.args
- the command arguments, must not be null
.Copyright © 2023 lettuce.io. All rights reserved.