Package org.forgerock.openam.uma.rest
Class ResourceSetService
- java.lang.Object
-
- org.forgerock.openam.uma.rest.ResourceSetService
-
public class ResourceSetService extends Object
Services for getting Resource Sets and optionally augmenting them with an associated UMA policy.- Since:
- 13.0.0
-
-
Constructor Summary
Constructors Constructor Description ResourceSetService(ResourceSetStoreFactory resourceSetStoreFactory, UmaPolicyService policyService, CoreWrapper coreWrapper, UmaProviderSettingsFactory umaProviderSettingsFactory)Creates an instance of a ResourceSetService.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SubjectcreateSubject(String username, String realm)Collection<ResourceSetDescription>filterPolicies(Set<ResourceSetDescription> resourceSets, org.forgerock.openam.uma.rest.ResourceSetWithPolicyQuery query)Filters the policies based on the provided query.booleanisSharedWith(ResourceSetDescription resourceSet, String resourceUserId, String realm)Checks whether a ResourceSet is accessible by a user.
-
-
-
Constructor Detail
-
ResourceSetService
@Inject public ResourceSetService(ResourceSetStoreFactory resourceSetStoreFactory, UmaPolicyService policyService, CoreWrapper coreWrapper, UmaProviderSettingsFactory umaProviderSettingsFactory)
Creates an instance of a ResourceSetService.- Parameters:
resourceSetStoreFactory- An instance of theResourceSetStoreFactory.policyService- An instance of the UmaPolicyService.
-
-
Method Detail
-
filterPolicies
public Collection<ResourceSetDescription> filterPolicies(Set<ResourceSetDescription> resourceSets, org.forgerock.openam.uma.rest.ResourceSetWithPolicyQuery query)
Filters the policies based on the provided query.- Parameters:
resourceSets- The ResourceSets to filter.query- The filter to use.- Returns:
- The ResourceSets that match the query.
-
isSharedWith
public boolean isSharedWith(ResourceSetDescription resourceSet, String resourceUserId, String realm) throws org.forgerock.json.resource.InternalServerErrorException
Checks whether a ResourceSet is accessible by a user.- Parameters:
resourceSet- The resource set to check.resourceUserId- The id of the user to check.realm- The realm to check in.- Returns:
- Throws:
org.forgerock.json.resource.InternalServerErrorException
-
-