Class RegexNameRewriter
java.lang.Object
org.wildfly.security.auth.util.RegexNameRewriter
- All Implemented Interfaces:
org.wildfly.security.auth.server.NameRewriter
public final class RegexNameRewriter
extends Object
implements org.wildfly.security.auth.server.NameRewriter
A simple regular expression-based name rewriter.
-
Field Summary
Fields inherited from interface org.wildfly.security.auth.server.NameRewriter
IDENTITY_REWRITER -
Constructor Summary
ConstructorsConstructorDescriptionRegexNameRewriter(Pattern pattern, String replacement, boolean replaceAll) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionGet the pattern.Get the replacement string.rewriteName(String original) Rewrite a name.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.security.auth.server.NameRewriter
asPrincipalRewriter
-
Constructor Details
-
RegexNameRewriter
Construct a new instance.- Parameters:
pattern- the substitution pattern (must not benull)replacement- the replacement stringreplaceAll-trueto replace all occurrences of the pattern;falseto replace only the first occurrence
-
-
Method Details
-
rewriteName
-
getPattern
-
getReplacement
-