|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.balana.ctx.AbstractResult
public abstract class AbstractResult
Abstract Represents the ResultType XML object from the Context schema. Any number
of these may included in a ResponseCtx
. This class provides an abstract method to
encode XACML result with the decision effect, as well as an optional status data and obligations
and advices. encode method must be implemented under the concert class.
Field Summary | |
---|---|
protected List<Advice> |
advices
List of advices which may be empty |
protected int |
decision
the decision effect |
static int |
DECISION_DENY
The decision to deny the request |
static int |
DECISION_INDETERMINATE
The decision that a decision about the request cannot be made |
static int |
DECISION_INDETERMINATE_DENY
The decision that a decision about the request cannot be made |
static int |
DECISION_INDETERMINATE_DENY_OR_PERMIT
The decision that a decision about the request cannot be made |
static int |
DECISION_INDETERMINATE_PERMIT
The decision that a decision about the request cannot be made |
static int |
DECISION_NOT_APPLICABLE
The decision that nothing applied to us |
static int |
DECISION_PERMIT
The decision to permit the request |
static String[] |
DECISIONS
string versions of the 4 Decision types used for encoding |
protected List<ObligationResult> |
obligations
List of obligations which may be empty |
protected Status |
status
the status data |
protected int |
version
XACML version |
Constructor Summary | |
---|---|
AbstractResult(int decision,
Status status,
int version)
Constructs a AbstractResult object with decision status data, obligations, advices
and evaluation ctx |
|
AbstractResult(int decision,
Status status,
List<ObligationResult> obligationResults,
List<Advice> advices,
int version)
Constructs a AbstractResult object with decision status data, obligations, advices
and evaluation ctx |
Method Summary | |
---|---|
String |
encode()
Encodes this AbstractResult into its XML form |
abstract void |
encode(StringBuilder builder)
Encodes this AbstractResult into its XML form and writes this out to the provided
StringBuilder |
List<Advice> |
getAdvices()
Returns the set of advice that the PEP must fulfill, which may be empty. |
int |
getDecision()
Returns the decision associated with this Result . |
List<ObligationResult> |
getObligations()
Returns the set of obligations that the PEP must fulfill, which may be empty. |
Status |
getStatus()
Returns the status data included in this Result . |
int |
getVersion()
Gets XACML version |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DECISION_PERMIT
public static final int DECISION_DENY
public static final int DECISION_INDETERMINATE
public static final int DECISION_NOT_APPLICABLE
public static final int DECISION_INDETERMINATE_DENY
public static final int DECISION_INDETERMINATE_PERMIT
public static final int DECISION_INDETERMINATE_DENY_OR_PERMIT
public static final String[] DECISIONS
protected List<ObligationResult> obligations
protected List<Advice> advices
protected int decision
protected Status status
protected int version
Constructor Detail |
---|
public AbstractResult(int decision, Status status, int version) throws IllegalArgumentException
AbstractResult
object with decision status data, obligations, advices
and evaluation ctx
decision
- the decision effect to include in this result. This must be one of the four
fields in this class.status
- the Status
to include in this resultversion
- XACML version
IllegalArgumentException
- if decision is not validpublic AbstractResult(int decision, Status status, List<ObligationResult> obligationResults, List<Advice> advices, int version) throws IllegalArgumentException
AbstractResult
object with decision status data, obligations, advices
and evaluation ctx
decision
- the decision effect to include in this result. This must be one of the four
fields in this class.status
- the Status
to include in this resultobligationResults
- a list of ObligationResult
objectsadvices
- a list of Advice
objectsversion
- XACML version
IllegalArgumentException
- if decision is not validMethod Detail |
---|
public List<ObligationResult> getObligations()
Obligation
public List<Advice> getAdvices()
Advice
public int getDecision()
Result
. This will be one of the four
DECISION_*
fields in this class.
public Status getStatus()
Result
. Typically this will be
STATUS_OK
except when the decision is INDETERMINATE
.
public int getVersion()
public String encode()
AbstractResult
into its XML form
String
public abstract void encode(StringBuilder builder)
AbstractResult
into its XML form and writes this out to the provided
StringBuilder
- Parameters:
builder
- string stream into which the XML-encoded data is written
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |