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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Key()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ExternalId.Key
create(String scheme, String id)
Creates an external ID key.static com.google.common.collect.ImmutableSet<ExternalId.Key>
from(Collection<ExternalId> extIds)
String
get()
Exports this external ID key as string with the format "scheme:id", or "id" if scheme is null.abstract String
id()
boolean
isScheme(String scheme)
static ExternalId.Key
parse(String externalId)
Parses an external ID key from a string in the format "scheme:id" or "id".abstract String
scheme()
org.eclipse.jgit.lib.ObjectId
sha1()
Returns the SHA1 of the external ID that is used as note ID in the refs/meta/external-ids notes branch.String
toString()
-
-
-
Method Detail
-
create
public static ExternalId.Key create(String scheme, String id)
Creates an external ID key.- Parameters:
scheme
- the scheme name, must not contain colons (':'), can benull
id
- the external ID, must not contain colons (':')- Returns:
- the created external ID key
-
parse
public static ExternalId.Key parse(String externalId)
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()
-
isScheme
public boolean isScheme(String scheme)
-
sha1
public org.eclipse.jgit.lib.ObjectId sha1()
Returns the SHA1 of the external ID that is used as note ID in the refs/meta/external-ids notes branch.
-
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.
-
from
public static com.google.common.collect.ImmutableSet<ExternalId.Key> from(Collection<ExternalId> extIds)
-
-