Package org.wildfly.security.auth.util
Class MutableNameRewriter
- java.lang.Object
-
- org.wildfly.security.auth.util.MutableNameRewriter
-
- All Implemented Interfaces:
NameRewriter
public final class MutableNameRewriter extends Object implements NameRewriter
A delegating name rewriter with a mutable delegation target.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description private NameRewriter
target
-
Fields inherited from interface org.wildfly.security.auth.server.NameRewriter
IDENTITY_REWRITER
-
-
Constructor Summary
Constructors Constructor Description MutableNameRewriter()
Construct a new instance with the identity rewriter.MutableNameRewriter(NameRewriter target)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
rewriteName(String original)
Rewrite a name.void
setTarget(NameRewriter target)
Set the target rewriter.-
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
-
-
-
-
Field Detail
-
target
private volatile NameRewriter target
-
-
Constructor Detail
-
MutableNameRewriter
public MutableNameRewriter(NameRewriter target)
Construct a new instance.- Parameters:
target
- the target rewriter (notnull
)
-
MutableNameRewriter
public MutableNameRewriter()
Construct a new instance with the identity rewriter.
-
-
Method Detail
-
rewriteName
public String rewriteName(String original)
Description copied from interface:NameRewriter
Rewrite a name. Must not returnnull
.- Specified by:
rewriteName
in interfaceNameRewriter
- Parameters:
original
- the original name (must not benull
)- Returns:
- the rewritten name, or
null
if the name is invalid
-
setTarget
public void setTarget(NameRewriter target)
Set the target rewriter.- Parameters:
target
- the target rewriter (notnull
)
-
-