|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.balana.finder.ResourceFinderResult
public class ResourceFinderResult
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.
Constructor Summary | |
---|---|
ResourceFinderResult()
Creates an empty result. |
|
ResourceFinderResult(HashMap failures)
Creates a result containing only Resource Ids that caused errors. |
|
ResourceFinderResult(Set<AttributeValue> resources)
Creates a result containing the given Set of resource identifiers. |
|
ResourceFinderResult(Set resources,
Map failures)
Creates a new result containing both successfully resolved Resource Ids and resources that caused errors. |
Method Summary | |
---|---|
Map |
getFailures()
Returns the Map of Resource Ids that caused an error on resolution, which will
be empty if no resources caused any error. |
Set<AttributeValue> |
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 |
Constructor Detail |
---|
public ResourceFinderResult()
public ResourceFinderResult(Set<AttributeValue> resources)
Set
of resource identifiers. The
Set
must not be null. The new ResourceFinderResult
represents a
resource retrieval that encountered no errors.
resources
- a non-null Set
of AttributeValue
spublic ResourceFinderResult(HashMap failures)
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.
failures
- a non-null Map
mapping failed AttributeValue
identifiers to their Status
public ResourceFinderResult(Set resources, Map failures)
resources
- a non-null Set
of AttributeValue
sfailures
- a non-null Map
mapping failed AttributeValue
identifiers to their Status
Method Detail |
---|
public boolean isEmpty()
public Set<AttributeValue> getResources()
Set
of successfully resolved Resource Id AttributeValue
s, which will be empty if no resources were successfully resolved.
Set
of AttributeValue
spublic Map getFailures()
Map
of Resource Ids that caused an error on resolution, which will
be empty if no resources caused any error.
Map
of AttributeValue
s to Status
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |