com.tivoli.mts
Class PDAttrs

java.lang.Object
  extended by com.tivoli.pd.jutil.PDEnvironmentObject
      extended by com.tivoli.mts.PDAttrs
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class PDAttrs
extends com.tivoli.pd.jutil.PDEnvironmentObject
implements java.lang.Cloneable, java.io.Serializable

This class represents what would be known in the C APIs of Policy Director as an Attrlist, or attribute list. The individual attributes have String names. Values for an attribute may either be Strings or byte arrays. 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.

NOTE: As of IBM Tivoli Access Manager for e-business v5.1, this entire class is deprecated. Equivalent function is in the com.tivoli.pd.jutil.PDAttrs class.

See Also:
PDAttrs, Serialized Form

Constructor Summary
PDAttrs()
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the PDAttrs(boolean) constructor in the PDAttrs class.
PDAttrs(boolean allowDuplicates)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the equivalent constructor in the PDAttrs class.
PDAttrs(boolean allowDuplicates, int initialCapacity)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the equivalent constructor in the PDAttrs class.
PDAttrs(boolean allowDuplicates, int initialCapacity, float loadFactor)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the equivalent constructor in the PDAttrs class.
PDAttrs(int initialCapacity)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the equivalent constructor in the PDAttrs class.
PDAttrs(int initialCapacity, float loadFactor)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the equivalent constructor in the PDAttrs class.
PDAttrs(PDAttrs that)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the equivalent constructor in the PDAttrs class.
 
Method Summary
 java.util.Collection add(java.lang.String name, byte[] value)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 java.util.Collection add(java.lang.String name, java.util.Collection vals)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 java.util.Collection add(java.lang.String name, java.lang.Long value)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 java.util.Collection add(java.lang.String name, PDAdmSvcPobj value)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 java.util.Collection add(java.lang.String name, PDAttrValues vals)
          Deprecated. Use add instead
 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.
 void addAll(PDAttrs attrs)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 boolean allowDups()
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 void clear()
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 java.lang.Object clone()
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 boolean delete(java.lang.String key)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 java.util.Set entrySet()
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 boolean equals(java.lang.Object obj)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 PDAttrValues get(java.lang.String key)
          Deprecated. Use getValues instead
 int getQoP()
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 java.util.Collection getValues(java.lang.String key)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 int hashCode()
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 java.util.Set keySet()
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 void setQoP(int qop)
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 int size()
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 java.lang.String toString()
          Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.
 
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

PDAttrs

public PDAttrs()
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the PDAttrs(boolean) constructor in the PDAttrs class.

Constructs a new, empty PDAttrs with default allowDups (false) and default capacity and load factor, which is 0.75.


PDAttrs

public PDAttrs(int initialCapacity)
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the equivalent constructor in the PDAttrs class.

Constructs a new, empty PDAttrs with the specified initial capacity and default load factor, which is 0.75.

Parameters:
initialCapacity - the initial capacity of thePDAttrs

PDAttrs

public PDAttrs(int initialCapacity,
               float loadFactor)
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the equivalent constructor in the PDAttrs class.

Constructs a new, empty map with the specified initial capacity and the specified load factor.

Parameters:
initialCapacity - the initial capacity of thePDAttrs
loadFactor - the load factor, which is a measure of how full the PDAttrs is allowed to get before its capacity is automatically increased. The default is .75.

PDAttrs

public PDAttrs(boolean allowDuplicates)
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the equivalent constructor in the PDAttrs class.

Constructs a new, empty PDAttrs that specifies whether the value for each attribute can consist of an unordered list that allows duplicate items. The PDAttrs will have the default load factor (.75).

Parameters:
allowDuplicates - A boolean indicating whether each attribute value can be an unordered list that allows duplicate items

PDAttrs

public PDAttrs(boolean allowDuplicates,
               int initialCapacity)
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the equivalent constructor in the PDAttrs class.

Constructs a new, empty PDAttrs that specifies whether the value for each attribute can consist of an unordered list that allows duplicate items. The PDAttrs will have the specified initial capacity and the default load factor (.75).

Parameters:
allowDuplicates - A boolean indicating whether each attribute value can be an unordered list that allows duplicate items
initialCapacity - the initial capacity of thePDAttrs

PDAttrs

public PDAttrs(boolean allowDuplicates,
               int initialCapacity,
               float loadFactor)
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the equivalent constructor in the PDAttrs class.

Constructs a new, empty PDAttrs that specifies whether the value for each attribute can consist of an unordered list that allows duplicate items. The PDAttrs will have the specified capacity and the specified load factor.

Parameters:
allowDuplicates - A boolean indicating whether each attribute value can be an unordered list that allows duplicate items
initialCapacity - the initial capacity of thePDAttrs
loadFactor - the load factor, which is a measure of how full the PDAttrs is allowed to get before its capacity is automatically increased. The default is .75.

PDAttrs

public PDAttrs(PDAttrs that)
        throws java.lang.NullPointerException,
               java.lang.ClassCastException
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this constructor is replaced by the equivalent constructor in the PDAttrs class.

Constructs a new PDAttrs containing the elements in the specified PDAttrs.

Parameters:
that - the PDAttrs whose elements are to be placed into this PDAttrs
Throws:
java.lang.NullPointerException - if no PDAttrs is passed in
java.lang.ClassCastException - if one or more of the elements in the PDAttrs to be added are not PDAttr objects
Method Detail

add

public java.util.Collection add(java.lang.String name,
                                PDAttrValues vals)
Deprecated. Use add instead

Associates the specified values with the specified name in this PDAttrs. If this PDAttrs previously contained values for the name, then the input values are added to the values already known for the name.

Parameters:
name - the name of the attribute
vals - the new values to be associated with the name
Returns:
the previous values associated with the name, or null if no values were previously known for the name.
Throws:
java.lang.NullPointerException - on parameter errors.

add

public java.util.Collection add(java.lang.String name,
                                java.util.Collection vals)
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Associates the specified values with the specified name in this PDAttrs. If this PDAttrs previously contained values for the name, then the input values are added to the values already known for the name.

Parameters:
name - the name of the attribute
vals - the new values to be associated with the name. Must be either a PDAttrValues or a PDAttrValueList
Returns:
the previous values associated with the name, or null if no values were previously known for the name.
Throws:
java.lang.NullPointerException - on parameter errors.

add

public 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. If this PDAttrs previously contained values for this name, then the input value is added to the values already known for the name.

Parameters:
name - the name of the attribute
value - the new String value to be added for the name
Returns:
the previous values associated with the name, or null if no values were previously known for the name.
Throws:
java.lang.NullPointerException - on parameter errors.

add

public java.util.Collection add(java.lang.String name,
                                java.lang.Long value)
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Adds the specified Long value to the collection of values for the specified name in this PDAttrs. If this PDAttrs previously contained values for the name, then the input value is added to the values already known for the name.

Parameters:
name - the name of the attribute
value - the new Long value to be added for the name
Returns:
the previous values associated with the name, or null if no values were previously known for the name.
Throws:
java.lang.NullPointerException - on parameter errors.

add

public java.util.Collection add(java.lang.String name,
                                PDAdmSvcPobj value)
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Adds the specified PDAdmSvcPobj value to the collection of values for the specified name in this PDAttrs. If this PDAttrs previously contained values for this name, then the input value is added to the values already known for the name.

Parameters:
name - the name of the attribute
value - the new PDAdmSvcPobj value to be added for the name
Returns:
the previous values associated with the name, or null if no values were previously known for the name.
Throws:
java.lang.NullPointerException - on parameter errors.

add

public java.util.Collection add(java.lang.String name,
                                byte[] value)
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Adds the specified byte array value to the collection of values for the specified name in this PDAttrs. If this PDAttrs previously contained values for the name, then the input value is added to the values already known for the name.

Parameters:
name - the name of the attribute
value - the new byte array value to be added for the name
Returns:
the previous values associated with the name, or null if no values were previously known for the name
Throws:
java.lang.NullPointerException - on parameter errors.

addAll

public void addAll(PDAttrs attrs)
            throws java.lang.NullPointerException,
                   java.lang.ClassCastException
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Adds all of the elements in the specified PDAttrs to this PDAttrs. The behavior of this operation is undefined if the specified PDAttrs is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified PDAttrs is this PDAttrs, and this PDAttrs is nonempty.) This implementation iterates over the specified PDAttrs, and adds each PDAttr returned by the iterator to this map, in turn.

Parameters:
attrs - the PDAttrs to be added
Throws:
java.lang.NullPointerException - if no PDAttrs is passed
java.lang.ClassCastException

clear

public void clear()
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Clear the current PDAttrs. Remove all mappings in the current PDAttrs, reset QoP to zero, and reset the version number to the current supported level. Leave allowDups as it was when the PDAttrs was originally created.


delete

public boolean delete(java.lang.String key)
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Remove the named attribute from the PDAttrs.

Parameters:
key - the name of the attribute to be removed.
Returns:
true if the attribute was in the PDAttrs

clone

public java.lang.Object clone()
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Clone the current PDAttrs. This is implemented as a deep copy.

Overrides:
clone in class java.lang.Object

entrySet

public java.util.Set entrySet()
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Return a Set view of the entries in the PDAttrs. Modifications to the Set will result in modifications to the underlying PDAttrs.

Returns:
a Set containing the entries in the PDAttrs

equals

public boolean equals(java.lang.Object obj)
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Indicates whether some other Object is equal to this one. In particular, this implementation checks that the QoP, version, and allowDups are the same, and then defers to the equals check, which will devolve into a containsAll check on the current PDAttrs set

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to be compared to this one
Returns:
true if the PDAttrs are identical, false otherwise.

get

public PDAttrValues get(java.lang.String key)
Deprecated. Use getValues instead

Returns the value(s) to which this PDAttrs maps the specified key. Returns null if the PDAttrs contains no mapping for the specified key.

Parameters:
key - key whose associated value(s) is/are to be returned.
Returns:
the value(s) to which this PDAttrs maps the specified key.

getValues

public java.util.Collection getValues(java.lang.String key)
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Returns the value(s) to which this PDAttrs maps the specified key. Returns null if the PDAttrs contains no mapping for the specified key.

Parameters:
key - key whose associated value(s) is/are to be returned.
Returns:
the value(s) to which this PDAttrs maps the specified key.

getQoP

public int getQoP()
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Returns the current value of QoP

Returns:
the current value of QoP

allowDups

public boolean allowDups()
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Returns the current value of allowDups

Returns:
the current value of allowDups

hashCode

public int hashCode()
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Returns a hashcode for the current object.

Overrides:
hashCode in class java.lang.Object
Returns:
a hashcode for the current object.

keySet

public java.util.Set keySet()
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Returns a set view of the keys contained in this PDAttrs. The set is backed by the map, so changes to the PDAttrs are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from this PDAttrs, via the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.

Returns:
a set view of the keys contained in this PDAttrs.

setQoP

public void setQoP(int qop)
            throws java.lang.IllegalArgumentException
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Sets the current value of QoP

Throws:
java.lang.IllegalArgumentException - if the QoP value is unknown

size

public int size()
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Returns the number of key-values mappings in the current PDAttrs. Note that is equivalent to the number of keys in the PDAttrs, not the number of values, as a multivalue key counts as only one key.

Returns:
the number of key-values mappings in the current PDAttrs.

toString

public java.lang.String toString()
Deprecated. As of IBM Tivoli Access Manager for e-business v5.1, this method is replaced by the equivalent method in the PDAttrs class.

Return a string version of this object.

Overrides:
toString in class java.lang.Object
Returns:
a String representing this object