org.wso2.balana.ctx.xacml2
Class Result
java.lang.Object
org.wso2.balana.ctx.AbstractResult
org.wso2.balana.ctx.xacml2.Result
public class Result
- extends AbstractResult
XACML 2 and 1 implementation of AbstractResult
Fields inherited from class org.wso2.balana.ctx.AbstractResult |
advices, decision, DECISION_DENY, DECISION_INDETERMINATE, DECISION_INDETERMINATE_DENY, DECISION_INDETERMINATE_DENY_OR_PERMIT, DECISION_INDETERMINATE_PERMIT, DECISION_NOT_APPLICABLE, DECISION_PERMIT, DECISIONS, obligations, status, version |
Method Summary |
void |
encode(StringBuilder builder)
Encodes this AbstractResult into its XML form and writes this out to the provided
StringBuilder
|
static AbstractResult |
getInstance(Node root)
Creates a new instance of a Result based on the given
DOM root node. |
String |
getResourceId()
Returns the resourceId to which this Result applies, or null if none is specified. |
boolean |
setResource(String resource)
Sets the resourceId identifier if it has not already been set before. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Result
public Result(int decision,
Status status)
Result
public Result(int decision,
Status status,
List<ObligationResult> obligationResults)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
Result
public Result(int decision,
Status status,
List<ObligationResult> obligationResults,
String resourceId)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
getInstance
public static AbstractResult getInstance(Node root)
throws ParsingException
- Creates a new instance of a
Result
based on the given
DOM root node. A ParsingException
is thrown if the DOM
root doesn't represent a valid ResultType.
- Parameters:
root
- the DOM root of a ResultType
- Returns:
- a new
Result
- Throws:
ParsingException
- if the node is invalid
getResourceId
public String getResourceId()
- Returns the resourceId to which this Result applies, or null if none is specified.
- Returns:
- a resourceId identifier or null
setResource
public boolean setResource(String resource)
- Sets the resourceId identifier if it has not already been set before. The core code does not
set the resourceId identifier, so this is useful if you want to write wrapper code that needs
this information.
- Parameters:
resource
- the resourceId identifier
- Returns:
- true if the resourceId identifier was set, false if it already had a value
encode
public void encode(StringBuilder builder)
- Description copied from class:
AbstractResult
- Encodes this
AbstractResult
into its XML form and writes this out to the provided
StringBuilder
- Specified by:
encode
in class AbstractResult
- Parameters:
builder
- string stream into which the XML-encoded data is written
Copyright © 2015 WSO2. All rights reserved.