Package com.netscape.certsrv.base
Class MetaAttributeDef
- java.lang.Object
-
- com.netscape.certsrv.base.MetaAttributeDef
-
public class MetaAttributeDef extends java.lang.Object
A class representing a meta attribute defintion.- Version:
- $Revision$, $Date$
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
static MetaAttributeDef
forName(java.lang.String name)
Retrieves attribute definition by namestatic MetaAttributeDef
forOID(ObjectIdentifier oid)
Retrieves attribute definition by object identifierstatic java.util.Enumeration<ObjectIdentifier>
getAttributeNameOids()
Returns enumeration of the registered attribute object identifiersstatic java.util.Enumeration<java.lang.String>
getAttributeNames()
Returns enumeration of the registered attribute namesjava.lang.String
getName()
Gets attribute nameObjectIdentifier
getOID()
Gets an attribute OID.java.lang.Class<?>
getValueClass()
Gets an Java class for the attribute valuesint
hashCode()
static MetaAttributeDef
register(java.lang.String name, java.lang.Class<?> valueClass, ObjectIdentifier oid)
Registers new MetaAttribute defintion Attribute is defined by name, Java class for attribute values and optional object identifier
-
-
-
Method Detail
-
getOID
public 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, ObjectIdentifier oid)
Registers new MetaAttribute defintion Attribute is defined by name, Java class for attribute values and optional object identifier- Parameters:
name
- attribute namevalueClass
- attribute value classoid
- attribute object identifier- Throws:
java.lang.IllegalArgumentException
- if name or valueClass are null, or conflicting attribute definition already exists
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
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(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<java.lang.String> getAttributeNames()
Returns enumeration of the registered attribute names- Returns:
- returns enumeration of the registered attribute names
-
getAttributeNameOids
public static java.util.Enumeration<ObjectIdentifier> getAttributeNameOids()
Returns enumeration of the registered attribute object identifiers- Returns:
- returns enumeration of the attribute object identifiers
-
-