|
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.AppModel
public final class AppModel
A class to represent the top level element in the XFA object model. All application-specific models are represented as sub-models of this one.
Example:
xfa <- this is the AppModel
datasets <- this is the XFADataModel
data <- this is $data in SOM expressions (a datagroup)
| Nested Class Summary | |
|---|---|
static class |
AppModel.LegacyMask
|
| Nested classes/interfaces inherited from class com.adobe.xfa.Node |
|---|
Node.ChangeLogger |
| Field Summary | |
|---|---|
static AppModel.LegacyMask |
XFA_PATCH_W_2757988
|
| Fields inherited from class com.adobe.xfa.Node |
|---|
CREATE_ALWAYS_NEW, CREATE_IF_NOT_EXIST, CREATE_MUST_NOT_EXIST, CREATE_REPLACE |
| Constructor Summary | |
|---|---|
AppModel(LogMessenger messenger)
Instantiates an app model with the given messenger. |
|
| Method Summary | |
|---|---|
void |
addFactory(ModelFactory factory)
Adds a model factory to the list of registered factories. |
void |
addPseudoModel(java.lang.String sShortCutName,
Obj obj)
Makes an object visible to the global scripting namespace. |
void |
addScriptHandler(ScriptHandler handler)
Adds (registers) a script handler for this app model. |
void |
appendChild(Node newChild,
boolean bValidate)
Appends the given child to this element. |
void |
clearErrorList()
Clears this app model's current list of errors. |
void |
clearScriptingContexts()
Clears any scripting contexts associated with all script handlers previously registered with this app model. |
java.util.List<ModelFactory> |
factories()
Returns the list of registered factories. |
java.util.List<Element> |
getErrorContextList()
Gets all the context nodes that correspond to entries in the error list. |
java.util.List<ExFull> |
getErrorList()
Gets all the errors that have been generated by this app model since the last method call to clear the error list. |
boolean |
getExternalProtosAreTransient()
Determines whether external proto fragments are marked as transient when they are resolved. |
HrefHandler |
getHrefHandler()
Gets the current HrefService handler. |
java.util.List<ScriptHandler> |
getScriptHandlers()
Gets the list of script handlers registered with this app model. |
static boolean |
includePacket(java.lang.String aPacketName,
java.lang.String sInList)
Determines if a packet should be included based on a packet list. |
void |
insertChild(Node newChild,
Node refChild,
boolean bValidate)
Inserts a child before a specific child in the child list. |
Obj |
lookupPseudoModel(java.lang.String sShortCutName)
Looks up a scripting object registered with the global scripting namespace. |
Element |
newDOM()
Creates a new node hierarchy of a new XFA DOM. |
void |
removePseudoModel(java.lang.String sShortCutName)
Removes a scripting object shortcut from the global scripting namespace. |
void |
setExternalProtosAreTransient(boolean bExternalProtosAreTransient)
Determines whether external proto fragments are marked as transient when they are resolved. |
void |
setHrefHandler(HrefHandler handler)
Sets the HrefService handler associated with this AppModel. |
| Methods inherited from class com.adobe.xfa.Model |
|---|
createElement, createElement, createElement, createTextNode, getCurrentVersion, getDocument, normalizeNameSpaces, resolveNodes |
| Methods inherited from class com.adobe.xfa.Element |
|---|
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 |
| Field Detail |
|---|
public static final AppModel.LegacyMask XFA_PATCH_W_2757988
| Constructor Detail |
|---|
public AppModel(LogMessenger messenger)
messenger - a log messenger, if any.| Method Detail |
|---|
public static boolean includePacket(java.lang.String aPacketName,
java.lang.String sInList)
aPacketName - the packet to test forsInList - the list of packets
public void addFactory(ModelFactory factory)
Factories are added for models that are to be loaded with a full implementation. If no model is explicitly added, a default model with minimal functionality will be used.
factory - the factory to add.
public void addPseudoModel(java.lang.String sShortCutName,
Obj obj)
obj parameter will typically be derived
from PseudoModel.
The shortcut name must start with a dollar sign ($).
For example, an application might use this method to
add an object derived from HostPseudoModel and
register it with the name $host.
sShortCutName - the name of the scripting object.obj - the scriptable objectAppModel.removePseudoModel(String)public void addScriptHandler(ScriptHandler handler)
handler - the script handler to add.public void clearScriptingContexts()
AppModel.addScriptHandler(ScriptHandler)
public void appendChild(Node newChild,
boolean bValidate)
Element
appendChild in class ElementnewChild - the child node being appended.bValidate - when true, ensures the given child is valid
per the model's schema and throws an ExFull if not.Element.appendChild(Node, boolean)public void clearErrorList()
clearErrorList in class ModelModel.clearErrorList()public java.util.List<ModelFactory> factories()
public java.util.List<Element> getErrorContextList()
getErrorContextList in class Modelpublic java.util.List<ExFull> getErrorList()
getErrorList in class ModelExFull error objects.public boolean getExternalProtosAreTransient()
DOMSaveOptions.setSaveFragment(boolean) setting controls whether
resolved fragments are included when the model is serialized. The default
is false which means that resolved fragments are always
serialized.
This flag is only relevant if
AppModel.setHrefHandler(HrefHandler) has been called.
true if external fragments should be transient (i.e.
left as references when serialized), or false if
they should be non-transient (i.e. expanded when serialized).AppModel.setExternalProtosAreTransient(boolean)public HrefHandler getHrefHandler()
HrefService handler.
HrefService handler associated with the AppModel.public java.util.List<ScriptHandler> getScriptHandlers()
AppModel.addScriptHandler(ScriptHandler).
public void insertChild(Node newChild,
Node refChild,
boolean bValidate)
Element
insertChild in class ElementnewChild - the child to be insertedrefChild - the child to insert beforebValidate - if true, validate the insertionElement.insertChild(Node, Node, boolean)public Obj lookupPseudoModel(java.lang.String sShortCutName)
sShortCutName - the scripting shortcut name.
PseudoModel), or
null if not found.public Element newDOM()
AppModel. The children that this
node has depends on which factories have been added via
addFactory().
Each installed factory will create some default node or tree of nodes
under the AppModel node.
public void removePseudoModel(java.lang.String sShortCutName)
sShortCutName - the shortcut name of a scripting objectAppModel.addPseudoModel(String, Obj)public void setExternalProtosAreTransient(boolean bExternalProtosAreTransient)
DOMSaveOptions.setSaveFragment(boolean) setting controls whether
resolved fragments are included when the model is serialized. The default
is false which means that resolved fragments are always
serialized.
This flag is only relevant if
AppModel.setHrefHandler(HrefHandler) has been called.
bExternalProtosAreTransient - true if external fragments should be transient
(i.e. left as references when serialized), or
false if they should be non-transient (i.e.
expanded when serialized).AppModel.getExternalProtosAreTransient(),
AppModel.setHrefHandler(HrefHandler)public void setHrefHandler(HrefHandler handler)
HrefService handler associated with this AppModel.
handler - the HrefService handler.
The href service handles the URL resolution and fragment loading for all
usehref attribute values on ProtoableNodes.
|
XFA4J | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||