Package org.wildfly.security.auth.util
Class CaseNameRewriter
- java.lang.Object
-
- org.wildfly.security.auth.util.CaseNameRewriter
-
- All Implemented Interfaces:
NameRewriter
public final class CaseNameRewriter extends Object implements NameRewriter
A case name rewriter adjusts a principal to upper or lower case.- Author:
- Sonia Zaldana Calles
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
upperCase
-
Fields inherited from interface org.wildfly.security.auth.server.NameRewriter
IDENTITY_REWRITER
-
-
Constructor Summary
Constructors Constructor Description CaseNameRewriter()
Construct a new instance which transforms to upper case.CaseNameRewriter(boolean upperCase)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
rewriteName(String original)
Rewrite a name.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.auth.server.NameRewriter
asPrincipalRewriter
-
-
-
-
Constructor Detail
-
CaseNameRewriter
public CaseNameRewriter()
Construct a new instance which transforms to upper case.
-
CaseNameRewriter
public CaseNameRewriter(boolean upperCase)
Construct a new instance.- Parameters:
upperCase
-true
if the principal should be converted to upper case,false
if the principal should be converted to lower case.
-
-
Method Detail
-
rewriteName
public String rewriteName(String original)
Rewrite a name.- Specified by:
rewriteName
in interfaceNameRewriter
- Parameters:
original
- the original name- Returns:
- the rewritten name
-
-