public class PolicyContext extends Object
Policy
aspects during validation. This facilitates
inheritance of properties from parent Policy declarations during the flow of validation. For
example, an initial Policy annotation could declare Policy.permissionRoots()
, which are
inherited by other Policy declarations on a more generic service that might only declare
Policy.operationTypes()
.Constructor and Description |
---|
PolicyContext() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
static void |
clear(String signature) |
PolicyInformation |
derivePolicyInformation(PolicyInformation start)
Embellish the current
PolicyInformation with any inherited information from a parent
PolicyInformation instance in logic flow. |
boolean |
equals(Object o) |
static PolicyContext |
getContext() |
Map<String,PolicyInformation> |
getContextPolicies() |
PolicyInformation |
getMostDerivedPolicyInformation()
Policy validation flows may "stack" as a codepath progresses, and become more derived via
derivePolicyInformation(PolicyInformation) . |
int |
hashCode() |
void |
setContextPolicies(Map<String,PolicyInformation> contextPolicies) |
String |
toString() |
public PolicyInformation derivePolicyInformation(PolicyInformation start)
PolicyInformation
with any inherited information from a parent
PolicyInformation instance in logic flow.start
- The current PolicyInformation instancepublic static PolicyContext getContext()
@Nullable public PolicyInformation getMostDerivedPolicyInformation()
derivePolicyInformation(PolicyInformation)
. This is a convenience method that can be
used to get the "last" or "most derived" policy information from
getContextPolicies()
.getContextPolicies()
.
If getContextPolicies()
is empty, this will return null
.public static void clear(String signature)
public Map<String,PolicyInformation> getContextPolicies()
public void setContextPolicies(Map<String,PolicyInformation> contextPolicies)
protected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.