Class ExternalId.Key

java.lang.Object
com.google.gerrit.server.account.externalids.ExternalId.Key
All Implemented Interfaces:
Serializable
Enclosing class:
ExternalId

public abstract static class ExternalId.Key extends Object implements Serializable
See Also:
  • Constructor Details

    • Key

      public Key()
  • Method Details

    • create

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

      public static ExternalId.Key parse(String externalId, boolean isCaseInsensitive)
      Parses an external ID key from a string in the format "scheme:id" or "id".
      Returns:
      the parsed external ID key
    • scheme

      public abstract String scheme()
    • id

      public abstract String id()
    • isCaseInsensitive

      public abstract boolean isCaseInsensitive()
    • isScheme

      public boolean isScheme(String scheme)
    • sha1

      @Memoized public org.eclipse.jgit.lib.ObjectId sha1()
    • caseSensitiveSha1

      @Memoized public org.eclipse.jgit.lib.ObjectId caseSensitiveSha1()
    • get

      public String get()
      Exports this external ID key as string with the format "scheme:id", or "id" if scheme is null.

      This string representation is used as subsection name in the Git config file that stores the external ID.

    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      @Memoized public int hashCode()
      Overrides:
      hashCode in class Object
    • from

      public static com.google.common.collect.ImmutableSet<ExternalId.Key> from(Collection<ExternalId> extIds)