Class OpenAMResourceSetStore
- java.lang.Object
-
- org.forgerock.openam.oauth2.resources.OpenAMResourceSetStore
-
- All Implemented Interfaces:
ResourceSetStore
public class OpenAMResourceSetStore extends Object implements ResourceSetStore
StoresResourceSetDescriptionobjects in the CTS.- Since:
- 13.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.forgerock.oauth2.resources.ResourceSetStore
ResourceSetStore.FilterType
-
-
Constructor Summary
Constructors Constructor Description OpenAMResourceSetStore(String realm, OAuth2UrisFactory oauth2UrisFactory, TokenIdGenerator idGenerator, TokenDataStore delegate)Constructs a new OpenAMResourceSetStore instance.
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
OpenAMResourceSetStore
@Inject public OpenAMResourceSetStore(String realm, OAuth2UrisFactory oauth2UrisFactory, TokenIdGenerator idGenerator, TokenDataStore delegate)
Constructs a new OpenAMResourceSetStore instance.- Parameters:
realm- The realm this ResourceSetStore is in.oauth2UrisFactory- An instance of the OAuth2UrisFactory.
-
-
Method Detail
-
create
public void create(OAuth2Request request, ResourceSetDescription resourceSetDescription) throws ServerException, BadRequestException, NotFoundException
Description copied from interface:ResourceSetStoreCreate aResourceSetDescription. The id field will be populated with the resulting identifier.- Specified by:
createin interfaceResourceSetStore- 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
public ResourceSetDescription read(String resourceSetId, ResourceSetFilter filter) throws NotFoundException, ServerException
Description copied from interface:ResourceSetStoreReads aResourceSetDescriptionout of the store using its OpenAM Unique ID.- Specified by:
readin interfaceResourceSetStore- 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
public ResourceSetDescription read(String resourceSetId, String resourceOwnerId) throws NotFoundException, ServerException
Description copied from interface:ResourceSetStoreReads aResourceSetDescriptionout of the store using its OpenAM Unique ID. Only returns a set which is owned by the specified resource owner.- Specified by:
readin interfaceResourceSetStore- 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
public void update(ResourceSetDescription resourceSetDescription) throws NotFoundException, ServerException
Description copied from interface:ResourceSetStoreUpdate a givenResourceSetDescriptioninstance.- Specified by:
updatein interfaceResourceSetStore- Parameters:
resourceSetDescription- The resource set description being updated.- Throws:
ServerException- When theResourceSetDescriptioncannot be found, or an error occurs during update.NotFoundException
-
delete
public void delete(String resourceSetId, String resourceOwnerId) throws NotFoundException, ServerException
Description copied from interface:ResourceSetStoreRemove aResourceSetDescriptionwith the given ID from the store.- Specified by:
deletein interfaceResourceSetStore- Parameters:
resourceSetId- The identifier of theResourceSetDescriptionbeing removed.resourceOwnerId- The resource owner id.- Throws:
ServerException- When an error occurs during removal.NotFoundException
-
query
public Set<ResourceSetDescription> query(org.forgerock.util.query.QueryFilter<String> query) throws ServerException
Description copied from interface:ResourceSetStoreQuery the store forResourceSetDescriptioninstances.- Specified by:
queryin interfaceResourceSetStore- 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.
-
-