com.netscape.certsrv.base
Class MetaAttributeDef

java.lang.Object
  extended by com.netscape.certsrv.base.MetaAttributeDef

public class MetaAttributeDef
extends java.lang.Object

A class representing a meta attribute defintion.

Version:
$Revision: 1211 $, $Date: 2010-08-18 10:15:37 -0700 (Wed, 18 Aug 2010) $

Method Summary
 boolean equals(java.lang.Object other)
          Compares this attribute definition with another, for equality.
static MetaAttributeDef forName(java.lang.String name)
          Retrieves attribute definition by name
static MetaAttributeDef forOID(netscape.security.util.ObjectIdentifier oid)
          Retrieves attribute definition by object identifier
static java.util.Enumeration getAttributeNameOids()
          Returns enumeration of the registered attribute object identifiers
static java.util.Enumeration getAttributeNames()
          Returns enumeration of the registered attribute names
 java.lang.String getName()
          Gets attribute name
 netscape.security.util.ObjectIdentifier getOID()
          Gets an attribute OID.
 java.lang.Class getValueClass()
          Gets an Java class for the attribute values
static MetaAttributeDef register(java.lang.String name, java.lang.Class valueClass, netscape.security.util.ObjectIdentifier oid)
          Registers new MetaAttribute defintion Attribute is defined by name, Java class for attribute values and optional object identifier
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getOID

public netscape.security.util.ObjectIdentifier getOID()
Gets an attribute OID.

Returns:
returns attribute OID or null if not defined.

getValueClass

public java.lang.Class getValueClass()
Gets an Java class for the attribute values

Returns:
returns Java class for the attribute values

getName

public java.lang.String getName()
Gets attribute name

Returns:
returns attribute name

register

public static MetaAttributeDef register(java.lang.String name,
                                        java.lang.Class valueClass,
                                        netscape.security.util.ObjectIdentifier oid)
Registers new MetaAttribute defintion Attribute is defined by name, Java class for attribute values and optional object identifier

Parameters:
name - attribute name
valueClass - attribute value class
oid - attribute object identifier
Throws:
java.lang.IllegalArgumentException - if name or valueClass are null, or conflicting attribute definition already exists

equals

public boolean equals(java.lang.Object other)
Compares this attribute definition with another, for equality.

Overrides:
equals in class java.lang.Object
Returns:
true iff names, valueClasses and object identifiers are identical.

forName

public static MetaAttributeDef forName(java.lang.String name)
Retrieves attribute definition by name

Parameters:
name - attribute name
Returns:
attribute definition or null if not found

forOID

public static MetaAttributeDef forOID(netscape.security.util.ObjectIdentifier oid)
Retrieves attribute definition by object identifier

Parameters:
oid - attribute object identifier
Returns:
attribute definition or null if not found

getAttributeNames

public static java.util.Enumeration getAttributeNames()
Returns enumeration of the registered attribute names

Returns:
returns enumeration of the registered attribute names

getAttributeNameOids

public static java.util.Enumeration getAttributeNameOids()
Returns enumeration of the registered attribute object identifiers

Returns:
returns enumeration of the attribute object identifiers