public class UmaPolicy extends Object
Modifier and Type | Method and Description |
---|---|
org.forgerock.json.JsonValue |
asJson()
Converts the
UmaPolicy to JSON. |
Set<org.forgerock.json.JsonValue> |
asUnderlyingPolicies(String policyOwnerName)
Converts the
UmaPolicy into its underlying backend policies in JSON format. |
boolean |
equals(Object o) |
static UmaPolicy |
fromUnderlyingPolicies(ResourceSetDescription resourceSet,
Collection<org.forgerock.json.resource.ResourceResponse> policies)
Converts underlying backend policies into an
UmaPolicy . |
String |
getId()
Gets the ID of this UMA policy which is the unique resource set ID that this policy relates to.
|
String |
getResourceServerId()
Gets the Resource Server Id that the resource set was registered by.
|
ResourceSetDescription |
getResourceSet() |
String |
getRevision()
Gets the revision of this UMA policy.
|
Set<String> |
getScopes()
Parses the unique set of scopes that are defined for all subject in this UMA policy.
|
Set<String> |
getSubjects()
Parses the unique set of subjects that have permissions defined in this UMA policy.
|
Collection<String> |
getUnderlyingPolicyIds() |
int |
hashCode() |
static String |
idOf(org.forgerock.json.JsonValue policy)
Parses the unique resource set id, that the UMA policy relates to, from the UMA policy JSON.
|
static UmaPolicy |
valueOf(ResourceSetDescription resourceSet,
org.forgerock.json.JsonValue policy)
Parses the UMA policy JSON into a
UmaPolicy instance. |
public static String idOf(org.forgerock.json.JsonValue policy) throws org.forgerock.json.resource.BadRequestException
policy
- The UMA policy in JSON format.org.forgerock.json.resource.BadRequestException
public static UmaPolicy valueOf(ResourceSetDescription resourceSet, org.forgerock.json.JsonValue policy) throws org.forgerock.json.resource.BadRequestException
UmaPolicy
instance.resourceSet
- The resource set the policy relates to.policy
- The UMA policy in JSON format.UmaPolicy
instance.org.forgerock.json.resource.BadRequestException
- If the UMA policy JSON is not valid.public static UmaPolicy fromUnderlyingPolicies(ResourceSetDescription resourceSet, Collection<org.forgerock.json.resource.ResourceResponse> policies) throws org.forgerock.json.resource.BadRequestException
UmaPolicy
.resourceSet
- The resource set the policy relates to.policies
- The collection of underlying backend policies.UmaPolicy
instance.org.forgerock.json.resource.BadRequestException
- If the underlying policies do not underpin a valid UMA policy.public String getId()
public String getRevision()
public org.forgerock.json.JsonValue asJson()
UmaPolicy
to JSON.public Collection<String> getUnderlyingPolicyIds()
public Set<String> getScopes()
public Set<org.forgerock.json.JsonValue> asUnderlyingPolicies(String policyOwnerName)
UmaPolicy
into its underlying backend policies in JSON format.public Set<String> getSubjects()
public String getResourceServerId()
public ResourceSetDescription getResourceSet()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.