|
Project Aristotle - ArisID Attribute Services | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<java.lang.String>
org.openliberty.arisid.AttributeValue
public class AttributeValue
AttributeValue is used to hold values returned from an attribute authority. An AttributeValue usually represents one returned attribute in a DigitalSubject. All String values are UTF-8 encoded. The AttributeValue will also hold IGF meta response data for an attribute. TODO Add IGF meta data response information TODO How to encode and handle multi-byte data.
| Field Summary |
|---|
| Fields inherited from interface org.openliberty.arisid.IAttributeValue |
|---|
VALUE_TYPE_EMPTY, VALUE_TYPE_MULTI, VALUE_TYPE_SINGLE, VALUE_TYPE_UNDEFINED |
| Constructor Summary | |
|---|---|
AttributeValue(AttributeDef attr,
java.lang.Exception error)
This constructor is used when an exception has occurred and typically no values are present. |
|
AttributeValue(AttributeDef attr,
java.util.List<java.lang.String> vals)
This constructor is typically used to set the values for a DigitalSubject or an AttributeFilter |
|
AttributeValue(AttributeDef attr,
java.lang.String value)
This constructor is typically used to set the values for a DigitalSubject or an AttributeFilter |
|
AttributeValue(java.lang.String attrRefId)
Creates an instance of an IAttributeValue using an Attribute Reference
Identifier (the name of a declared attribute). |
|
AttributeValue(java.lang.String name,
java.lang.Exception error)
This constructor is used when an exception has occurred and typically no values are present. |
|
AttributeValue(java.lang.String attrId,
java.util.List<java.lang.String> vals)
This constructor is typically used to set the values for a DigitalSubject or an AttributeFilter |
|
AttributeValue(java.lang.String attrId,
java.lang.String value)
This constructor is typically used to set the values for a DigitalSubject |
|
| Method Summary | |
|---|---|
void |
add(int index,
java.lang.String element)
|
boolean |
add(java.lang.String o)
Add a String value to the list of values. |
boolean |
addAll(java.util.Collection<? extends java.lang.String> c)
|
boolean |
addAll(int index,
java.util.Collection<? extends java.lang.String> c)
|
boolean |
addBinary(byte[] value)
Adds a binary value to the list of Attribute Values. |
static byte[] |
base64Decode(java.lang.String value)
Returns the Base64 decoded value (binary value) for a Base64 encoded string |
static java.lang.String |
base64Encode(byte[] value)
Returns the Base64 encoded string for a given binary value |
boolean |
compare(java.lang.String val)
|
boolean |
compareAttributeValueExact(AttributeValue val)
Deprecated. Use compareValueExact(IAttributeValue) instead |
boolean |
compareAttributeValueIgnoreCaseExact(AttributeValue val)
Deprecated. Use compareValueIgnoreCaseExact(IAttributeValue) instead |
boolean |
compareIgnoreCase(java.lang.String val)
|
boolean |
compareValueExact(IAttributeValue val)
All values in the current object must match values in the supplied array. |
boolean |
compareValueIgnoreCaseExact(IAttributeValue val)
|
boolean |
contains(java.lang.String value)
Tests whether the specified value is contained. |
boolean |
containsBinary(byte[] value)
Tests whether the specified binary value is contained. |
boolean |
equals(java.lang.Object obj)
|
byte[] |
getBinary(int i)
Returns a value in binary form. |
java.lang.Object[] |
getBinaryValues()
|
java.lang.Exception |
getError()
Returns the error associated with the value if present |
java.lang.String |
getNameIdRef()
Returns the Attribute associated with the value as declared in CARML |
IPolicy |
getPolicy()
Returns dynamic WS-Policy constraints that are to be applied to the value. |
int |
getValueType()
Returns whether the value is either undefined, empty, contains single or multiple values. |
int |
hashCode()
|
boolean |
isError()
Returns whether the current entity has an error condition. |
boolean |
isUndefined()
Returns whether the current value is undefined. |
byte[] |
removeBinary(int i)
Removes the i th element and returns the binary value removed. |
void |
setPolicy(IPolicy policy)
Allows dynamic privacy policy constraints to be applied in the form of a WS-Policy. |
java.lang.String |
toString()
|
| Methods inherited from class java.util.ArrayList |
|---|
clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.openliberty.arisid.IAttributeValue |
|---|
get, iterator, remove, size |
| Methods inherited from interface java.util.List |
|---|
containsAll, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public AttributeValue(java.lang.String attrRefId)
IAttributeValue using an Attribute Reference
Identifier (the name of a declared attribute). When this constructor is
used, the AttributeValue will initially have the state of "undefined"
until one of the add(String) or addAll(Collection)
methods is called. To create an empty AttributeValue use the constructor
AttributeValue(String, List) with an empty list parameter.
attrRefId - The attribute definition that this AttributeValue is based on.
public AttributeValue(AttributeDef attr,
java.util.List<java.lang.String> vals)
attr - The attribute definition (AttributeDef)vals - String value(s) of the attribute. Passing a null shall mean that the AttributeValue is "undefined" (see isUndefined()).
public AttributeValue(AttributeDef attr,
java.lang.String value)
attr - The Attribute definition of the attribute being returnedvalue - A single value for the attribute. Passing a null shall mean that the AttributeValue is "undefined" (see isUndefined()).
public AttributeValue(java.lang.String attrId,
java.util.List<java.lang.String> vals)
attrId - The attribute definition name id.vals - String value(s) of the attribute. Passing a null shall mean that the AttributeValue is "undefined" (see isUndefined()).
public AttributeValue(java.lang.String attrId,
java.lang.String value)
attrId - The attribute definition name id.value - A single value for the attribute. Passing a null shall mean that the AttributeValue is "undefined" (see isUndefined()).
public AttributeValue(java.lang.String name,
java.lang.Exception error)
name - The name of the attribute being returned.error - The exception (typically
IGFException)
that occurred preventing returning the attribute result
public AttributeValue(AttributeDef attr,
java.lang.Exception error)
attr - The definition of the attribute being returned.error - The exception (typically
IGFException)
that occurred preventing returning the attribute result| Method Detail |
|---|
public boolean isError()
IAttributeValue
isError in interface IAttributeValuepublic boolean isUndefined()
IAttributeValueAttributeValue.
isUndefined in interface IAttributeValuepublic java.lang.Exception getError()
IAttributeValue
getError in interface IAttributeValuepublic java.lang.String getNameIdRef()
IAttributeValue
getNameIdRef in interface IAttributeValuepublic java.lang.Object[] getBinaryValues()
public int hashCode()
hashCode in interface java.util.Collection<java.lang.String>hashCode in interface java.util.List<java.lang.String>hashCode in class java.util.AbstractList<java.lang.String>public boolean equals(java.lang.Object obj)
equals in interface java.util.Collection<java.lang.String>equals in interface java.util.List<java.lang.String>equals in interface IAttributeValueequals in class java.util.AbstractList<java.lang.String>public java.lang.String toString()
toString in class java.util.AbstractCollection<java.lang.String>public boolean compareAttributeValueExact(AttributeValue val)
compareValueExact(IAttributeValue) instead
val - An AttributeValue object to be compared containing one or more
values
public boolean compareValueExact(IAttributeValue val)
compareValueExact in interface IAttributeValueval - An AttributeValue object to be compared containing one or more
values
public boolean compareAttributeValueIgnoreCaseExact(AttributeValue val)
compareValueIgnoreCaseExact(IAttributeValue) instead
val - An AttributeValue object to be compared containing one or more
values
public boolean compareValueIgnoreCaseExact(IAttributeValue val)
compareValueIgnoreCaseExact in interface IAttributeValueval - An AttributeValue object to be compared containing one or more
values
public boolean compare(java.lang.String val)
compare in interface IAttributeValueval - to be compared
IAttributeValue.compareValueExact(IAttributeValue).public boolean compareIgnoreCase(java.lang.String val)
public int getValueType()
IAttributeValue
getValueType in interface IAttributeValueIAttributeValue.VALUE_TYPE_UNDEFINED, IAttributeValue.VALUE_TYPE_EMPTY,
IAttributeValue.VALUE_TYPE_SINGLE, or IAttributeValue.VALUE_TYPE_MULTI.
public void add(int index,
java.lang.String element)
add in interface java.util.List<java.lang.String>add in class java.util.ArrayList<java.lang.String>public boolean add(java.lang.String o)
IAttributeValue
add in interface java.util.Collection<java.lang.String>add in interface java.util.List<java.lang.String>add in interface IAttributeValueadd in class java.util.ArrayList<java.lang.String>public boolean addAll(java.util.Collection<? extends java.lang.String> c)
addAll in interface java.util.Collection<java.lang.String>addAll in interface java.util.List<java.lang.String>addAll in class java.util.ArrayList<java.lang.String>
public boolean addAll(int index,
java.util.Collection<? extends java.lang.String> c)
addAll in interface java.util.List<java.lang.String>addAll in class java.util.ArrayList<java.lang.String>public void setPolicy(IPolicy policy)
IAttributeValue
setPolicy in interface IAttributeValuepolicy - Privacy constraints in a WS-Policy (IPolicy) container.
To parse/set dynamic constraints, use the
PolicyHandler
class.public IPolicy getPolicy()
IAttributeValueDigitalSubject.getAttributeValue(String), it contains
transactional constraints specified by the attribute authority.
getPolicy in interface IAttributeValueIPolicy) container. To
parse/set transactional constraints, use the
PolicyHandler
class.public boolean contains(java.lang.String value)
IAttributeValue
contains in interface IAttributeValuepublic static java.lang.String base64Encode(byte[] value)
value - Binary Value to be encoded in byte array
public static byte[] base64Decode(java.lang.String value)
value - Base64 encoded string
public boolean addBinary(byte[] value)
IAttributeValue
addBinary in interface IAttributeValuepublic boolean containsBinary(byte[] value)
IAttributeValue
containsBinary in interface IAttributeValuepublic byte[] getBinary(int i)
IAttributeValue
getBinary in interface IAttributeValuei - The element to return (where 0 is the first element)
public byte[] removeBinary(int i)
IAttributeValue
removeBinary in interface IAttributeValuei - The element to remove (where 0 is the first)
|
OpenLiberty.org - Licensed under Apache APL 2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||