public class RoleOptions
extends java.lang.Object
Constructor and Description |
---|
RoleOptions() |
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.
|
public void setOption(IRoleManager.Option option, java.lang.Object value)
option
- value
- public boolean isEmpty()
public java.util.Map<IRoleManager.Option,java.lang.Object> getOptions()
public com.google.common.base.Optional<java.lang.Boolean> getSuperuser()
public com.google.common.base.Optional<java.lang.Boolean> getLogin()
public com.google.common.base.Optional<java.lang.String> getPassword()
public com.google.common.base.Optional<java.util.Map<java.lang.String,java.lang.String>> getCustomOptions()
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 presentpublic void validate()
InvalidRequestException
- if any options which are not supported by the configured IRoleManager
are set or if any option value is of an incorrect type.public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2009- The Apache Software Foundation