Class 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 Detail

      • ResourceSetService

        @Inject
        public ResourceSetService​(ResourceSetStoreFactory resourceSetStoreFactory,
                                  UmaPolicyService policyService,
                                  CoreWrapper coreWrapper,
                                  UmaProviderSettingsFactory umaProviderSettingsFactory)
        Creates an instance of a ResourceSetService.
        Parameters:
        resourceSetStoreFactory - An instance of the ResourceSetStoreFactory.
        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