Class ExternalIdKeyFactory

java.lang.Object
com.google.gerrit.server.account.externalids.ExternalIdKeyFactory

@Singleton public class ExternalIdKeyFactory extends Object
  • Constructor Details

  • Method Details

    • create

      public ExternalId.Key create(String scheme, String id)
      Creates an external ID key.
      Parameters:
      scheme - the scheme name, must not contain colons (':'). E.g. ExternalId.SCHEME_USERNAME.
      id - the external ID, must not contain colons (':')
      Returns:
      the created external ID key
    • create

      public ExternalId.Key create(String scheme, String id, boolean userNameCaseInsensitive)
      Creates an external ID key.
      Parameters:
      scheme - the scheme name, must not contain colons (':'). E.g. ExternalId.SCHEME_USERNAME.
      id - the external ID, must not contain colons (':')
      userNameCaseInsensitive - whether the external ID key is matched case insensitively
      Returns:
      the created external ID key
    • parse

      public ExternalId.Key parse(String externalId)
      Parses an external ID key from its String representation
      Parameters:
      externalId - String representation of external ID key (e.g. username:johndoe)
      Returns:
      the external Id key object