org.apache.cassandra.auth

## Class RoleOptions

- java.lang.Object
- - org.apache.cassandra.auth.RoleOptions

-     public class RoleOptions
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RoleOptions()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.common.base.Optional<java.util.Map<java.lang.String,java.lang.String>>` | `getCustomOptions()` Return a `Map<String, String>` representing custom options It is the responsiblity of IRoleManager implementations which support IRoleManager.Option.OPTION to handle type checking and conversion of these values, if present
    `com.google.common.base.Optional<java.lang.Boolean>` | `getLogin()` Return a boolean value of the login option
    `java.util.Map<IRoleManager.Option,java.lang.Object>` | `getOptions()` Return a map of all the options which have been set
    `com.google.common.base.Optional<java.lang.String>` | `getPassword()` Return the string value of the password option
    `com.google.common.base.Optional<java.lang.Boolean>` | `getSuperuser()` Return a boolean value of the superuser option
    `boolean` | `isEmpty()` Return true if there are no options with values set, false otherwise
    `void` | `setOption(IRoleManager.Option option, java.lang.Object value)` Set a value for a specific option.
    `java.lang.String` | `toString()`
    `void` | `validate()` Validate the contents of the options in two ways: - Ensure that only a subset of the options supported by the configured IRoleManager are set - Validate the type of any option values present.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### RoleOptions

          public RoleOptions()

  - ### Method Detail

    - #### setOption

          public void setOption(IRoleManager.Option option,
                                java.lang.Object value)

      Set a value for a specific option. Throws SyntaxException if the same option is set multiple times
      Parameters:
        `option` -
        `value` -

    - #### isEmpty

          public boolean isEmpty()

      Return true if there are no options with values set, false otherwise
      Returns:
        whether any options have values set or not

    - #### getOptions

          public java.util.Map<IRoleManager.Option,java.lang.Object> getOptions()

      Return a map of all the options which have been set
      Returns:
        all options with values

    - #### getSuperuser

          public com.google.common.base.Optional<java.lang.Boolean> getSuperuser()

      Return a boolean value of the superuser option
      Returns:
        superuser option value

    - #### getLogin

          public com.google.common.base.Optional<java.lang.Boolean> getLogin()

      Return a boolean value of the login option
      Returns:
        login option value

    - #### getPassword

          public com.google.common.base.Optional<java.lang.String> getPassword()

      Return the string value of the password option
      Returns:
        password option value

    - #### getCustomOptions

          public com.google.common.base.Optional<java.util.Map<java.lang.String,java.lang.String>> getCustomOptions()

      Return a `Map<String, String>` representing custom options It is the responsiblity of IRoleManager implementations which support IRoleManager.Option.OPTION to handle type checking and conversion of these values, if present
      Returns:
        map of custom options

    - #### validate

          public void validate()

      Validate the contents of the options in two ways: - Ensure that only a subset of the options supported by the configured IRoleManager are set - Validate the type of any option values present. Should either condition fail, then InvalidRequestException is thrown. This method is called during validation of CQL statements, so the IRE results in a error response to the client.
      Throws:
        `InvalidRequestException` - if any options which are not supported by the configured IRoleManager are set or if any option value is of an incorrect type.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2018 The Apache Software Foundation