java.lang.Object
com.sun.xacml.finder.ResourceFinderResult
- public class ResourceFinderResult
- extends java.lang.Object
This is used to return Resource Ids from the ResourceFinder. Unlike the
PolicyFinder, this never returns an empty set, since it will always
contain at least the original parent resource. This class will provide
two sets of identifiers: those that were successfully resolved and those
that had an error.
- Since:
- 1.0
Method Summary |
java.util.Map |
getFailures()
Returns the Map of Resource Ids that caused an error on
resolution, which will be empty if no resources caused any error. |
java.util.Set |
getResources()
Returns the Set of successfully resolved Resource Id
AttributeValue s, which will be empty if no resources
were successfully resolved. |
boolean |
isEmpty()
Returns whether or not this result contains any Resource Id listings. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resources
private java.util.Set resources
failures
private java.util.Map failures
empty
private boolean empty
ResourceFinderResult
public ResourceFinderResult()
- Creates an empty result.
ResourceFinderResult
public ResourceFinderResult(java.util.Set resources)
- Creates a result containing the given
Set
of resource
identifiers. The Set
must not be null. The new
ResourceFinderResult
represents a resource retrieval that
encountered no errors.
ResourceFinderResult
public ResourceFinderResult(java.util.HashMap failures)
- Creates a result containing only Resource Ids that caused errors. The
Map
must not be null. The keys in the Map
are AttributeValue
s identifying the resources that could
not be resolved, and they map to a Status
object
explaining the error. The new ResourceFinderResult
represents a resource retrieval that did not succeed in finding any
resource identifiers.
ResourceFinderResult
public ResourceFinderResult(java.util.Set resources,
java.util.Map failures)
- Creates a new result containing both successfully resolved Resource Ids
and resources that caused errors.
isEmpty
public boolean isEmpty()
- Returns whether or not this result contains any Resource Id listings.
This will return false if either the set of successfully resolved
resource identifiers or the map of failed resources is not empty.
getResources
public java.util.Set getResources()
- Returns the
Set
of successfully resolved Resource Id
AttributeValue
s, which will be empty if no resources
were successfully resolved.
getFailures
public java.util.Map getFailures()
- Returns the
Map
of Resource Ids that caused an error on
resolution, which will be empty if no resources caused any error.