Repository.XFRACAS.ImportXFRACASXML: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Template:APIClass|Repository Class|Repository}}
{{Template:API}}{{Template:APIBreadcrumb|10|.[[Repository Class|Repository]]}}


[[Synthesis API Reference|Synthesis API]] allows the programmer to import XML files into XFRACAS. The page contains the logic of that importation. All XML files must first be in the XFRACAS format before they can be successfully imported. To view XFRACAS formats, refer to the [[XFRACAS XML Import Documentation]].


<onlyinclude>Imports data from an XML file into a desired XFRACAS entity. Returns an '''Integer''' that represents the system ID.</onlyinclude>


This is different from importing XML files directly into XFRACAS. If the programmer wishes to import files directly into XFRACAS instead of using Synthesis API, they should view the [[XFRACAS XML Import Documentation]] for the steps of that importation.
All XML files must first be in the XFRACAS format before they can be successfully imported. To view the XFRACAS formats, refer to the [[XFRACAS XML Import Documentation]].


The ImportXFRACASXML method uploads an import byte array for processing and returns the system ID.  
== Syntax ==
 
'''.XFRACAS.ImportXFRACASXML'''(''entityID'', ''importType'', ''byteData'', ''fileTitle'', ''fileDescription'')
 
===Parameters===
 
''entityID''
 
:Integer. The ID number of the XFRACAS entity to import the data into. (Required)
 
''importType''
 
:The type of XFRACAS element (e.g., incident, problem, etc.) to import. Can be any [[XFRACASImportType Enumeration|XFRACASImportType]] constant. (Required)


== Syntax ==
''byteData''
*ImportXFRACASXML( entityID {{APIPrefix|As Integer}}, ImportType {{APIPrefix|As}} [[XFRACASImportType]] , byteData {{APIPrefix|As Byte()}}, fileTitle {{APIPrefix|As String}}, fileDescription {{APIPrefix|As String}}) {{APIPrefix|As Integer}}


Parameters:
:Byte. The byte array of the XML to import. (Required)
:''entityID'':The ID of the entity to import into.


:''ImportType'': The type of XFRACAS Import to utilize, specified as [[XFRACASImportType]].
''fileTitle''


:''byteData'': The byte array of the XML to import.
:String. The file title of the XML file byte array to import. (Required)


:''fileTitle'': The file title of the XML file byte array to import.
''fileDescription''


:''fileDescription'': A description of the XML to import.
:String. A description of the XML to import. (Required)


== Usage Example ==
<!--
{{APIComment|Code Block}}
== Example ==


  '{{APIComment|Declare a new repository connection class.}}
  '{{APIComment|Declare a new repository connection class.}}
Line 55: Line 65:
  {{APIPrefix|Dim}} ImportXMLSystemID {{APIPrefix|As Integer}}
  {{APIPrefix|Dim}} ImportXMLSystemID {{APIPrefix|As Integer}}
  ImportXMLSystemID = MyRepository.XFRACAS.[[Repository.ImportXFRACASXML|ImportXFRACASXML]](DesiredEntityID, [[XFRACASImportType]].Incident, byteArray, "XMLFileTitle", "XMLFileDescription")
  ImportXMLSystemID = MyRepository.XFRACAS.[[Repository.ImportXFRACASXML|ImportXFRACASXML]](DesiredEntityID, [[XFRACASImportType]].Incident, byteArray, "XMLFileTitle", "XMLFileDescription")
-->

Revision as of 18:31, 19 August 2015

APIWiki.png


Member of: SynthesisAPI10.Repository


Imports data from an XML file into a desired XFRACAS entity. Returns an Integer that represents the system ID.

All XML files must first be in the XFRACAS format before they can be successfully imported. To view the XFRACAS formats, refer to the XFRACAS XML Import Documentation.

Syntax

.XFRACAS.ImportXFRACASXML(entityID, importType, byteData, fileTitle, fileDescription)

Parameters

entityID

Integer. The ID number of the XFRACAS entity to import the data into. (Required)

importType

The type of XFRACAS element (e.g., incident, problem, etc.) to import. Can be any XFRACASImportType constant. (Required)

byteData

Byte. The byte array of the XML to import. (Required)

fileTitle

String. The file title of the XML file byte array to import. (Required)

fileDescription

String. A description of the XML to import. (Required)