Class X500NameAttrMap
- java.lang.Object
-
- org.mozilla.jss.netscape.security.x509.X500NameAttrMap
-
public class X500NameAttrMap extends java.lang.ObjectMaps 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.
-
-
Constructor Summary
Constructors Constructor Description X500NameAttrMap()Construct a X500NameAttrMap.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNameOID(java.lang.String name, ObjectIdentifier oid, AVAValueConverter valueConverter)Adds a attribute name, ObjectIdentifier, AVAValueConverter entry to the map.java.util.Enumeration<java.lang.String>getAllNames()Get an Enumeration of all attribute names in this map.java.util.Enumeration<ObjectIdentifier>getAllOIDs()Get an Enumeration of all ObjectIdentifiers in this map.static X500NameAttrMapgetDefault()Get the global default X500NameAttrMap.static X500NameAttrMapgetDirDefault()Get the global default X500NamAttrMap using the DirStrConverter.java.lang.StringgetName(ObjectIdentifier oid)Get the attribute name (keyword) of the specified OID.ObjectIdentifiergetOid(java.lang.String name)Get the ObjectIdentifier of the attribute name.ObjectIdentifiergetOid(ObjectIdentifier oid)Get the ObjectIdentifier object in the map for the specified OID.AVAValueConvertergetValueConverter(java.lang.String name)Get the Attribute Value Converter for the specified attribute name.AVAValueConvertergetValueConverter(ObjectIdentifier oid)Get the Attribute Value Converter for the specified ObjectIdentifier.static voidsetDefault(X500NameAttrMap newDefault)Set the global default X500NameAttrMap.
-
-
-
Method Detail
-
getName
public java.lang.String getName(ObjectIdentifier oid)
Get the attribute name (keyword) of the specified OID.- Parameters:
oid- An ObjectIdentifier- Returns:
- An attribute name (keyword string) for the OID.
-
getOid
public ObjectIdentifier getOid(java.lang.String name)
Get the ObjectIdentifier of the attribute name.- Parameters:
name- An attribute name (string of ascii characters)- Returns:
- An ObjectIdentifier for the attribute.
-
getValueConverter
public AVAValueConverter getValueConverter(java.lang.String name)
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
public AVAValueConverter getValueConverter(ObjectIdentifier oid)
Get the Attribute Value Converter for the specified ObjectIdentifier.- Parameters:
oid- An ObjectIdentifier- Returns:
- An AVAValueConverter for the OID.
-
getAllNames
public java.util.Enumeration<java.lang.String> getAllNames()
Get an Enumeration of all attribute names in this map.- Returns:
- An Enumeration of all attribute names.
-
getAllOIDs
public java.util.Enumeration<ObjectIdentifier> getAllOIDs()
Get an Enumeration of all ObjectIdentifiers in this map.- Returns:
- An Enumeration of all OIDs in this map.
-
getOid
public ObjectIdentifier getOid(ObjectIdentifier oid)
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
public void addNameOID(java.lang.String name, ObjectIdentifier oid, AVAValueConverter valueConverter)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
public static X500NameAttrMap getDefault()
Get the global default X500NameAttrMap.- Returns:
- The global default X500NameAttrMap.
-
getDirDefault
public static X500NameAttrMap getDirDefault()
Get the global default X500NamAttrMap using the DirStrConverter.- Returns:
- The global default X500NameAttrMap using the DirStrConverter.
-
setDefault
public static void setDefault(X500NameAttrMap newDefault)
Set the global default X500NameAttrMap.- Parameters:
newDefault- The new default X500NameAttrMap.
-
-