Class Attribute

  • Direct Known Subclasses:
    Name, Uid

    public class Attribute
    extends java.lang.Object
    Represents a named collection of values within a target object, although the simplest case is a name-value pair (e.g., email, employeeID). Values can be empty, null, or set with various types. Empty and null are supported because it makes a difference on some resources (in particular database resources).

    The developer of a Connector should use an AttributeBuilder to construct an instance of Attribute.

    The precise meaning of an instance of Attribute depends on the context in which it occurs.

    • When an object is read or is returned by search, an Attribute represents the complete state of an attribute of the target object, current as of the point in time that the object was read.
    • When an Attribute is supplied to the update operation, the Attribute represents a change to the corresponding attribute of the target object:
      • For calls to update, the Attribute contains the complete, intended state of the attribute.
      • When the update type is addAttributeValues, the Attribute contains values to append.
      • When the update type is removeAttributeValues, the Attribute contains values to remove.
    • When an Attribute is used to build a Filter that is an argument to search, an Attribute represents a subset of the current state of an attribute that will be used as a search criterion. Specifically, the Attribute names the attribute to match and contains the values to match.
    TODO: define the set of allowed values
    Since:
    1.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getName()  
      java.util.List<java.lang.Object> getValue()  
      int hashCode()  
      boolean is​(java.lang.String name)
      Determines if the 'name' matches this Attribute.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getName

        public java.lang.String getName()
      • getValue

        public java.util.List<java.lang.Object> getValue()
      • is

        public boolean is​(java.lang.String name)
        Determines if the 'name' matches this Attribute.
        Parameters:
        name - case insensitive string representation of the attribute's name.
        Returns:
        true if the case insentitive name is equal to that of the one in Attribute.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public final boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object