Interface IdentifiableResourceDataAccessProvider<A extends ResourceAttributes<?>>
- All Superinterfaces:
DataAccessProvider
- All Known Subinterfaces:
DeviceDataAccessProvider,UserAccountDataAccessProvider
public interface IdentifiableResourceDataAccessProvider<A extends ResourceAttributes<?>>
extends DataAccessProvider
-
Method Summary
Modifier and TypeMethodDescriptionfromAttributes(@Nullable Iterable<Attribute> attributes) getAll(long startIndex, long count) Get all resources (paginated).default ResourceQueryResultgetAll(ResourceQuery query) Get all resources after applying the provided query.Get the resource by ID.Methods inherited from interface se.curity.identityserver.sdk.datasource.DataAccessProvider
isThreadSafe
-
Method Details
-
fromAttributes
-
getById
Get the resource by ID.- Parameters:
id- of resource- Returns:
- the resource with the given ID, or null if none is found.
-
getAll
Get all resources (paginated).- Parameters:
startIndex- 0-index of first resource to returncount- maximum number of resources to return- Returns:
- all resources between index
fromandfrom + length
-
getAll
Get all resources after applying the provided query.The default implementation simply delegates to
getAll(long, long)and programmatically selects attributes if necessary. Unless the data access provider has absolutely no way to implement dynamic queries, this method should be overridden by subclasses.Notice that because the query may filter out attributes, this method does not necessarily return elements of type
IdentifiableResourceDataAccessProvider.- Parameters:
query- the resource query- Returns:
- all resources satisfying the provided query constraints.
-