Class ProtoableNode
- All Implemented Interfaces:
Peer
- Direct Known Subclasses:
BindingNode,Border,Button,Calculate,Caption,Color,Container,Content,DateTimeEdit,EffectivePolicy,EventTag,Fill,FormInstanceManager,GenericNode,GenericTextContainer,Items,Keep,Linear,Manifest,Margin,Occur,Picture,Proto,Script,TextEdit,Traverse,UI,Value,WSDLConnection,XMLConnection,XMLMultiSelectNode,XSDConnection
-
Nested Class Summary
Nested classes/interfaces inherited from class com.adobe.xfa.Element
Element.DualDomNode, Element.ReplaceContentNested classes/interfaces inherited from class com.adobe.xfa.Node
Node.ChangeLogger -
Field Summary
Fields inherited from class com.adobe.xfa.Element
AttrIsDefault, AttrIsFragment, AttrIsTransient, CREATEACTIONFields inherited from class com.adobe.xfa.Node
CREATE_ALWAYS_NEW, CREATE_IF_NOT_EXIST, CREATE_MUST_NOT_EXIST, CREATE_REPLACE, gsXFANamespacePrefixFields 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 -
Method Summary
Modifier and TypeMethodDescriptionclone will establish any proto relationshipscreateProto(Element parent, boolean bFull) elementGetAttribute(int eTag, boolean bPeek, boolean bValidate) We need this method so that derived classes can explicitly call the getAttribute() method on Element.final booleanvoidfetchIDValues(List<String> idValues) getAttribute(int eTag, boolean bPeek, boolean bValidate) Gets this element's attribute whose attribute tag is given.getAttributeByName(String aAttrName, boolean bSearchProto) get the named attribute.getElement(int eTag, boolean bPeek, int nOccurrence, boolean bReturnDefault, boolean bValidate) Gets this element's sub element whose element tag is given.Get the external prototype reference node used in the creation of this nodegetOneOfChild(boolean bPeek, boolean bReturnDefault) voidGet the processing instruction based on the aPiName.voidGet the processing instruction based on the aPiName.getProto()Get the reference node for this nodegetProtoed(int nIndex) final TextNodegetText(boolean bPeek, boolean bReturnDefault, boolean bValidate) Gets the first text node child.booleanbooleanhasProto()Check if this node has a reference nodebooleanisContextSensitiveAttribute(int eTag) booleanisDefault(boolean bCheckProto) booleanisSpecified(int eTag, int eType, boolean bCheckProtos, int nOccurrence) voidnotifyPeers(int eventType, String arg1, Object arg2) This method will be called whenever its state changes.booleanperformResolveProtos(boolean bResolveExternalProtos) voidpreSave(boolean bSaveXMLScript) static voidStatic helper method to help prevent memory leaks in the case of circular fragment references.final booleanreResolveProto(boolean bFull) remove any existing proto children and re-resolve the protobooleanresolveProto(ProtoableNode srcProto, boolean bFull, boolean bMarkTransient, boolean bSrcIsExternal) voidsetAttribute(Attribute attr, int eTag) Sets an attribute of this element.setElement(Node child, int eTag, int nOccurrence) Set an element value.setOneOfChild(Node child) In the case where an element may contain a "OneOf" child, this method will set the child element that has the XFA::oneOfChild relationship.voidsetPermsLock(boolean bPermsLock) Sets the permissions state of this node.voidsetProto(ProtoableNode refProto) voidupdateIDValues(String sPrefix, List<String> oldReferenceList) 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, getDeltas, 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, updateFromPeerMethods 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, validateUsageFailedIsFatalMethods 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
-
Constructor Details
-
ProtoableNode
public ProtoableNode()
-
-
Method Details
-
clone
clone will establish any proto relationships -
createProto
-
elementGetAttribute
We need this method so that derived classes can explicitly call the getAttribute() method on Element.- See Also:
-
externalProtoFailed
public final boolean externalProtoFailed() -
fetchIDValues
-
getProtoed
-
getScriptTable
- Overrides:
getScriptTablein classElement
-
updateIDValues
-
getAttribute
Description copied from class:ElementGets this element's attribute whose attribute tag is given.To peek at an attribute, set the peek argument to true. If the attribute is present, it is returned; otherwise null is returned.
To create an attribute, set the peek argument to false. If the attribute is absent, a default attribute is created and returned; for attributes with no default, null is returned.
If validation argument is true, and the validation fails, this method throws.
- Overrides:
getAttributein classElement- Parameters:
eTag- the tag of the attribute.bPeek- whether to peek at the attribute or not.bValidate- whether to validate the attribute or not.- Returns:
- the attribute.
-
getAttributeByName
get the named attribute.- Overrides:
getAttributeByNamein classElement- Parameters:
aAttrName- - the attribute name.bSearchProto- - whether to search protos.- Returns:
- Attribute object, which may be null.
-
getElement
public Element getElement(int eTag, boolean bPeek, int nOccurrence, boolean bReturnDefault, boolean bValidate) Description copied from class:ElementGets this element's sub element whose element tag is given.To return the element, set the returnDefault argument to true. If the element is present, it is returned; otherwise the default element is created and returned.
To peek at the element, set the peek argument to true. If the element is present, it is returned; otherwise null is returned. When set to true, default properties aren't created, and proto references are not expanded.
To create the element, set the peek argument to false. If the element is absent, a default element is created and returned.
If validation argument is true, and the validation fails, this method throws.
If the occurrence argument is out of range, this method throws.
- Overrides:
getElementin classElement- Parameters:
eTag- the tag of the element to retrieve.bPeek- whether to peek at the element, or not.nOccurrence- the n'th occurrence of the element to retrieve.bReturnDefault- whether to create a default element, or not.bValidate- whether to validate the element, or not.- Returns:
- the element, or null.
-
getOneOfChild
- Overrides:
getOneOfChildin classElement
-
getPI
Description copied from class:ElementGet the processing instruction based on the aPiName. If multiple Processing Instructions exist for the same aPiName, all PI's found with that name will be returned.- Overrides:
getPIin classElement- Parameters:
aPiName- the processing instruction's target name. This String must be interned.pis- an input/output parameter that is populated with the values of all the Processing Instructions found for PI name. with the same aPiName.bCheckProtos- if TRUE, check if this element is specified via prototype inheritance. Defaults to FALSE.
-
getPI
Description copied from class:ElementGet the processing instruction based on the aPiName. If multiple Processing Instructions exist for the same aPiName, all PI's found with that name will be returned.- Overrides:
getPIin classElement- Parameters:
aPiName- the processing instructions target namesPropName- the processing instructions property namepis- an input/output parameter that is populated with the values of all the Processing Instructions found for PI name. with the same aPiName.bCheckProtos- if TRUE, check if this element is specified via prototype inheritance. Defaults to FALSE.
-
getProto
Get the reference node for this node- Returns:
- a reference node, a null node if there is none.
-
getExternalProtoSource
Get the external prototype reference node used in the creation of this node- Returns:
- a external reference node, a null node if there is none.
-
getText
Gets the first text node child. New for the Java Port. Modeled on #getElement. -
hasExternalProto
public boolean hasExternalProto() -
hasProto
public boolean hasProto()Check if this node has a reference node- Returns:
- true if this node has a reference node, else false
-
isContextSensitiveAttribute
public boolean isContextSensitiveAttribute(int eTag) -
isDefault
public boolean isDefault(boolean bCheckProto) -
isSpecified
public boolean isSpecified(int eTag, int eType, boolean bCheckProtos, int nOccurrence) - Overrides:
isSpecifiedin classElement
-
notifyPeers
This method will be called whenever its state changes. This will also modify the eventType and notify the parent of this tree- Specified by:
notifyPeersin interfacePeer- Overrides:
notifyPeersin classNode- Parameters:
eventType- the event type as enumerated in this classarg1- additional event informationarg2- additional event information
-
performResolveProtos
public boolean performResolveProtos(boolean bResolveExternalProtos) -
preSave
public void preSave(boolean bSaveXMLScript) -
reResolveProto
public final boolean reResolveProto(boolean bFull) remove any existing proto children and re-resolve the proto- Parameters:
bFull- see resolveProto
-
resolveProto
public boolean resolveProto(ProtoableNode srcProto, boolean bFull, boolean bMarkTransient, boolean bSrcIsExternal) -
setElement
Description copied from class:ElementSet an element value. Must be a valid 0..1 element, (not a oneOfChild or a 0..n child)- Overrides:
setElementin classElement- Parameters:
child- the child to add or set.eTag- only used if oChild isNull -- in which case we remove the element- See Also:
-
setOneOfChild
Description copied from class:ElementIn the case where an element may contain a "OneOf" child, this method will set the child element that has the XFA::oneOfChild relationship. If a "OneOf" child already exists, this method will replace it.- Overrides:
setOneOfChildin classElement- Parameters:
child- the child to set. If this is a null object, any any existing "oneOf" child will be deleted.- See Also:
-
setAttribute
Sets an attribute of this element.- Overrides:
setAttributein classElement- Parameters:
attr- the attribute.eTag- The XFA tag name of the attribute being set.
-
setPermsLock
public void setPermsLock(boolean bPermsLock) Description copied from class:NodeSets the permissions state of this node. Locking a node will cause some attempts to invoke methods or set properties to throw an exception.- Overrides:
setPermsLockin classNode- Parameters:
bPermsLock- the permissions state to set this node to:truewill lock the node;falsewill unlock the node.
-
setProto
-
releaseExternalProtos
Static helper method to help prevent memory leaks in the case of circular fragment references. Recurses through children clearing moExternalProto (Watson 1610012).
-