Package org.forgerock.oauth2.resources
Interface ResourceSetStore
-
- All Known Implementing Classes:
OpenAMResourceSetStore
public interface ResourceSetStoreAllows the storage ofResourceSetDescriptionobjects in a store.- Since:
- 13.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classResourceSetStore.FilterTypeDifferent ways to combine criteria in a filter.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreate(OAuth2Request request, ResourceSetDescription resourceSetDescription)Create aResourceSetDescription.voiddelete(String resourceSetId, String resourceOwnerId)Remove aResourceSetDescriptionwith the given ID from the store.Set<ResourceSetDescription>query(org.forgerock.util.query.QueryFilter<String> query)Query the store forResourceSetDescriptioninstances.ResourceSetDescriptionread(String resourceSetId, String resourceOwnerId)Reads aResourceSetDescriptionout of the store using its OpenAM Unique ID.ResourceSetDescriptionread(String resourceSetId, ResourceSetFilter filter)Reads aResourceSetDescriptionout of the store using its OpenAM Unique ID.voidupdate(ResourceSetDescription resourceSetDescription)Update a givenResourceSetDescriptioninstance.
-
-
-
Method Detail
-
create
void create(OAuth2Request request, ResourceSetDescription resourceSetDescription) throws ServerException, NotFoundException, BadRequestException
Create aResourceSetDescription. The id field will be populated with the resulting identifier.- Parameters:
request- The OAuth2Request.resourceSetDescription- The resource set description being created.- Throws:
ServerException- When an error occurs during creation.NotFoundException- If the OAuth2ProviderSettings could not be found.BadRequestException
-
read
ResourceSetDescription read(String resourceSetId, ResourceSetFilter filter) throws NotFoundException, ServerException
Reads aResourceSetDescriptionout of the store using its OpenAM Unique ID.- Parameters:
resourceSetId- The resource set ID.filter- A filter to apply to the read elements.- Returns:
- The
ResourceSetDescription. - Throws:
NotFoundException- If the resource set is not found.ServerException- When the resource set description cannot be loaded.
-
read
ResourceSetDescription read(String resourceSetId, String resourceOwnerId) throws NotFoundException, ServerException
Reads aResourceSetDescriptionout of the store using its OpenAM Unique ID. Only returns a set which is owned by the specified resource owner.- Parameters:
resourceSetId- The resource set ID.resourceOwnerId- The ID of the resource owner.- Returns:
- The
ResourceSetDescription. - Throws:
NotFoundException- If the resource set is not found.ServerException- When the resource set description cannot be loaded.
-
update
void update(ResourceSetDescription resourceSetDescription) throws NotFoundException, ServerException
Update a givenResourceSetDescriptioninstance.- Parameters:
resourceSetDescription- The resource set description being updated.- Throws:
ServerException- When theResourceSetDescriptioncannot be found, or an error occurs during update.NotFoundException
-
delete
void delete(String resourceSetId, String resourceOwnerId) throws NotFoundException, ServerException
Remove aResourceSetDescriptionwith the given ID from the store.- Parameters:
resourceSetId- The identifier of theResourceSetDescriptionbeing removed.resourceOwnerId- The resource owner id.- Throws:
ServerException- When an error occurs during removal.NotFoundException
-
query
Set<ResourceSetDescription> query(org.forgerock.util.query.QueryFilter<String> query) throws ServerException
Query the store forResourceSetDescriptioninstances.- Parameters:
query- The criteria of the query.- Returns:
- A set of all matching resource set descriptions.
- Throws:
ServerException- When an error occurs when querying the store.
-
-