org.apache.ws.security.message
Class DOMCallbackLookup
java.lang.Object
org.apache.ws.security.message.DOMCallbackLookup
- All Implemented Interfaces:
- CallbackLookup
public class DOMCallbackLookup
- extends java.lang.Object
- implements CallbackLookup
This class uses a DOM-based approach to locate Elements that are referenced via an Id.
Field Summary |
protected org.w3c.dom.Document |
doc
|
Method Summary |
org.w3c.dom.Element |
getElement(java.lang.String id,
java.lang.String valueType,
boolean checkMultipleElements)
Get the DOM element that corresponds to the given id and ValueType reference. |
java.util.List<org.w3c.dom.Element> |
getElements(java.lang.String localname,
java.lang.String namespace)
Get the DOM element(s) that correspond to the given localname/namespace. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
doc
protected org.w3c.dom.Document doc
DOMCallbackLookup
public DOMCallbackLookup(org.w3c.dom.Document doc)
getElement
public org.w3c.dom.Element getElement(java.lang.String id,
java.lang.String valueType,
boolean checkMultipleElements)
throws WSSecurityException
- Get the DOM element that corresponds to the given id and ValueType reference. The Id can
be a wsu:Id or else an Id attribute, or a SAML Id when the ValueType refers to a SAML
Assertion.
- Specified by:
getElement
in interface CallbackLookup
- Parameters:
id
- The id of the element to locatevalueType
- The ValueType attribute of the element to locate (can be null)checkMultipleElements
- If true then go through the entire tree and return
null if there are multiple elements with the same Id
- Returns:
- the located element
- Throws:
WSSecurityException
getElements
public java.util.List<org.w3c.dom.Element> getElements(java.lang.String localname,
java.lang.String namespace)
throws WSSecurityException
- Get the DOM element(s) that correspond to the given localname/namespace.
- Specified by:
getElements
in interface CallbackLookup
- Parameters:
localname
- The localname of the Element(s)namespace
- The namespace of the Element(s)
- Returns:
- the located element(s)
- Throws:
WSSecurityException
Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.