Oracle Entitlements Server for Java API Reference

com.bea.security
Class NameAttributeType

java.lang.Object
  |
  +--com.bea.security.NameAttributeType
Direct Known Subclasses:
NameAttributeValue

public class NameAttributeType
extends java.lang.Object

This class represents a field within a name as defined by a naming authority. This attribute determines the placement of that field within the name and its associated sub-authority, if present.

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

Field Summary
protected  java.lang.String authName
          The name of the authority that governs this attribute.
static int MULTI_TOKEN
          MULTI_TOKEN is a single name/multi value pair that is included in a name.This attribute represents any leftover fields within a name after prefix attributes, terminal attributes, and single attributes are determined.
static int MULTI_VALUE_PREFIX
          MULTI_VALUE_PREFIX is a single name/muliple value pair that is included in the first part of a name.
static int MULTI_VALUE_TERMINAL
          MULTI_VALUE_TERMINAL is a single name/multiple value pair that is included in the last part of a name.
protected  java.lang.String name
          This attribute's name.
static int SINGLE_VALUE
          SINGLE_VALUE is a single name/value pair that is included in a name.
static int SINGLE_VALUE_PREFIX
          SINGLE_VALUE_PREFIX is a single name/value pair that is included in the first part of a name.
static int SINGLE_VALUE_TERMINAL
          SINGLE_VALUE_TERMINAL is a single name/value pair that is included in the last part of a name.
protected  int type_id
          The attribute type id.
 
Constructor Summary
NameAttributeType(int id, java.lang.String attrname)
          Constructs a new attribute given its type and name.
NameAttributeType(int id, java.lang.String attrname, java.lang.String authorityname)
          Constructs a new attribute given its type, name and the name of its associated authority.
NameAttributeType(NameAttributeType attr)
          Constructs a new attribute type copied from another.
 
Method Summary
 boolean equals(java.lang.Object another)
          Determines if an object is equal to this attribute value.
 java.lang.String getAuthorityName()
          Gets our naming authority's name.
 java.lang.String getName()
          Gets this attribute's name.
 int getType()
          Gets this attribute's type.
static int getTypeIDFromString(java.lang.String idname)
          Converts attribute type names to their numeric id.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLE_VALUE_PREFIX

public static final int SINGLE_VALUE_PREFIX
SINGLE_VALUE_PREFIX is a single name/value pair that is included in the first part of a name. Prefix attributes MUST be the first types of attributes within the name, but there may be more than one of them (single- or multi-value).

MULTI_VALUE_PREFIX

public static final int MULTI_VALUE_PREFIX
MULTI_VALUE_PREFIX is a single name/muliple value pair that is included in the first part of a name. Prefix attributes MUST be the first types of attributes within the name, but there may be more than one of them (single- or multi-value). Multi-value attributes also define an optional authority for how the values within it are structured and parsed.

SINGLE_VALUE_TERMINAL

public static final int SINGLE_VALUE_TERMINAL
SINGLE_VALUE_TERMINAL is a single name/value pair that is included in the last part of a name. Terminal attributes MUST be the last attributes within a name, but there may be more than one of them (single- or multi-value).

MULTI_VALUE_TERMINAL

public static final int MULTI_VALUE_TERMINAL
MULTI_VALUE_TERMINAL is a single name/multiple value pair that is included in the last part of a name. Terminal attributes MUST be the last attributes within a name, but there may be more than one of them (single- or multi-value). Multi value attributes also define an optional authority for how the values within it are structured and parsed.

SINGLE_VALUE

public static final int SINGLE_VALUE
SINGLE_VALUE is a single name/value pair that is included in a name. This attribute represents a single field within a name and is determined by place value after prefix attributes and terminal attributes are determined.

MULTI_TOKEN

public static final int MULTI_TOKEN
MULTI_TOKEN is a single name/multi value pair that is included in a name.This attribute represents any leftover fields within a name after prefix attributes, terminal attributes, and single attributes are determined. There can be only ONE multitoken attribute within a name.

type_id

protected int type_id
The attribute type id.

name

protected java.lang.String name
This attribute's name.

authName

protected java.lang.String authName
The name of the authority that governs this attribute.
Constructor Detail

NameAttributeType

public NameAttributeType(int id,
                         java.lang.String attrname)
Constructs a new attribute given its type and 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.

NameAttributeType

public NameAttributeType(int id,
                         java.lang.String attrname,
                         java.lang.String authorityname)
Constructs a new attribute given its type, name and the name of its associated authority.

Parameters:
id - the attribute type if 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 authority that defines the format of this attribute.

NameAttributeType

public NameAttributeType(NameAttributeType attr)
Constructs a new attribute type copied from another.

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

getTypeIDFromString

public static int getTypeIDFromString(java.lang.String idname)
Converts attribute type names to their numeric id. This attribute is case insensitive.

Parameters:
idname - a String representation of the attribute type.
Returns:
an int representation of that attribute type.

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 - another object to be checked for equality.
Returns:
true if the object presented is equal to this one; otherwise, returns false.
Overrides:
equals in class java.lang.Object

getName

public java.lang.String getName()
Gets this attribute's name.

Returns:
the name of this attribute.

getType

public int getType()
Gets this attribute's type.

Returns:
the type of this attribute. This type is one of SINGLE_VALUE_PREFIX, MULTI_VALUE_PREFIX, SINGLE_VALUE, MULTI_TOKEN, SINGLE_VALUE_TERMINAL, MULTI_VALUE_TERMINAL.

getAuthorityName

public java.lang.String getAuthorityName()
Gets our naming authority's name.

Returns:
the name of the authority that governs this attribute. If no authority is associated, null is returned.