Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-04


oracle.security.xmlsec.util
Class TagManager

java.lang.Object
  extended by oracle.security.xmlsec.util.TagManager


public class TagManager
extends java.lang.Object

Maps XML namespace/tag-name pairs to implementation classes.


Constructor Summary
TagManager()
          Creates a new TagManager instance and sets the default mappings.
TagManager(boolean defaultMappings)
          Creates a new TagManager instance.

 

Method Summary
 java.lang.Class<? extends XMLElement> getClassForTag(java.lang.String ns, java.lang.String tag)
          Retrieves the implementation class for the given element tag name within the given namespace.
 java.util.HashMap<java.lang.String,java.lang.Class<? extends XMLElement>> getTagHashMap(java.lang.String ns)
          Retrieves the HashMap mapping element tag names to implementation classes for the given namespace.
static TagManager getTagManager()
          Retrieves the current system-wide TagManager, creating a new instance with default mappings if none has been set.
 java.util.Hashtable<java.lang.String,java.lang.Class<? extends XMLElement>> getTagMap(java.lang.String ns)
          Retrieves the Hashtable mapping element tag names to implementation classes for the given namespace.
 java.util.HashMap<java.lang.String,java.lang.Class<? extends XMLElement>> mapNamespace(java.lang.String ns, java.util.HashMap<java.lang.String,java.lang.Class<? extends XMLElement>> tagMap)
          Maps the given namespace to the given tag map.
 java.util.Hashtable<java.lang.String,java.lang.Class<? extends XMLElement>> mapNamespace(java.lang.String ns, java.util.Hashtable<java.lang.String,java.lang.Class<? extends XMLElement>> tagMap)
          Maps the given namespace to the given tag map.
 java.lang.Class mapTag(java.lang.String ns, java.lang.String tag, java.lang.Class c)
          Maps the given element tag name to the given implementation class for the given namespace.
 void mapXMLDSig()
          Maps the standard XML-DSIG elements to their corresponding implementation classes within the Phaos library for the standard XML-DSig namespace URI, for the system-wide TagManager.
 void mapXMLEnc()
          Maps the standard XML Encryption elements to their corresponding implementation classes within the Phaos library for the standard XML Encryption namespace URI, for the system-wide TagManager.
static void setTagManager(TagManager tagMgr)
          Sets the system-wide TagManager.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

TagManager

public TagManager()
Creates a new TagManager instance and sets the default mappings.
See Also:
mapXMLDSig(), mapXMLEnc()

TagManager

public TagManager(boolean defaultMappings)
Creates a new TagManager instance.
Parameters:
defaultMappings - If true the default mappings are set, if false they are not set.
See Also:
mapXMLDSig(), mapXMLEnc()

Method Detail

setTagManager

public static void setTagManager(TagManager tagMgr)
Sets the system-wide TagManager.
Parameters:
tagMgr - A TagManager instance.
See Also:
TagManager(boolean), TagManager(boolean), mapXMLDSig(), mapXMLEnc()

getTagManager

public static TagManager getTagManager()
Retrieves the current system-wide TagManager, creating a new instance with default mappings if none has been set.
Returns:
The current TagManager.

mapNamespace

public java.util.HashMap<java.lang.String,java.lang.Class<? extends XMLElement>> mapNamespace(java.lang.String ns,
                                                                                              java.util.HashMap<java.lang.String,java.lang.Class<? extends XMLElement>> tagMap)
Maps the given namespace to the given tag map.
Parameters:
ns - A namespace URI.
tagMap - A HashMap mapping tag name strings to implementation Class objects for the given namespace.
Returns:
The previously mapped HashMap for the given namespace, or null if none was mapped.

mapNamespace

public java.util.Hashtable<java.lang.String,java.lang.Class<? extends XMLElement>> mapNamespace(java.lang.String ns,
                                                                                                java.util.Hashtable<java.lang.String,java.lang.Class<? extends XMLElement>> tagMap)
Maps the given namespace to the given tag map.
Parameters:
ns - A namespace URI.
tagMap - A HashMap mapping tag name strings to implementation Class objects for the given namespace.
Returns:
The previously mapped HashMap for the given namespace, or null if none was mapped.

getTagHashMap

public java.util.HashMap<java.lang.String,java.lang.Class<? extends XMLElement>> getTagHashMap(java.lang.String ns)
Retrieves the HashMap mapping element tag names to implementation classes for the given namespace.
Parameters:
ns - A namespace URI.
Returns:
A HashMap mapping tag name strings to implementation Class objects for the given namespace, or null if none exists.

getTagMap

public java.util.Hashtable<java.lang.String,java.lang.Class<? extends XMLElement>> getTagMap(java.lang.String ns)
Retrieves the Hashtable mapping element tag names to implementation classes for the given namespace.
Parameters:
ns - A namespace URI.
Returns:
A Hashtable mapping tag name strings to implementation Class objects for the given namespace, or null if none exists.

mapTag

public java.lang.Class mapTag(java.lang.String ns,
                              java.lang.String tag,
                              java.lang.Class c)
Maps the given element tag name to the given implementation class for the given namespace.
Parameters:
ns - A namespace URI.
tag - A XML element tag name in the given namespace.
c - The previously mapped class for the specified element, or null if none was mapped.

getClassForTag

public java.lang.Class<? extends XMLElement> getClassForTag(java.lang.String ns,
                                                            java.lang.String tag)
Retrieves the implementation class for the given element tag name within the given namespace.
Parameters:
ns - A namespace URI. If this argument is null, the first mapping for the given tag in any namespace will be returned.
tag - A XML element tag name in the given namespace.
Returns:
A class implementing the specified element, or null if none is mapped.

mapXMLDSig

public void mapXMLDSig()
Maps the standard XML-DSIG elements to their corresponding implementation classes within the Phaos library for the standard XML-DSig namespace URI, for the system-wide TagManager. Any previously defined mappings for this namespace are removed.
See Also:
XMLURI.ns_xmldsig, getTagManager()

mapXMLEnc

public void mapXMLEnc()
Maps the standard XML Encryption elements to their corresponding implementation classes within the Phaos library for the standard XML Encryption namespace URI, for the system-wide TagManager. Any previously defined mappings for this namespace are removed.
See Also:
XMLURI.ns_xmlenc, getTagManager()

Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-04


Copyright © 2005, 2011 , Oracle. All rights reserved.