public class PolicyFinderResult extends Object
PolicyFinder
. It communicates either a found policy that
applied to the request (eg, the target matches), an Indeterminate state,
or no applicable policies.
The OnlyOneApplicable combining logic is used in looking for a policy, so the result from calling findPolicy can never be more than one policy.
Constructor and Description |
---|
PolicyFinderResult()
Creates a result saying that no applicable policies were found.
|
PolicyFinderResult(AbstractPolicy policy)
Creates a result containing a single applicable policy.
|
PolicyFinderResult(Status status)
Create a result of Indeterminate, including Status data.
|
Modifier and Type | Method and Description |
---|---|
AbstractPolicy |
getPolicy()
Returns the found policy, or null if there was an error or no policy
was found.
|
Status |
getStatus()
Returns the status if there was an error, or null if no error occurred.
|
boolean |
indeterminate()
Returns true if the result was Indeterminate.
|
boolean |
notApplicable()
Returns true if the result was NotApplicable.
|
public PolicyFinderResult()
public PolicyFinderResult(AbstractPolicy policy)
policy
- the applicable policypublic PolicyFinderResult(Status status)
status
- the error informationpublic boolean notApplicable()
public boolean indeterminate()
public AbstractPolicy getPolicy()
public Status getStatus()
Copyright © 2023 JBoss by Red Hat. All rights reserved.