| 
SunTM's XACML Implementation for JavaTM | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xacml.ctx.Result
Represents the ResultType XML object from the Context schema. Any number
 of these may included in a ResponseCtx. This class encodes the
 decision effect, as well as an optional resource identifier and optional
 status data. Any number of obligations may also be included.
| Field Summary | |
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_NOT_APPLICABLE
The decision that nothing applied to us  | 
static int | 
DECISION_PERMIT
The decision to permit the request  | 
static String[] | 
DECISIONS
 | 
| Constructor Summary | |
Result(int decision)
Constructs a Result object with default status data (OK). | 
|
Result(int decision,
       Set obligations)
Constructs a Result object with default status data (OK),
 and obligations, but no resource identifier. | 
|
Result(int decision,
       Status status)
Constructs a Result object with status data but without a
 resource identifier. | 
|
Result(int decision,
       Status status,
       Set obligations)
Constructs a Result object with status data and obligations
 but without a resource identifier. | 
|
Result(int decision,
       Status status,
       String resource)
Constructs a Result object with status data and a
 resource identifier. | 
|
Result(int decision,
       Status status,
       String resource,
       Set obligations)
Constructs a Result object with status data, a
 resource identifier, and obligations. | 
|
Result(int decision,
       String resource)
Constructs a Result object with a resource identifier,
 but default status data (OK). | 
|
Result(int decision,
       String resource,
       Set obligations)
Constructs a Result object with a resource identifier,
 and obligations, but default status data (OK). | 
|
| Method Summary | |
 void | 
addObligation(Obligation obligation)
Adds an obligation to the set of obligations that the PEP must fulfill  | 
 void | 
encode(OutputStream output)
Encodes this Result into its XML form and writes this
 out to the provided OutputStream | 
 void | 
encode(OutputStream output,
       Indenter indenter)
Encodes this Result into its XML form and writes this
 out to the provided OutputStream | 
 int | 
getDecision()
Returns the decision associated with this Result. | 
static Result | 
getInstance(Node root)
Creates a new instance of a Result based on the given
 DOM root node. | 
 Set | 
getObligations()
Returns the set of obligations that the PEP must fulfill, which may be empty.  | 
 String | 
getResource()
Returns the resource to which this Result applies, or null if none is specified.  | 
 Status | 
getStatus()
Returns the status data included in this Result. | 
 boolean | 
setResource(String resource)
Sets the resource 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 | 
| 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 String[] DECISIONS
| Constructor Detail | 
public Result(int decision)
       throws IllegalArgumentException
Result object with default status data (OK).
decision - the decision effect to include in this result. This
                 must be one of the four fields in this class.
IllegalArgumentException - if decision is not valid
public Result(int decision,
              Set obligations)
       throws IllegalArgumentException
Result object with default status data (OK),
 and obligations, but no resource identifier.
decision - the decision effect to include in this result. This
                 must be one of the four fields in this class.obligations - the obligations the PEP must handle
IllegalArgumentException - if decision is not valid
public Result(int decision,
              Status status)
       throws IllegalArgumentException
Result object with status data but without a
 resource identifier. Typically the decision is DECISION_INDETERMINATE
 in this case, though that's not always true.
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 result
IllegalArgumentException - if decision is not valid
public Result(int decision,
              Status status,
              Set obligations)
       throws IllegalArgumentException
Result object with status data and obligations
 but without a resource identifier. Typically the decision is
 DECISION_INDETERMINATE in this case, though that's not always true.
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 resultobligations - the obligations the PEP must handle
IllegalArgumentException - if decision is not valid
public Result(int decision,
              String resource)
       throws IllegalArgumentException
Result object with a resource identifier,
 but default status data (OK). The resource being named must match
 the resource (or a descendent of the resource in the case of a
 hierarchical resource) from the associated request.
decision - the decision effect to include in this result. This
                 must be one of the four fields in this class.resource - a String naming the resource
IllegalArgumentException - if decision is not valid
public Result(int decision,
              String resource,
              Set obligations)
       throws IllegalArgumentException
Result object with a resource identifier,
 and obligations, but default status data (OK). The resource being named
 must match the resource (or a descendent of the resource in the case of
 a hierarchical resource) from the associated request.
decision - the decision effect to include in this result. This
                 must be one of the four fields in this class.resource - a String naming the resourceobligations - the obligations the PEP must handle
IllegalArgumentException - if decision is not valid
public Result(int decision,
              Status status,
              String resource)
       throws IllegalArgumentException
Result object with status data and a
 resource identifier.
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 resultresource - a String naming the resource
IllegalArgumentException - if decision is not valid
public Result(int decision,
              Status status,
              String resource,
              Set obligations)
       throws IllegalArgumentException
Result object with status data, a
 resource identifier, and obligations.
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 resultresource - a String naming the resourceobligations - the obligations the PEP must handle
IllegalArgumentException - if decision is not valid| Method Detail | 
public static Result getInstance(Node root)
                          throws ParsingException
Result based on the given
 DOM root node. A ParsingException is thrown if the DOM
 root doesn't represent a valid ResultType.
root - the DOM root of a ResultType
Result
ParsingException - if the node is invalidpublic 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 String getResource()
public boolean setResource(String resource)
resource - the resource identifier
public Set getObligations()
public void addObligation(Obligation obligation)
obligation - the Obligation to addpublic void encode(OutputStream output)
Result into its XML form and writes this
 out to the provided OutputStream with no indentation.
- Parameters:
 output - a stream into which the XML-encoded data is written
 
public void encode(OutputStream output,
                   Indenter indenter)
Result into its XML form and writes this
 out to the provided OutputStream with indentation.
- Parameters:
 output - a stream into which the XML-encoded data is writtenindenter - an object that creates indentation strings
 
  | 
Sun's XACML Implementation Version 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.