Package com.netscape.certsrv.base
Class MetaAttributeDef
java.lang.Object
com.netscape.certsrv.base.MetaAttributeDef
A class representing a meta attribute defintion.
- Version:
- $Revision$, $Date$
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static MetaAttributeDef
Retrieves attribute definition by namestatic MetaAttributeDef
forOID
(org.mozilla.jss.netscape.security.util.ObjectIdentifier oid) Retrieves attribute definition by object identifierstatic Enumeration<org.mozilla.jss.netscape.security.util.ObjectIdentifier>
Returns enumeration of the registered attribute object identifiersstatic Enumeration<String>
Returns enumeration of the registered attribute namesgetName()
Gets attribute nameorg.mozilla.jss.netscape.security.util.ObjectIdentifier
getOID()
Gets an attribute OID.Class<?>
Gets an Java class for the attribute valuesint
hashCode()
static MetaAttributeDef
register
(String name, Class<?> valueClass, org.mozilla.jss.netscape.security.util.ObjectIdentifier oid) Registers new MetaAttribute defintion Attribute is defined by name, Java class for attribute values and optional object identifier
-
Method Details
-
getOID
public org.mozilla.jss.netscape.security.util.ObjectIdentifier getOID()Gets an attribute OID.- Returns:
- returns attribute OID or null if not defined.
-
getValueClass
Gets an Java class for the attribute values- Returns:
- returns Java class for the attribute values
-
getName
Gets attribute name- Returns:
- returns attribute name
-
register
public static MetaAttributeDef register(String name, Class<?> valueClass, org.mozilla.jss.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 namevalueClass
- attribute value classoid
- attribute object identifier- Throws:
IllegalArgumentException
- if name or valueClass are null, or conflicting attribute definition already exists
-
hashCode
public int hashCode() -
equals
-
forName
Retrieves attribute definition by name- Parameters:
name
- attribute name- Returns:
- attribute definition or null if not found
-
forOID
Retrieves attribute definition by object identifier- Parameters:
oid
- attribute object identifier- Returns:
- attribute definition or null if not found
-
getAttributeNames
Returns enumeration of the registered attribute names- Returns:
- returns enumeration of the registered attribute names
-
getAttributeNameOids
public static Enumeration<org.mozilla.jss.netscape.security.util.ObjectIdentifier> getAttributeNameOids()Returns enumeration of the registered attribute object identifiers- Returns:
- returns enumeration of the attribute object identifiers
-