|
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.attr.AttributeValue
com.sun.xacml.attr.BagAttribute
Represents a bag used in the XACML spec as return values from functions and designators/selectors that provide more than one value. All values in the bag are of the same type, and the bag may be empty. The bag is immutable, although its contents may not be.
NOTE: This is the one standard attribute type that can't be created from the factory, since you can't have this in an XML block (it is used only in return values & dynamic inputs). I think this is right, but we may need to add some functionality to let this go into the factory.
Constructor Summary | |
BagAttribute(URI type,
Collection bag)
Creates a new BagAttribute that represents
the Collection of AttributeValue s supplied. |
Method Summary | |
boolean |
contains(AttributeValue value)
Returns true if this set contains the specified value. |
boolean |
containsAll(BagAttribute bag)
Returns true if this bag contains all of the values of the specified bag. |
static BagAttribute |
createEmptyBag(URI type)
Convenience function that returns a bag with no elements |
String |
encode()
Because a bag cannot be included in a request/response or a policy, this will always throw an UnsupportedOperationException . |
boolean |
isBag()
Overrides the default method to always return true. |
boolean |
isEmpty()
A convenience function that returns whether or not the bag is empty (ie, whether or not the size of the bag is zero) |
Iterator |
iterator()
Returns an iterator over te |
int |
size()
Returns the number of elements in this bag |
Methods inherited from class com.sun.xacml.attr.AttributeValue |
encode, encode, encodeWithTags, evaluate, evaluatesToBag, getChildren, getType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BagAttribute(URI type, Collection bag)
BagAttribute
that represents
the Collection
of AttributeValue
s supplied.
If the set is null or empty, then the new bag is empty.
type
- the data type of all the attributes in the setbag
- a Collection
of AttributeValue
sMethod Detail |
public boolean isBag()
isBag
in class AttributeValue
public static BagAttribute createEmptyBag(URI type)
type
- the types contained in the bag
public boolean isEmpty()
public int size()
public boolean contains(AttributeValue value)
AttributeValue
has overridden the
equals
method.
value
- the value to look for
public boolean containsAll(BagAttribute bag)
AttributeValue
type contained in the bag has overridden
the equals
method.
bag
- the bag to compare
public Iterator iterator()
public String encode()
UnsupportedOperationException
.
encode
in class AttributeValue
String
form of the value
|
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.