Class CaseNameRewriter

java.lang.Object
org.wildfly.security.auth.util.CaseNameRewriter
All Implemented Interfaces:
org.wildfly.security.auth.server.NameRewriter

public final class CaseNameRewriter extends Object implements org.wildfly.security.auth.server.NameRewriter
A case name rewriter adjusts a principal to upper or lower case.
Author:
Sonia Zaldana Calles
  • Field Summary

    Fields inherited from interface org.wildfly.security.auth.server.NameRewriter

    IDENTITY_REWRITER
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct a new instance which transforms to upper case.
    CaseNameRewriter(boolean upperCase)
    Construct a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    rewriteName(String original)
    Rewrite a name.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.wildfly.security.auth.server.NameRewriter

    asPrincipalRewriter
  • Constructor Details

    • 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 Details

    • rewriteName

      public String rewriteName(String original)
      Rewrite a name.
      Specified by:
      rewriteName in interface org.wildfly.security.auth.server.NameRewriter
      Parameters:
      original - the original name
      Returns:
      the rewritten name