|
XFA4J | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.adobe.xfa.Obj
com.adobe.xfa.Node
com.adobe.xfa.Element
com.adobe.xfa.Model
com.adobe.xfa.template.TemplateModel
public final class TemplateModel
A class to model the collection of all the XFA nodes that make up form template.
| Nested Class Summary | |
|---|---|
static class |
TemplateModel.Insertion
A class to define a mapping between a key and template fragment reference. |
| Nested classes/interfaces inherited from class com.adobe.xfa.Node |
|---|
Node.ChangeLogger |
| Field Summary |
|---|
| Fields inherited from class com.adobe.xfa.Node |
|---|
CREATE_ALWAYS_NEW, CREATE_IF_NOT_EXIST, CREATE_MUST_NOT_EXIST, CREATE_REPLACE |
| Method Summary | |
|---|---|
void |
applyFixups()
Applies fixups on the template model just after it has been loaded. |
static TemplateModel |
getTemplateModel(AppModel app,
boolean bCreateIfNotFound)
Gets the template model held within an XFA DOM hierarchy. |
java.util.List<TemplateModel.Insertion> |
splice(java.util.List<TemplateModel.Insertion> insertions,
boolean removeInsertionPoints)
Splices external template fragments into this template. |
| Methods inherited from class com.adobe.xfa.Model |
|---|
clearErrorList, createElement, createElement, createElement, createTextNode, getCurrentVersion, getDocument, getErrorContextList, getErrorList, normalizeNameSpaces, resolveNodes |
| Methods inherited from class com.adobe.xfa.Element |
|---|
appendChild, assignNode, getAttr, getAttribute, getElement, getFirstXFAChild, getFirstXMLChild, getInstalledLocale, getLastXMLChild, getModel, getName, getNodes, getNS, getNumAttrs, getPrefix, getText, getXFAChild, getXMLChild, isInstalledLocaleAmbient, loadXML, saveXML, setAttribute, setAttribute, setAttribute, setLocalName, setName, setNS, setQName |
| Methods inherited from class com.adobe.xfa.Node |
|---|
checkAncestorPerms, checkDescendentPerms, checkPerms, cleanDirtyFlags, compareVersions, getData, getDynamicScriptProp, getNextXFASibling, getNextXMLSibling, getOwnerDocument, getPreviousXMLSibling, getSOMExpression, getXFAChildCount, getXFAParent, getXMLChildCount, getXMLParent, hasChanged, remove, resolveNode, resolveNode, resolveNodes, setNextXMLSibling, setPermsLock, setXMLParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static TemplateModel getTemplateModel(AppModel app,
boolean bCreateIfNotFound)
app - the application model.bCreateIfNotFound - when true, create a template model if needed.
public void applyFixups()
Note that this Java implementation does not handle the full set of fixups that are currently handled in the C++ implementation.
public java.util.List<TemplateModel.Insertion> splice(java.util.List<TemplateModel.Insertion> insertions,
boolean removeInsertionPoints)
extras element that in turn contain
a text element with the name "insertionPoint".
Elements containing an extras element that in turn contains
a text element with the name "insertionPointPlaceholder"
are removed.
The value contained within the text node is an insertion
key, and it is matched against each key in insertions. The
corresponding replacement reference identifies a template fragment that
is loaded and inserted into the template. Each insertion is done by
making a copy of the insertion point and inserting that copy before the
insertion point. The template fragment reference is then resolved, and the
resolved fragment is merged into the insertion point copy.
The values in insertions reference template fragments
using the same syntax that the usehref attribute uses to
reference external prototype fragments:
TemplateModel.
The caller is responsible for registering an HrefHandler
with the AppModel to allow any external references to be
resolved.
insertions - the insertions to be spliced into the template.removeInsertionPoints - if true, then any insertion points in the
template are removed.
List containing the entries from
insertions for which no corresponding insertion
point was found, or null if all insertions were
used.AppModel.getErrorList(),
AppModel.setHrefHandler(HrefHandler handler)
|
XFA4J | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||