Skip to main content

%XML.Exchange

abstract class %XML.Exchange extends %Library.RegisteredObject

The %XML.Exchange class provides an interface for managing XML representations of objects.

Method Inventory

Methods

classmethod AssignGUIDs() as %Status
This method will assign GUIDs to all Exchange Items of the system without a GUID.
classmethod CheckGUIDs(ApplyChange As %Boolean = 0) as %Status
This method looks for inconsistencies in the GUID allocation. It may optionally correct problems if possible.
The identifiable issues and their resolutions are:
  • GUID entry missing OID cross reference
    • If the object exists then add the OID cross reference
    • If the object does not exist then remove the GUID entry
  • GUID entry conflicts with OID cross reference
    • Manual intervention required
  • GUID entry for missing object
    • Remove both the GUID entry and the OID cross reference
  • GUID entry for missing class
    • Remove both the GUID entry and the OID cross reference
  • OID cross reference missing GUID entry
    • If the object exists add the GUID entry
    • If the object does not exist remove the OID cross reference
  • OID cross reference conflicts with GUID entry
    • Manual intervention required

The method will output results as the check proceeds and show a tally when the check is complete.
classmethod Export(items As %String = "", ByRef filename As %String = "", qspec As %String = "", ByRef errorlog As %String, Charset As %String = "") as %Status
Export Exchange Items to an XML file

Each of the items must be of a type that extends the %XML.Exchange.Adaptor class: If exporting multiple Exchange Items pass the items("oid")="" as an array.

If the output filename is empty, matching Exchange Items will be exported to the current device.

classmethod ExportAllDir(dir As %String = "", qspec As %String = "", ByRef errorlog As %String, Charset As %String = "", ByRef exported As %GlobalCharacterStream = ##class(%GlobalCharacterStream).%New()) as %Status
Export all Exchange Items from the system to a directory.
classmethod ExportDir(items As %String = "", dir As %String = "", qspec As %String = "", ByRef errorlog As %String, Charset As %String = "", ByRef exported As %GlobalCharacterStream = ##class(%GlobalCharacterStream).%New(), header As %Boolean = 1) as %Status
Export Exchange Items to a directory.

The directory structure created is based on the type of Exchange Items being exported. The file names used can be controlled by the /name qualifier.

Each of the items must be of a type that extends the %XML.Exchange.Adaptor class. If exporting multiple Exchange Items pass the items("oid")="" as an array.

classmethod ExportTableDir(class As %String = "", dir As %String = "", qspec As %String = "", ByRef errorlog As %String, Charset As %String = "", ByRef exported As %GlobalCharacterStream = ##class(%GlobalCharacterStream).%New()) as %Status
Export all Exchange Items from a given table to a directory.
classmethod GetDescription(Oid As %String) as %String
Returns a description to be used for the element. This value is based on the objects XMLExchangeName method.
classmethod GetPath(Root As %String, Oid As %List, qspec As %String = "") as %String
Get full normalised path to the external file that would be exported to given a root directory. Qualifiers can be used to indicate the naming convention to be used.
classmethod Load(ByRef filename As %String = "", qspec As %String = "", ByRef errorlog As %String, ByRef loaded As %GlobalCharacterStream = ##class(%GlobalCharacterStream).%New(), listonly As %Boolean, ByRef selecteditems As %String, displayname As %String, header As %Boolean = 1, charset As %String = "") as %Status
Load a file from disk into Cache.

Load Exchange Items from the file file. Returns an stream of Exchange Items it loaded in loaded, You may give it a list of files to load via a single subscripted array. If you pass listonly as true then it will not load anything but just list the Exchange Items that exist in the files that you supply it.
If selecteditems is defined then this will contain a single subscripted array of items to load. It will only load items that are in this list from the file/s provided, so this provides a way to limit which items get loaded.
qspec is a list of qualifiers which can be displayed with 'Do ##class(%XML.Exchange).ShowQualifiers()'

classmethod LoadDir(dir As %String = "", qspec As %String = "", ByRef errorlog As %String, recurse As %Boolean = 1, ByRef loaded As %GlobalCharacterStream = ##class(%GlobalCharacterStream).%New(), listonly As %Boolean = 0, ByRef selectedlist As %String, header As %Boolean = 1) as %Status
Load all Exchange Items from XML files in a directory.
classmethod ShowQualifiers(group As %String = "XML.Exchange")
Display the list of qualifiers defined in the system.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab