Oracle Entitlements Server for Java API Reference

com.bea.security
Class NameAttributeValue

java.lang.Object
  |
  +--com.bea.security.NameAttributeType
        |
        +--com.bea.security.NameAttributeValue

public class NameAttributeValue
extends NameAttributeType
implements com.bea.security.spi.NameValueType

This class provides a way to encapsulate a name/value pair that is associated with a naming authority. In addition to a value, this class also contains a type, a name, and a naming authority name.

Author:
Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.
See Also:
NameAttributeType, NamingAuthority

Field Summary
protected  java.lang.String value
          The value of this attribute.
 
Fields inherited from class com.bea.security.NameAttributeType
authName, MULTI_TOKEN, MULTI_VALUE_PREFIX, MULTI_VALUE_TERMINAL, name, SINGLE_VALUE, SINGLE_VALUE_PREFIX, SINGLE_VALUE_TERMINAL, type_id
 
Constructor Summary
NameAttributeValue(int id, java.lang.String attrname)
          Constructs a new attribute value given a type id and an attribute name.
NameAttributeValue(int id, java.lang.String attrname, java.lang.String authorityname)
          Constructs a new attribute value given a type id, attribute name, and authority name.
NameAttributeValue(int id, java.lang.String attrname, java.lang.String authorityname, java.lang.String attrvalue)
          Constructs a new attribute value given a type id, attribute name, authority name, and the value.
NameAttributeValue(NameAttributeType attr)
          Constructs a new attribute value copied from another NameAttributeType or NameAttributeValue.
 
Method Summary
 boolean equals(java.lang.Object another)
          Determines if an object is equal to this attribute value.
 java.lang.String getValue()
          Gets the value of this attribute.
 
Methods inherited from class com.bea.security.NameAttributeType
getAuthorityName, getName, getType, getTypeIDFromString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

protected java.lang.String value
The value of this attribute.
Constructor Detail

NameAttributeValue

public NameAttributeValue(int id,
                          java.lang.String attrname)
Constructs a new attribute value given a type id and an attribute name.

Parameters:
id - the attribute type id is one of SINGLE_VALUE_PREFIX, MULTI_VALUE_PREFIX, SINGLE_VALUE, MULTI_TOKEN, SINGLE_VALUE_TERMINAL, MULTI_VALUE_TERMINAL. This type id determines where this attribute is allowed to be positioned within a name.
attrname - the name of the attribute.

NameAttributeValue

public NameAttributeValue(int id,
                          java.lang.String attrname,
                          java.lang.String authorityname)
Constructs a new attribute value given a type id, attribute name, and authority name.

Parameters:
id - the attribute type id is one of SINGLE_VALUE_PREFIX, MULTI_VALUE_PREFIX, SINGLE_VALUE, MULTI_TOKEN, SINGLE_VALUE_TERMINAL, MULTI_VALUE_TERMINAL. This type id determines where this attribute is allowed to be positioned within a name.
attrname - the name of the attribute.
authorityname - the name of the naming authority that defines the format of this attribute.

NameAttributeValue

public NameAttributeValue(int id,
                          java.lang.String attrname,
                          java.lang.String authorityname,
                          java.lang.String attrvalue)
Constructs a new attribute value given a type id, attribute name, authority name, and the value.

Parameters:
id - the attribute type id is one of SINGLE_VALUE_PREFIX, MULTI_VALUE_PREFIX, SINGLE_VALUE, MULTI_TOKEN, SINGLE_VALUE_TERMINAL, MULTI_VALUE_TERMINAL. This type id determines where this attribute is allowed to be positioned within a name.
attrname - the name of the attribute.
authorityname - the name of the naming authority that defines the format of this attribute.
attrvalue - the value of this attribute.

NameAttributeValue

public NameAttributeValue(NameAttributeType attr)
Constructs a new attribute value copied from another NameAttributeType or NameAttributeValue. If a NameAttributeValue is passed in, its value will be copied as well as the name, type and authority.

Parameters:
attr - another NameAttributeType or NameAttributeValue from which to copy the settings.
Method Detail

getValue

public java.lang.String getValue()
Gets the value of this attribute.
Specified by:
getValue in interface com.bea.security.spi.NameValueType

Returns:
the value of this attribute.

equals

public boolean equals(java.lang.Object another)
Determines if an object is equal to this attribute value. Objects (this object and another object) are equal if their type id is the same, their name is the same, and their naming authority is the same.

Parameters:
another - an object to check for equality.
Returns:
true if the objects are equal; otherwise returns false.
Overrides:
equals in class NameAttributeType