|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.pd.jutil.PDEnvironmentObject
com.tivoli.pd.jutil.PDAttrs
public class PDAttrs
This class represents an attribute list. It is the Java equivalent of the attribute list described in the Security Access Manager Authorization C API Developer Reference. The individual attributes have String names. Current supported value types are String, byte array, Long, and PDAdmSvcPobj. PDAttrs allows an attribute to have more than one value, so attempting to add a value to a name that already has been added to a PDAttrs will result in a multi-valued attribute. PDAttrs, if constructed to do so, will allow duplicate entries in the multi-valued attributes. The attribute list can also handle attribute name strings ignoring case.
Modes: Local,Remote
Constructor Summary | |
---|---|
PDAttrs(PDAttrs that)
Constructs a new PDAttrs containing the elements in the specified PDAttrs. |
|
PDAttrs(PDBasicContext context)
Constructs a new, empty PDAttrs with the specified initial capacity and default load factor, which is 0.75. |
|
PDAttrs(PDBasicContext context,
com.tivoli.pd.jasn1.attrlist_t alt)
Constructs a PDAttrs from the internal attrlist type. |
|
PDAttrs(PDBasicContext context,
boolean allowDuplicates)
Constructs a new, empty PDAttrs that specifies whether the value for each attribute can consist of an unordered list that allows duplicate items. |
|
PDAttrs(PDBasicContext context,
byte[] serverData)
Creates a PDAttrs from the data returned from the Policy Director server. |
Method Summary | |
---|---|
java.util.Collection |
add(java.lang.String name,
byte[] value)
Adds the specified byte array value to the collection of values for the specified name in this PDAttrs. |
java.util.Collection |
add(java.lang.String name,
byte[] value,
boolean ignoreCase)
See add(String, byte[]) |
java.util.Collection |
add(java.lang.String name,
java.util.Collection vals)
Associates the specified values with the specified name in this PDAttrs. |
java.util.Collection |
add(java.lang.String name,
java.util.Collection vals,
boolean ignoreCase)
See add(String, Collection) |
java.util.Collection |
add(java.lang.String name,
java.lang.Long value)
Adds the specified Long value to the collection of values for the specified name in this PDAttrs. |
java.util.Collection |
add(java.lang.String name,
java.lang.Long value,
boolean ignoreCase)
See add(String, Long) |
java.util.Collection |
add(java.lang.String name,
PDAdmSvcPobj value)
Adds the specified PDAdmSvcPobj value to the collection of values for the specified name in this PDAttrs. |
java.util.Collection |
add(java.lang.String name,
PDAdmSvcPobj value,
boolean ignoreCase)
See add(String, PDAdmSvcPobj) |
java.util.Collection |
add(java.lang.String name,
PDAttrValues vals)
Deprecated. Use add(String, Collection) instead |
java.util.Collection |
add(java.lang.String name,
PDAttrValues vals,
boolean ignoreCase)
See add(String, PDAttrValues) |
java.util.Collection |
add(java.lang.String name,
java.lang.String value)
Adds the specified String value to the collection of values for the specified name in this PDAttrs. |
java.util.Collection |
add(java.lang.String name,
java.lang.String val,
boolean ignoreCase)
See add(String, String) |
void |
addAll(PDAttrs attrs)
Adds all of the elements in the specified PDAttrs to this PDAttrs. |
boolean |
allowDups()
Returns the current value of allowDups. |
void |
clear()
Clears the current PDAttrs. |
java.lang.Object |
clone()
Clones the current PDAttrs. |
boolean |
delete(java.lang.String key)
Removes the named attribute from the PDAttrs. |
boolean |
delete(java.lang.String key,
boolean ignoreCase)
See delete(String) |
java.util.Set |
entrySet()
Return a Set view of the entries in the PDAttrs. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other Object is equal to this one. |
PDAttrValues |
get(java.lang.String key)
Deprecated. Use getValues(String) instead. |
com.tivoli.pd.jasn1.attrlist_t |
getAttrlist_t()
Return this PDAttrs as an attrlist_t |
void |
getAttrlist_t(com.tivoli.pd.jasn1.attrlist_t alt)
Add the contents of this PDAttrs to the attrlist_t data structure alt |
java.lang.String[] |
getNames(boolean upperCase)
Return the keys in a string array. |
int |
getQoP()
Returns the current value of QoP. |
java.util.Collection |
getValues(java.lang.String key)
Returns the value(s) to which this PDAttrs maps the specified key. |
java.util.Collection |
getValues(java.lang.String key,
boolean ignoreCase)
See getValues(String) |
int |
hashCode()
Returns a hashcode for the current object. |
java.util.HashSet |
iKeySet()
Return the keys HashSet in upper-cased strings. |
java.util.Set |
keySet()
Returns a set view of the keys contained in this PDAttrs. |
void |
setAttrlist_t(com.tivoli.pd.jasn1.attrlist_t alt)
Set the contents of this PDAttrs to the attrlist_t data structure alt |
void |
setQoP(int qop)
Sets the current value of QoP. |
int |
size()
Returns the number of key-values mappings in the current PDAttrs. |
java.lang.String |
toString()
Returns a String representation of this object. |
Methods inherited from class com.tivoli.pd.jutil.PDEnvironmentObject |
---|
getContext, setContext |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PDAttrs(PDBasicContext context) throws PDException
context
- the context that defines values for
logging and tracing. Cannot be null.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public PDAttrs(PDBasicContext context, boolean allowDuplicates) throws PDException
context
- the context that defines values for
logging and tracing. Cannot be null.allowDuplicates
- A boolean indicating whether each attribute
value can be an unordered list that allows duplicate items.
PDException
- if an error occurs.
This exception may contain error and message codes defined in the
product Error Message Reference document.public PDAttrs(PDAttrs that) throws PDException
that
- the PDAttrs whose elements are to be placed
into this PDAttrs.
PDException
- if one or more of the elements in the PDAttrs
to be added are not PDAttr objects, or if no
PDAttrs is passed in.
This exception may contain error and message codes defined in the
product Error Message Reference document.public PDAttrs(PDBasicContext context, byte[] serverData) throws PDException
context
- the context that defines values for
logging and tracing. Cannot be null.serverData
- ASN.1 rendition of an Attrlist.
PDException
public PDAttrs(PDBasicContext context, com.tivoli.pd.jasn1.attrlist_t alt) throws PDException
context
- the context that defines values for
logging and tracing. Cannot be null.alt
- attrlist_t.
PDException
Method Detail |
---|
public java.util.HashSet iKeySet()
public java.lang.String[] getNames(boolean upperCase)
upperCase
- Specify if the keys should be returned upper-cased.public java.util.Collection add(java.lang.String name, PDAttrValues vals, boolean ignoreCase) throws PDException
add(String, PDAttrValues)
ignoreCase
- Specify if the name should be addeded ignoring case.
PDException
public java.util.Collection add(java.lang.String name, java.util.Collection vals, boolean ignoreCase) throws PDException
add(String, Collection)
ignoreCase
- Specify if the name should be addeded ignoring case.
PDException
public java.util.Collection add(java.lang.String name, java.lang.String val, boolean ignoreCase) throws PDException
add(String, String)
ignoreCase
- Specify if the name should be added ignoring case.
PDException
public java.util.Collection add(java.lang.String name, java.lang.Long value, boolean ignoreCase) throws PDException
add(String, Long)
ignoreCase
- Specify if the name should be addeded ignoring case.
PDException
public java.util.Collection add(java.lang.String name, PDAdmSvcPobj value, boolean ignoreCase) throws PDException
add(String, PDAdmSvcPobj)
ignoreCase
- Specify if the name should be added ignoring case.
PDException
public java.util.Collection add(java.lang.String name, byte[] value, boolean ignoreCase) throws PDException
add(String, byte[])
ignoreCase
- Specify if the name should be added ignoring case.
PDException
public boolean delete(java.lang.String key, boolean ignoreCase)
delete(String)
ignoreCase
- Specify if the name should be added ignoring case.public java.util.Collection getValues(java.lang.String key, boolean ignoreCase)
getValues(String)
ignoreCase
- Specify if the name should be added ignoring case.public java.util.Collection add(java.lang.String name, PDAttrValues vals) throws PDException
add(String, Collection)
instead
name
- the name of the attribute.vals
- the new values to be associated with the name.
PDException
- on parameter errors.
This exception may contain error and message codes defined in the
product Error Message Reference document.public java.util.Collection add(java.lang.String name, java.util.Collection vals) throws PDException
name
- the name of the attribute.vals
- the new values to be associated with the name. Must
be either a PDAttrValues
or a
PDAttrValueList
.
PDException
- on parameter errors.
This exception may contain error and message codes defined in the
product Error Message Reference document.public java.util.Collection add(java.lang.String name, java.lang.String value) throws PDException
name
- the name of the attribute.value
- the new String value to be added for the name.
PDException
- if the input value contains an object
other than a PDAttrValue, or on parameter errors.
This exception may contain error and message codes defined in the
product Error Message Reference document.public java.util.Collection add(java.lang.String name, java.lang.Long value) throws PDException
name
- the name of the attribute.value
- the new Long value to be added for the name.
PDException
- if the input value contains an object
other than a PDAttrValue, or on parameter errors.
This exception may contain error and message codes defined in the
product Error Message Reference document.public java.util.Collection add(java.lang.String name, PDAdmSvcPobj value) throws PDException
name
- the name of the attribute.value
- the new PDAdmSvcPobj value to be added for the name.
PDException
- if the input contains an object
other than a PDAttrValue, or on parameter errors.
This exception may contain error and message codes defined in the
product Error Message Reference document.public java.util.Collection add(java.lang.String name, byte[] value) throws PDException
name
- the name of the attribute.value
- the new byte array value to be added for the name.
PDException
- if the input value contains an object
other than a PDAttrValue, or on parameter errors.
This exception may contain error and message codes defined in the
product Error Message Reference document.public void addAll(PDAttrs attrs) throws PDException
attrs
- the PDAttrs to be added.
PDException
- if no PDAttrs is passed.
This exception may contain error and message codes defined in the
product Error Message Reference document.public void clear()
public boolean delete(java.lang.String key)
key
- the name of the attribute to be removed.
true
if the attribute was in the PDAttrspublic java.lang.Object clone()
clone
in class java.lang.Object
public java.util.Set entrySet()
public boolean equals(java.lang.Object obj)
equals
check, which will
devolve into a containsAll check on the current PDAttrs set.
equals
in class java.lang.Object
obj
- the object to be compared to this one.
true
if the PDAttrs are identical,
false
otherwise.public PDAttrValues get(java.lang.String key) throws PDException
getValues(String)
instead.
null
if the PDAttrs contains no mapping for
the specified key.
key
- key whose associated value(s) is/are to be returned.
Throws
- PDException.
This exception may contain error and message codes defined in the
product Error Message Reference document.
PDException
public java.util.Collection getValues(java.lang.String key)
null
if the PDAttrs contains no mapping for
the specified key.
key
- key whose associated value(s) is/are to be returned.public int getQoP()
public boolean allowDups()
public int hashCode()
hashCode
in class java.lang.Object
public java.util.Set keySet()
public void setQoP(int qop) throws PDException
qop
- the new value for QoP.
PDException
- if the QoP value is unknown.
This exception may contain error and message codes defined in the
product Error Message Reference document.public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public com.tivoli.pd.jasn1.attrlist_t getAttrlist_t() throws PDException
PDException
public void getAttrlist_t(com.tivoli.pd.jasn1.attrlist_t alt) throws PDException
alt
- attrlist_t type
PDException
public void setAttrlist_t(com.tivoli.pd.jasn1.attrlist_t alt) throws PDException
alt
- attrlist_t type
PDException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |