T - public abstract class IdStore<T> extends Object implements hudson.ExtensionPoint
| Modifier and Type | Method and Description |
|---|---|
static String |
fileName()
Returns the generic filename that a store should use for storing the unique id.
|
static <C> IdStore<C> |
forClass(Class<C> clazz)
Retrieve an
IdStore for the given type. |
protected static String |
generateUniqueID()
Generates a new unique ID.
|
abstract String |
get(T object)
Get the id for this given object.
|
static String |
getId(Object object)
Convenience method which retrieves the id for the given object.
|
abstract void |
make(T object)
Creates an unique id for the given object.
|
static void |
makeId(Object object)
Convenience method which makes the id for the given object.
|
boolean |
supports(Class clazz) |
public abstract void make(T object)
object - the object to make the id for.@Nullable public abstract String get(T object)
object - the object.null if none assigned.public boolean supports(Class clazz)
@Nullable public static <C> IdStore<C> forClass(Class<C> clazz)
IdStore for the given type.C - the type of object.clazz - the type of object.null if none.public static void makeId(Object object) throws IllegalArgumentException
IllegalArgumentException - if the type is not supported.public static String getId(Object object) throws IllegalArgumentException
IllegalArgumentException - if the type is not supported.@Nonnull public static String fileName()
protected static String generateUniqueID()
Copyright © 2004-2015. All Rights Reserved.