Class X500NameAttrMap
java.lang.Object
org.mozilla.jss.netscape.security.x509.X500NameAttrMap
Maps an attribute name in an X500 AVA to its OID and a
converter for the attribute type. The converter converts from a string to
its DER encoded attribute value. * For example, "CN" maps to its OID of
2.5.4.3 and the Directory String Converter. The Directory String
Converter converts from a string to a DerValue with tag Printable, T.61 or
UniversalString.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static X500NameAttrMap
private static X500NameAttrMap
(package private) Hashtable
<String, ObjectIdentifier> (package private) Hashtable
<ObjectIdentifier, String> (package private) Hashtable
<ObjectIdentifier, AVAValueConverter> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNameOID
(String name, ObjectIdentifier oid, AVAValueConverter valueConverter) Adds a attribute name, ObjectIdentifier, AVAValueConverter entry to the map.Get an Enumeration of all attribute names in this map.Get an Enumeration of all ObjectIdentifiers in this map.static X500NameAttrMap
Get the global default X500NameAttrMap.static X500NameAttrMap
Get the global default X500NamAttrMap using the DirStrConverter.getName
(ObjectIdentifier oid) Get the attribute name (keyword) of the specified OID.Get the ObjectIdentifier of the attribute name.getOid
(ObjectIdentifier oid) Get the ObjectIdentifier object in the map for the specified OID.getValueConverter
(String name) Get the Attribute Value Converter for the specified attribute name.Get the Attribute Value Converter for the specified ObjectIdentifier.static void
setDefault
(X500NameAttrMap newDefault) Set the global default X500NameAttrMap.
-
Field Details
-
name2OID
Hashtable<String,ObjectIdentifier> name2OID -
oid2Name
Hashtable<ObjectIdentifier,String> oid2Name -
oid2ValueConverter
Hashtable<ObjectIdentifier,AVAValueConverter> oid2ValueConverter -
defMap
-
defDirMap
-
-
Constructor Details
-
X500NameAttrMap
public X500NameAttrMap()Construct a X500NameAttrMap.
-
-
Method Details
-
getName
Get the attribute name (keyword) of the specified OID.- Parameters:
oid
- An ObjectIdentifier- Returns:
- An attribute name (keyword string) for the OID.
-
getOid
Get the ObjectIdentifier of the attribute name.- Parameters:
name
- An attribute name (string of ascii characters)- Returns:
- An ObjectIdentifier for the attribute.
-
getValueConverter
Get the Attribute Value Converter for the specified attribute name.- Parameters:
name
- An attribute name- Returns:
- An attribute value converter for the attribute name
-
getValueConverter
Get the Attribute Value Converter for the specified ObjectIdentifier.- Parameters:
oid
- An ObjectIdentifier- Returns:
- An AVAValueConverter for the OID.
-
getAllNames
Get an Enumeration of all attribute names in this map.- Returns:
- An Enumeration of all attribute names.
-
getAllOIDs
Get an Enumeration of all ObjectIdentifiers in this map.- Returns:
- An Enumeration of all OIDs in this map.
-
getOid
Get the ObjectIdentifier object in the map for the specified OID.- Parameters:
oid
- An ObjectIdentifier.- Returns:
- The ObjectIdentifier object in this map for the OID.
-
addNameOID
Adds a attribute name, ObjectIdentifier, AVAValueConverter entry to the map.- Parameters:
name
- An attribute name (string of ascii chars)oid
- The ObjectIdentifier for the attribute.valueConverter
- An AVAValueConverter object for converting an value for this attribute from a string to a DerValue and vice versa.
-
getDefault
Get the global default X500NameAttrMap.- Returns:
- The global default X500NameAttrMap.
-
getDirDefault
Get the global default X500NamAttrMap using the DirStrConverter.- Returns:
- The global default X500NameAttrMap using the DirStrConverter.
-
setDefault
Set the global default X500NameAttrMap.- Parameters:
newDefault
- The new default X500NameAttrMap.
-