T
- The object type being stored.public class TokenDataStore<T> extends Object
T
, that has annotations to support conversion
to and from a Token.Modifier and Type | Class and Description |
---|---|
static class |
TokenDataStore.FilterType
Different ways to combine criteria in a filter.
|
Constructor and Description |
---|
TokenDataStore(JavaBeanAdapter<T> adapter,
TaskExecutor taskExecutor,
TaskFactory taskFactory)
Create a new TokenDataStore.
|
Modifier and Type | Method and Description |
---|---|
void |
create(T obj)
Create an object.
|
void |
delete(String id)
Remove an object with the given ID from the store.
|
Set<T> |
query(org.forgerock.util.query.QueryFilter<String> query)
Query the store for instances.
|
T |
read(String id)
Reads a
T out of the store using its OpenAM Unique ID. |
void |
update(T obj)
Update a given instance.
|
public TokenDataStore(JavaBeanAdapter<T> adapter, TaskExecutor taskExecutor, TaskFactory taskFactory)
adapter
- The Java bean token adapter for the type of bean being stored as tokens.taskExecutor
- The data layer task executor, for executing operations on the data store. Should be a
SimpleTaskExecutor
.taskFactory
- The task factory for creating data store operations.public void create(T obj) throws ServerException
obj
- The object being created.ServerException
- When an error occurs during creation.public T read(String id) throws NotFoundException, ServerException
T
out of the store using its OpenAM Unique ID.id
- The OpenAM Unique ID assigned to the object.NotFoundException
- If the object is not found.ServerException
- When the object cannot be loaded.public void update(T obj) throws NotFoundException, ServerException
obj
- The object being updated.ServerException
- When the object cannot be found, or an error occurs during update.NotFoundException
public void delete(String id) throws NotFoundException, ServerException
id
- The identifier of the object being removed.ServerException
- When an error occurs during removal.NotFoundException
public Set<T> query(org.forgerock.util.query.QueryFilter<String> query) throws ServerException
query
- The criteria of the query, using T
bean property names as fields.ServerException
- When an error occurs when querying the store.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.