public class IdGeneratorUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
HIERARCHY_SEPARATOR
Separator for ID components.
|
protected static org.slf4j.Logger |
logger |
static String |
SLUG_REPLACE |
| Constructor and Description |
|---|
IdGeneratorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
generateId(Collection<String> scopeIds,
Bundle bundle,
String ident)
Use an array of scope IDs and the bundle data to generate a unique
id within a given scope.
|
static String |
generateId(PermissionScope scope,
Bundle bundle,
String ident)
Uses the items identifier and its entity type to generate a (supposedly)
unique ID.
|
static com.google.common.collect.ListMultimap<String,String> |
handleIdCollision(Collection<String> scopeIds,
String dataKey,
String ident) |
static String |
joinPath(Collection<String> path)
Join an identifier path to form a full ID.
|
public static final String HIERARCHY_SEPARATOR
public static final String SLUG_REPLACE
protected static final org.slf4j.Logger logger
public static com.google.common.collect.ListMultimap<String,String> handleIdCollision(Collection<String> scopeIds, String dataKey, String ident)
public static String generateId(PermissionScope scope, Bundle bundle, String ident)
scope - the permission scopebundle - the item's data bundleident - the item's identifierpublic static String generateId(Collection<String> scopeIds, Bundle bundle, String ident)
scopeIds - An array of scope idsbundle - The input bundleident - the item's identifierpublic static String joinPath(Collection<String> path)
path - A non-empty list of identifier strings.Copyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.