Package com.adobe.xfa.form
Class FormInstanceManager
- java.lang.Object
-
- com.adobe.xfa.Obj
-
- com.adobe.xfa.Node
-
- com.adobe.xfa.Element
-
- com.adobe.xfa.ProtoableNode
-
- com.adobe.xfa.form.FormInstanceManager
-
- All Implemented Interfaces:
Peer
public class FormInstanceManager extends ProtoableNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFormInstanceManager.InstanceListenerInterface for being notified of instances being added/removed/moved-
Nested classes/interfaces inherited from class com.adobe.xfa.Element
Element.DualDomNode, Element.ReplaceContent
-
Nested classes/interfaces inherited from class com.adobe.xfa.Node
Node.ChangeLogger
-
-
Field Summary
-
Fields inherited from class com.adobe.xfa.Element
AttrIsDefault, AttrIsFragment, AttrIsTransient, CREATEACTION
-
Fields inherited from class com.adobe.xfa.Node
CREATE_ALWAYS_NEW, CREATE_IF_NOT_EXIST, CREATE_MUST_NOT_EXIST, CREATE_REPLACE, gsXFANamespacePrefix
-
Fields inherited from interface com.adobe.xfa.ut.Peer
ATTR_CHANGED, CHILD_ADDED, CHILD_REMOVED, DESCENDENT_ADDED, DESCENDENT_ATTR_CHANGED, DESCENDENT_REMOVED, DESCENDENT_VALUE_CHANGED, PARENT_CHANGED, PERMS_LOCK_CLEARED, PERMS_LOCK_SET, PROTO_ATTR_CHANGED, PROTO_CHILD_ADDED, PROTO_CHILD_REMOVED, PROTO_DESCENDENT_ADDED, PROTO_DESCENDENT_ATTR_CHANGED, PROTO_DESCENDENT_REMOVED, PROTO_DESCENDENT_VALUE_CHANGED, PROTO_VALUE_CHANGED, UPDATED, VALUE_CHANGED
-
-
Constructor Summary
Constructors Constructor Description FormInstanceManager(Element parent, Node prevSibling)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeaddInstance(boolean bMerge)Add an instance of a Subform or SubformSet to this Form node.voidgetDeltas(Element delta, XFAList list)Gets a collection of deltas to restore.booleangetMatchDescendantsOnly()ScriptTablegetScriptTable()voidmoveInstance(int nInstance, int nPosition, boolean bNotify)Move a child of this Form node and the corresponding data in the XFA-Data DOM.voidremoveInstance(int nInstance, boolean bNotifyPeers)Remove a Subform or SubformSet from this Form node.voidsetInstanceListener(FormInstanceManager.InstanceListener listener)Register an instance listener to this manager.voidsetInstances(int nNumber, boolean bThrow)Add or remove instances of an Subform or SubformSet child of this XFAForm node.voidsetMatchDescendantsOnly(boolean bDescendantsOnly)-
Methods inherited from class com.adobe.xfa.ProtoableNode
clone, createProto, elementGetAttribute, externalProtoFailed, fetchIDValues, getAttribute, getAttributeByName, getElement, getExternalProtoSource, getOneOfChild, getPI, getPI, getProto, getProtoed, getText, hasExternalProto, hasProto, isContextSensitiveAttribute, isDefault, isSpecified, notifyPeers, performResolveProtos, preSave, releaseExternalProtos, reResolveProto, resolveProto, setAttribute, setElement, setOneOfChild, setPermsLock, setProto, updateIDValues
-
Methods inherited from class com.adobe.xfa.Element
appendChild, appendChild, appendPI, appendPI, assignNode, clone, connectPeerToDocument, constructKey, constructKeys, copyContent, defaultAttribute, defaultElement, defaultElement, establishID, evaluate, explodeQName, findAttr, findSchemaAttr, foundBadAttribute, foundBadAttribute, getAll, getAppModel, getAtom, getAttr, getAttribute, getAttrIndex, getAttrName, getAttrNS, getAttrProp, getAttrQName, getAttrVal, getChildReln, getClassAll, getClassIndex, getClassName, getElement, getElementClass, getElementLocal, getEnum, getEnum, getEventTable, getFirstXFAChild, getFirstXMLChild, getID, getIndex, getInheritedNS, getInstalledLocale, getIsNull, getLastXMLChild, getLineNumber, getLocalName, getModel, getName, getNode, getNodes, getNodeSchema, getNS, getNumAttrs, getOneOfChild, getPrefix, getProperty, getProperty, getSaveXMLSaveTransient, getSchemaType, getScriptMethodInfo, getSibling, getXFAChild, getXMLChild, getXMLName, getXPath, getXsiNilAttribute, inhibitPrettyPrint, inhibitPrettyPrint, insertChild, isContainer, isFragment, isHidden, isHidden, isIndexed, isInstalledLocaleAmbient, isLeaf, isNameSpaceAttr, isPropertySpecified, isPropertySpecified, isPropertyValid, isSpecified, isSpecified, isTransient, isTransparent, isValidAttr, isValidChild, isValidElement, loadXML, loadXML, makeDefault, makeNonDefault, newAttribute, optimizeNameSpace, peekAttribute, peekElement, peekOneOfChild, peekProperty, peekProperty, postSave, privateSetName, processTextChildrenDuringParse, removeAttr, removeAttr, removeChild, removePI, removePI, removeWhiteSpace, removeXsiNilAttribute, replaceChild, resetPostLoadXML, resolveAndEnumerateChildren, resolveNodeCreate, resolvePrefix, saveFilteredXML, saveXML, saveXML, serialize, setAttribute, setAttribute, setAttribute, setAttrProp, setDefaultFlag, setDOMProperties, setIsDataWindowRoot, setIsIndexed, setLineNumber, setLocalName, setModel, setName, setNS, setProperty, setProperty, setQName, setSaveXMLSaveTransient, setTransparent, setXMLName, setXsiNilAttribute, updateFromPeer
-
Methods inherited from class com.adobe.xfa.Node
checkAncestorPerms, checkDescendentPerms, checkPerms, cleanDirtyFlags, compareVersions, getData, getFirstXMLChildElement, getLocked, getNextXFASibling, getNextXMLSibling, getNextXMLSiblingElement, getNodeAsXML, getOwnerDocument, getPIAsXML, getPIName, getPreviousXMLSibling, getPrivateName, getPropName, getSOMExpression, getSOMExpression, getSomName, getUniqueSOMName, getWillDirty, getXFAChildCount, getXFAParent, getXfaPeer, getXMLChildCount, getXMLParent, hasChanged, isDirty, isMapped, isPermsLockSet, isTransient, locateChildByClass, locateChildByName, logValueChangeHelper, performSOMAssignment, remove, resolveNode, resolveNode, resolveNode, resolveNodes, resolveNodes, sendMessenge, setDirty, setDocument, setLocked, setMapped, setPrivateName, setWillDirty, setXfaPeer, unLock, validateSchema, validateUsage, validateUsageFailedIsFatal
-
Methods inherited from class com.adobe.xfa.Obj
addPeer, addPeeredNode, clearPeers, deafen, getClassAtom, getClassTag, getPeer, getScriptProperty, getScriptThis, invokeFunction, isDeaf, isMute, isSameClass, isSameClass, isSameClass, mute, peerRemoved, removePeer, removePeeredNode, setClass, setClassTag, setScriptProperty, unDeafen, unMute
-
-
-
-
Method Detail
-
setInstances
public void setInstances(int nNumber, boolean bThrow)Add or remove instances of an Subform or SubformSet child of this XFAForm node. This method will automatically ensure that no occurrence or hierarchy rules are invalidated. During a remove data nodes are unmapped and during an add data is automatically merged into the new instances. This method will also recursively add/remove the children of the new node.- Parameters:
nNumber- the number of instances of this subform that we want to havebThrow- iftrue, an exception will be throw ifnNumberis not a valid number of occurrences.
-
addInstance
public Node addInstance(boolean bMerge)
Add an instance of a Subform or SubformSet to this Form node. This method will automatically ensure that no occurrence or hierarchy rules are invalidated. This method will also recursively add the children of the new node.- Parameters:
bMerge- if true attempt to merge the new Form node against the XFA-Data DOM.- Returns:
- a null Node if no node was added, else the newly created Form node.
-
removeInstance
public void removeInstance(int nInstance, boolean bNotifyPeers)Remove a Subform or SubformSet from this Form node. This method will automatically ensure that no occurrence rules are invalidated and the data is removed from the XFA-Data DOM.- Parameters:
nInstance- the instance to remove.
-
moveInstance
public void moveInstance(int nInstance, int nPosition, boolean bNotify)Move a child of this Form node and the corresponding data in the XFA-Data DOM. This method will automatically ensure that no occurrence or hierarchy rules are invalidated.- Parameters:
nInstance- the instance to be moved.nPosition- the position of the child within its instances (0 based).
-
setInstanceListener
public void setInstanceListener(FormInstanceManager.InstanceListener listener)
Register an instance listener to this manager. This listener will be notified of instances being added/removed/moved
-
getDeltas
public void getDeltas(Element delta, XFAList list)
Description copied from class:ElementGets a collection of deltas to restore. The locale attribute is always restored immediately, and is not returned in the list of deltas.
-
getScriptTable
public ScriptTable getScriptTable()
- Overrides:
getScriptTablein classProtoableNode
-
setMatchDescendantsOnly
public void setMatchDescendantsOnly(boolean bDescendantsOnly)
-
getMatchDescendantsOnly
public boolean getMatchDescendantsOnly()
-
-