...
Previously the core org.w3c.dom.Document implementation in uPortal was a DOM level 2 Document. DOM 3 support was added by means of an IPortalDocument interface and PortalDocumentImpl implementation.
Code Block | ||
---|---|---|
| ||
package org.jasig.portal.utils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
/**
* An interface that allows a Document to cache elements by known keys.
* This is used to locally store and manager the ID element mappings
* regardless of the actual DOM implementation.
*
* @author Nick Bolton
* @version $Revision: 1.3 $
*/
public interface IPortalDocument extends Document {
/**
* Registers an identifier name with a specified element node.
*
* @param idName a key used to store an <code>Element</code> object.
* @param element an <code>Element</code> object to map.
* document.
*/
public void putIdentifier(String idName, Element element);
/**
* Copies the element cache from the source document. This will
* provide equivalent mappings from IDs to elements in this
* document provided the elements exist in the source document.
*
* @param sourceDoc The source doc to copy from.
*/
public void copyCache(IPortalDocument sourceDoc);
}
|
Now, the core org.w3c.dom.Document implementation in uPortal is a DOM level 3 Document natively supporting the methods that were added by IPortalDocument. It is therefore no longer necessary for any code to expect IPortalDocument instances – instead W3C DOM 3 Documents can be consumed directly.
The uPortal 2.5 IPortalDocument is therefore formally deprecated and adds no methods beyond what is available in a baseline org.w3c.dom.Document (DOM Level 3):
Code Block | ||
---|---|---|
| ||
/** * IPortalDocument used to provide DOM 3 support on top of a DOM 2 * org.w3c.dom.Document implementation. Since uPortal 2.5, our Documents * have been DOM 3 themselves and as such IPortalDocument is no longer needed. * This interface is formally deprecated and will be removed in a future release. * @deprecated use Document directly instead public interface IPortalDocument extends Document { } |
Getting a new, empty Document
...