@ApplicationScoped public class DefaultIdentifierService extends Object implements IdentifierService
Constructor and Description |
---|
DefaultIdentifierService()
Create a UUID-based IdentifierService.
|
DefaultIdentifierService(String prefix)
Create a UUID-based IdentifierService with a default prefix value.
|
Modifier and Type | Method and Description |
---|---|
Supplier<String> |
getSupplier()
Get a Supplier that generates Strings with the provided prefix.
|
Supplier<String> |
getSupplier(String prefix)
Get a Supplier that generates Strings with the provided prefix.
|
Supplier<String> |
getSupplier(String prefix,
int hierarchy,
int length)
Get a Supplier that generates Strings with the provided prefix.
|
public DefaultIdentifierService()
public DefaultIdentifierService(String prefix)
prefix
- the prefixpublic Supplier<String> getSupplier(String prefix, int hierarchy, int length)
IdentifierService
getSupplier
in interface IdentifierService
prefix
- the prefixhierarchy
- the levels of hierarchy to addlength
- the length of each level of hierarchypublic Supplier<String> getSupplier(String prefix)
IdentifierService
getSupplier
in interface IdentifierService
prefix
- the prefixpublic Supplier<String> getSupplier()
IdentifierService
getSupplier
in interface IdentifierService