Package com.adobe.xfa.configuration
Class ConfigurationModel
java.lang.Object
com.adobe.xfa.Obj
com.adobe.xfa.Node
com.adobe.xfa.Element
com.adobe.xfa.Model
com.adobe.xfa.configuration.ConfigurationModel
- All Implemented Interfaces:
Element.DualDomNode,Peer
A class to model the collection of all XFA nodes that make
up form config.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.adobe.xfa.Model
Model.DualDomModel, Model.PublisherNested 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 TypeMethodDescriptionstatic StringNamespacecreateElement(Element parent, Node prevSibling, String uri, String localName, String qName, Attributes attributes, int lineNumber, String fileName) Create an element based on the parameters provided by the SAX handler.createNode(int eTag, Element parent, String aName, String aNS, boolean bDoVersionCheck) Create an element with the given tag, parent, name and uri.getCommonNode(String sSchemaName) Retrieve the common ConfigurationKey node.static ConfigurationModelgetConfigurationModel(AppModel appModel, boolean bCreateIfNotFound) Gets the configuration model held within an XFA DOM hierarchy.getConfigValue(String sSOM, BooleanHolder isDefault) Gets the value of a configuration value node.booleangetConfigValue(String sSOM, StringBuilder sValue) Gets the value of a configuration value node.intgetNS()Gets this element's namespace.booleanisVersionCompatible(int nVersion, int nTargetVersion) voidmergeModel(ConfigurationModel oModel) booleanpublish(Model.Publisher publisher) Publish the model to an Application Storage facility.intremapTag(int eTag) Remap a given tag to a new value.Methods inherited from class com.adobe.xfa.Model
addErrorList, addUseHRefNode, addUseNode, addXMLLoadErrorContext, allowUpdates, checkforCompatibleNS, clearErrorList, clone, createElement, createElement, createElement, createElement, createTextNode, createTextNode, doAttributeCleanup, getAliasNode, getAppModel, getAppModelIsTransient, getCachedLocale, getContext, getCurrentVersion, getDelta, getDeltas, getDocument, getErrorContextList, getErrorList, getEventManager, getGenerator, getIDValueMap, getLegacySetting, getLogMessenger, getName, getNeedsNSNormalize, getNode, getOriginalVersion, getOriginalVersionNode, getOriginalXFAVersion, getProtoList, getSchema, getScriptTable, getSourceBelow, getVersion, getXmlPeer, isCompatibleNS, isContainer, isLoading, loadNode, loadRootAttributes, loadSpecialAttribute, loadSpecialNode, modelCleanup, nodeCleanup, normalizeNameSpaces, normalizeNameSpaces, normalizeNameSpaces, preLoadNode, preSave, ready, remove, removeLastError, removeReferences, resolveNodes, resolveProtos, serialize, setAliasNode, setAppModel, setAppModelIsTransient, setContext, setCurrentVersion, setDOMProperties, setIDValueMap, setName, setNeedsNSNormalize, setOriginalXFAVersion, setXmlPeer, shortCutName, validateUsage, validateUsageFailedIsFatal, willDirtyDoc, willDirtyDocMethods 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, getAtom, getAttr, getAttribute, getAttribute, getAttributeByName, getAttrIndex, getAttrName, getAttrNS, getAttrProp, getAttrQName, getAttrVal, getChildReln, getClassAll, getClassIndex, getClassName, getDeltas, getElement, getElement, getElementClass, getElementLocal, getEnum, getEnum, getEventTable, getFirstXFAChild, getFirstXMLChild, getID, getIndex, getInheritedNS, getInstalledLocale, getIsNull, getLastXMLChild, getLineNumber, getLocalName, getModel, getNode, getNodes, getNodeSchema, getNumAttrs, getOneOfChild, getOneOfChild, getPI, getPI, getPrefix, getProperty, getProperty, getSaveXMLSaveTransient, getSchemaType, getScriptMethodInfo, getSibling, getText, getXFAChild, getXMLChild, getXMLName, getXPath, getXsiNilAttribute, inhibitPrettyPrint, inhibitPrettyPrint, insertChild, isFragment, isHidden, isHidden, isIndexed, isInstalledLocaleAmbient, isLeaf, isNameSpaceAttr, isPropertySpecified, isPropertySpecified, isPropertyValid, isSpecified, 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, setAttribute, setAttribute, setAttribute, setAttribute, setAttrProp, setDefaultFlag, setElement, setIsDataWindowRoot, setIsIndexed, setLineNumber, setLocalName, setModel, setNS, setOneOfChild, 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, isDefault, isDirty, isMapped, isPermsLockSet, isTransient, locateChildByClass, locateChildByName, logValueChangeHelper, notifyPeers, performSOMAssignment, resolveNode, resolveNode, resolveNode, resolveNodes, sendMessenge, setDirty, setDocument, setLocked, setMapped, setPermsLock, setPrivateName, setWillDirty, setXfaPeer, unLock, validateSchemaMethods 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
-
ConfigurationModel
Default Constructor.
-
-
Method Details
-
createNode
Description copied from class:ModelCreate an element with the given tag, parent, name and uri.- Specified by:
createNodein classModel- Parameters:
eTag- the element's tag.parent- the element's parent.aName- the element's name.aNS- the element's namespace.bDoVersionCheck- check the element's version.- Returns:
- a new element.
- See Also:
-
getHeadNS
-
getConfigurationModel
public static ConfigurationModel getConfigurationModel(AppModel appModel, boolean bCreateIfNotFound) Gets the configuration model held within an XFA DOM hierarchy.- Parameters:
appModel- the application model.bCreateIfNotFound- when set, create a model if necessary.- Returns:
- the configuration model or null if none found.
-
configurationNS
Namespace- Returns:
- The configuration namespace URI string
-
getBaseNS
-
isVersionCompatible
public boolean isVersionCompatible(int nVersion, int nTargetVersion) - Overrides:
isVersionCompatiblein classModel- See Also:
-
getNS
Description copied from class:ElementGets this element's namespace. -
getConfigValue
Gets the value of a configuration value node.If the node doesn't exist, the default value will be returned.
- Parameters:
sSOM- A SOM expression specifying the configuration value node.isDefault- a scalar which is set to true if the node exists, and false if the node does not exist and the value returned is a default value.- Returns:
- the retrieved attribute.
-
getConfigValue
Gets the value of a configuration value node.If the node doesn't exist, the default value will be returned.
- Parameters:
sSOM- A SOM expression specifying the configuration value node.sValue- The retrieved value.- Returns:
- true if the node exists, and false if the node does not exist and the value returned is a default value.
-
getHeadVersion
public int getHeadVersion()- Overrides:
getHeadVersionin classModel
-
getCommonNode
Retrieve the common ConfigurationKey node. For a particular schema root. The schema root must have the common property child.- Parameters:
sSchemaName- The name of the root of the schema.- Returns:
- The common ConfigurationKey, null if common is not a valid property of the root node.
-
createElement
public Element createElement(Element parent, Node prevSibling, String uri, String localName, String qName, Attributes attributes, int lineNumber, String fileName) Create an element based on the parameters provided by the SAX handler.- Overrides:
createElementin classModel- Parameters:
parent- the element's parent, if any.prevSibling- the element's previous sibling, if any.uri- namespace for this element.localName- local name for this element.qName- qualified name for this element.attributes- structure containing attribute definitions.- Returns:
- a new Element created according to our schema.
-
mergeModel
-
remapTag
public int remapTag(int eTag) Remap a given tag to a new value. This gives a model a chance to remap a tag to a new value after it's determined that the original wasn't valid in the current context. This implementation simply returns XFA.CONFIGURATIONKEYTAG. It should be clever enough to determine either KEY or VALUE in the same way that XFAConfigurationModelImpl::getNodeType does on the C++ side, but that's not possible here due to the single DOM. Post-load fix-ups should recategorize this KEY to a VALUE when necessary. -
publish
Description copied from class:ModelPublish the model to an Application Storage facility. This involves updating all external references (such as image hrefs) such that they point to local collateral. The actual details of this are left up to the implementer of the class derived from Model.Publisher specified in the oPublisher parameter. What publish() itself does is recursively traverse the tree structure of the model. When an external reference is encountered (for example, the href attribute of an image node), the updateExternalRef() method is called. The node, attribute identifier and original value of the external reference are passed to updateExternalRef(). The derived class should copy the collateral to the application storage area (if desired), and should update the value of sExternalRefValue to indicate the new value for the external reference (probably some sort of relative path). If an external reference stored as an element value (for example, a uri node) is encountered, updateExternalRef is called with node and the eAttribute arg is set to XFA.TEXTNODETAG. Two or more instances of an identical external reference result in only one call to updateExternalRef(), because returned values are cached and reused. If called on the AppModel, this method recursively calls publish on all contained models.
-