|
Oracle Fusion Middleware Crypto FIPS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10696-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.util.OIDManager
public final class OIDManager
A class to manage mappings between object identifiers and the classes that implement them.
Field Summary | |
---|---|
protected OIDManager |
parent |
Constructor Summary | |
---|---|
OIDManager() Creates a new OIDManager . |
|
OIDManager(OIDManager parent) Creates a new OIDManager whose parent in the chain is specified by the argument. |
Method Summary | |
---|---|
java.lang.String |
getAttributeName(ASN1ObjectID oid) Returns the String to which the given attribute type is mapped, for the first OIDManager encountered in the chain that maps the attribute type. |
ASN1ObjectID |
getAttributeType(java.lang.String name) Returns the OID to which the given attribute type name is mapped, for the first OIDManager encountered in the chain that maps the attribute type name. |
java.lang.Class<?> |
getMapping(ASN1ObjectID oid, java.lang.String key) Returns the value to which the specified key is mapped for the specified OID, for the first OIDManager encountered in the chain that maps the OID and key. |
java.util.Hashtable<java.lang.String,java.lang.Class<?>> |
getMappings(ASN1ObjectID oid) Deprecated. Use getMappingsAsMap(ASN1ObjectID) |
java.util.Map<java.lang.String,java.lang.Class<?>> |
getMappingsAsMap(ASN1ObjectID oid) Returns the Map object to which the given OID is mapped, for the first OIDManager encountered in the chain that maps the OID. |
static OIDManager |
getOIDManager() Gets the system-wide OIDManager. |
void |
load(java.io.InputStream is) Loads OID and Properties mappings for this OIDManager from the specified input stream. |
ASN1ObjectID |
setAttributeTypeName(java.lang.String name, ASN1ObjectID oid) |
java.lang.Class<?> |
setMapping(ASN1ObjectID oid, java.lang.String key, java.lang.Class<?> classObject) Maps the specified key to the specified value in the Hashtable object for the given OID for this OIDManager . |
java.util.Hashtable<java.lang.String,java.lang.Class<?>> |
setMappings(ASN1ObjectID oid, java.util.Hashtable<java.lang.String,java.lang.Class<?>> table) Deprecated. use setMappings(ASN1ObjectID, Map) |
java.util.Map<java.lang.String,java.lang.Class<?>> |
setMappings(ASN1ObjectID oid, java.util.Map<java.lang.String,java.lang.Class<?>> table) Maps the given OID to the given Map object for this OIDManager . |
static void |
setOIDManager(OIDManager om) Sets the system-wide OIDManager . |
static void |
writeProperties(java.util.Properties props, java.io.OutputStream out, java.lang.String header) Writes the given java.util.Properties to the given output stream, but does not insert a comment containing the current date/time (as the Properties.save method does). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OIDManager parent
Constructor Detail |
---|
public OIDManager()
OIDManager
.public OIDManager(OIDManager parent)
OIDManager
whose parent in the chain is specified by the argument.
parent
- the parent in the OIDManager
chain.Method Detail |
---|
public static void setOIDManager(OIDManager om)
OIDManager
. Only one OIDManager
may be in effect at a given time (in addition to the default OIDManager
).om
- the OIDManager
to be set.public static OIDManager getOIDManager()
OIDManager
, or the default OIDManager
if none has been set using the setOIDManager
method.public java.util.Hashtable<java.lang.String,java.lang.Class<?>> setMappings(ASN1ObjectID oid, java.util.Hashtable<java.lang.String,java.lang.Class<?>> table)
setMappings(ASN1ObjectID, Map)
Hashtable
object for this OIDManager
.oid
- the OID to map to the specified Hashtable
.table
- the Hashtable
to which the specified OID is to be mapped.Hashtable
object, or null
if no mapping was defined for this OIDManager
.public java.util.Map<java.lang.String,java.lang.Class<?>> setMappings(ASN1ObjectID oid, java.util.Map<java.lang.String,java.lang.Class<?>> table)
Map
object for this OIDManager
.oid
- the OID to map to the specified Map
.table
- the Map
to which the specified OID is to be mapped.Map
object, or null
if no mapping was defined for this OIDManager
.public java.util.Hashtable<java.lang.String,java.lang.Class<?>> getMappings(ASN1ObjectID oid)
getMappingsAsMap(ASN1ObjectID)
Hashtable
object to which the given OID is mapped, for the first OIDManager
encountered in the chain that maps the OID.oid
- the OID mapped to the Hashtable
.Hashtable
object, or null
if no mapping is defined.public java.util.Map<java.lang.String,java.lang.Class<?>> getMappingsAsMap(ASN1ObjectID oid)
Map
object to which the given OID is mapped, for the first OIDManager
encountered in the chain that maps the OID.oid
- the OID mapped to the Map
.Map
object, or null
if no mapping is defined.public java.lang.Class<?> setMapping(ASN1ObjectID oid, java.lang.String key, java.lang.Class<?> classObject)
Hashtable
object for the given OID for this OIDManager
.oid
- the OID mapped to the Hashtable
to which the specified key-value pair is to be added.key
- the key to be mapped to the specified value.value
- the value to which the specified key is to be mapped.null
if no mapping was defined for this OIDManager
.getAttributeType(java.lang.String)
public java.lang.Class<?> getMapping(ASN1ObjectID oid, java.lang.String key)
OIDManager
encountered in the chain that maps the OID and key.oid
- the OID mapped to the Hashtable
in which the specified key is to be looked up.key
- the key for the class to be looked up.null
if no mapping is defined.public ASN1ObjectID setAttributeTypeName(java.lang.String name, ASN1ObjectID oid)
public ASN1ObjectID getAttributeType(java.lang.String name)
OIDManager
encountered in the chain that maps the attribute type name.name
- the mapped attribute type name.null
if no mapping is defined.public java.lang.String getAttributeName(ASN1ObjectID oid)
OIDManager
encountered in the chain that maps the attribute type.oid
- the mapped attribute type.null
if no mapping is defined.public void load(java.io.InputStream is) throws java.io.IOException
Properties
mappings for this OIDManager
from the specified input stream. OIDManagers further up the chain are unaffected.
Each OID occupies one line of the input stream. The OID must be preceded on the line by an ASCII & (surrounded and/or separated by zero or more whitespace characters).
Each line is terminated by a line terminator (\n or \r or \r\n). Lines from the input stream are processed until end of file is reached on the input stream.
A line that contains only whitespace or whose first non- whitespace character is an ASCII # or ! is ignored (thus, # or ! indicate comment lines). An ampersand included in a comment line must be represented by its escaped unicode value /u0026
.
Each OID line is followed by its Properties
definition, using the syntax set forth in the javadoc for java.util.Properties.load(java.io.InputStream)
.
As an example, the following lines specify the Properties
to which the AlgID.rsaEncryption
OID is mapped:
& 1.2.840.113549.1.1.1 privateKey = oracle.security.crypto.core.RSAPrivateKey publicKey = oracle.security.crypto.core.RSAPublicKey useSignature = oracle.security.crypto.core.RSAMDSignature keyPairGenerator = oracle.security.crypto.core.RSAKeyPairGenerator cipher = oracle.security.crypto.core.RSApkcs1
is
- the input stream from which the definitions are to be read.java.io.IOException
public static void writeProperties(java.util.Properties props, java.io.OutputStream out, java.lang.String header) throws java.io.IOException
java.util.Properties
to the given output stream, but does not insert a comment containing the current date/time (as the Properties.save
method does).java.io.IOException
|
Oracle Fusion Middleware Crypto FIPS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10696-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |