Class ExternalIdKeyFactory
- java.lang.Object
-
- com.google.gerrit.server.account.externalids.ExternalIdKeyFactory
-
@Singleton public class ExternalIdKeyFactory extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ExternalIdKeyFactory.Config
static class
ExternalIdKeyFactory.ConfigImpl
Default implementationExternalIdKeyFactory.Config
-
Constructor Summary
Constructors Constructor Description ExternalIdKeyFactory(ExternalIdKeyFactory.Config config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExternalId.Key
create(String scheme, String id)
Creates an external ID key.ExternalId.Key
create(String scheme, String id, boolean userNameCaseInsensitive)
Creates an external ID key.ExternalId.Key
parse(String externalId)
Parses an external ID key from its String representation
-
-
-
Constructor Detail
-
ExternalIdKeyFactory
@Inject public ExternalIdKeyFactory(ExternalIdKeyFactory.Config config)
-
-
Method Detail
-
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
-
-