SunTM's XACML Implementation for JavaTM

com.sun.xacml.finder
Class PolicyFinderResult

java.lang.Object
  extended bycom.sun.xacml.finder.PolicyFinderResult

public class PolicyFinderResult
extends Object

This is used as the return value for the findPolicy() methods in the 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.

Since:
1.0

Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyFinderResult

public PolicyFinderResult()
Creates a result saying that no applicable policies were found.


PolicyFinderResult

public PolicyFinderResult(AbstractPolicy policy)
Creates a result containing a single applicable policy.

Parameters:
policy - the applicable policy

PolicyFinderResult

public PolicyFinderResult(Status status)
Create a result of Indeterminate, including Status data.

Parameters:
status - the error information
Method Detail

notApplicable

public boolean notApplicable()
Returns true if the result was NotApplicable.

Returns:
true if the result was NotApplicable

indeterminate

public boolean indeterminate()
Returns true if the result was Indeterminate.

Returns:
true if there was an error

getPolicy

public AbstractPolicy getPolicy()
Returns the found policy, or null if there was an error or no policy was found.

Returns:
the applicable policy or null

getStatus

public Status getStatus()
Returns the status if there was an error, or null if no error occurred.

Returns:
the error status data or null

Sun's XACML Implementation Version 1.2

Copyright 2003-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.