public class BasicUserNameMapper extends Object implements UserNameMapper
Constructor and Description |
---|
BasicUserNameMapper() |
Modifier and Type | Method and Description |
---|---|
@Nullable String |
getDefaultUserName()
Get default user name (optional).
|
@Nullable Map<String,String> |
getMappings()
Get mappings.
|
boolean |
isUseDefaultUserName()
Get whether to use default user name when there is no mapping for current user name.
|
@Nullable String |
map(String name)
Map user name.
|
void |
setDefaultUserName(@Nullable String dfltUsrName)
Set default user name (optional).
|
void |
setMappings(@Nullable Map<String,String> mappings)
Set mappings.
|
void |
setUseDefaultUserName(boolean useDfltUsrName)
Set whether to use default user name when there is no mapping for current user name.
|
String |
toString() |
@Nullable public @Nullable String map(String name)
map
in interface UserNameMapper
name
- User name.@Nullable public @Nullable Map<String,String> getMappings()
public void setMappings(@Nullable @Nullable Map<String,String> mappings)
mappings
- Mappings.public boolean isUseDefaultUserName()
public void setUseDefaultUserName(boolean useDfltUsrName)
useDfltUsrName
- Whether to use default user name.@Nullable public @Nullable String getDefaultUserName()
This user name will be used if provided mappings doesn't contain mapping for the given user name and
{#isUseDefaultUserName} is set to true
.
Defaults to null
.
public void setDefaultUserName(@Nullable @Nullable String dfltUsrName)
getDefaultUserName()
for more information.dfltUsrName
- Default user name.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019