DOCUMENTS 5 - PortalScripting API
|
The XMLExport class allows to export DOCUMENTS elements as an XML file by scripting means. More...
Public Member Functions | |
boolean | addAccessProfile (var accessProfile) |
Add the desired access profile to the XMLExport. More... | |
boolean | addAlias (String aliasName) |
Add the desired alias to the XMLExport. More... | |
boolean | addCustomProperty (String propName) |
Add the desired global custom property to the XMLExport. More... | |
boolean | addDistributionList (String distributionListName) |
Add the desired distribution list to the XMLExport. More... | |
boolean | addDocumentsSettings () |
Add the DOCUMENTS settings data to the XMLExport. More... | |
boolean | addFellow (var editor, boolean includePrivateFolders=true) |
Add the desired editor (fellow) to the XMLExport. More... | |
boolean | addFile (DocFile docFile, var exportCondition=true) |
Add the desired DocFile object to the XMLExport. More... | |
boolean | addFileType (String fileTypeName) |
Add the desired file type to the XMLExport. More... | |
boolean | addFileTypesFromCategory (String categoryName) |
Add all file types belonging to the specified category to the XMLExport. More... | |
boolean | addFileTypesFromFolder (String folderName) |
Add all file types belonging to the specified file type folder to the XMLExport. More... | |
boolean | addFilingPlan (String filingPlanName) |
Add the desired filing plan to the XMLExport. More... | |
boolean | addFolder (Folder folder, boolean exportStructure, var exportCondition, boolean updateXML=false) |
Add the desired Folder object to the XMLExport. More... | |
boolean | addNumberRange (String name, boolean withCounter=false) |
Add the desired number range alias to the XMLExport. More... | |
boolean | addOutbar (String outbarName) |
Add the desired outbar to the XMLExport. More... | |
boolean | addPartnerAccount (var userAccount, boolean includePrivateFolders=true) |
Add the desired user account (not fellow) to the XMLExport. More... | |
boolean | addPortalScript (String namePattern, String format="5.0") |
Add all PortalScripts with the desired name pattern to the XMLExport. More... | |
boolean | addPortalScriptCall (String nameScript) |
Defines a PortalScript, that will be executed after the XML-import. More... | |
boolean | addPortalScriptsFromCategory (String nameCategory, String format="5.0") |
Add all PortalScripts belonging to the specified category to the XMLExport. More... | |
boolean | addSystemUser (var systemUser, boolean includePrivateFolders=true) |
Add the desired SystemUser (user account or fellow) to the XMLExport. More... | |
boolean | addWorkflow (String workflowName) |
Add the desired workflow to the XMLExport. More... | |
boolean | clearXML () |
Remove all references to DocFile objects from the XMLExport object. More... | |
String | getLastError () |
Function to get the description of the last error that occurred. More... | |
String | getXML () |
Retrieve the XML structure of the DocFile objects already added to the XMLExport. More... | |
boolean | saveXML () |
Performs the final save process of the XML structure. More... | |
XMLExport | XMLExport (String pathFileName, boolean exportDocFile=true) |
Create a new instance of the XMLExport class. More... | |
The XMLExport class allows to export DOCUMENTS elements as an XML file by scripting means.
The exported XML structure may then, for example, be used for further manipulation by an external ERP environment. The following elements can be exported:
The XML files may also be reimported into another (or the same) Portal environment by the Docimport application for DocFile objects and by the XML-import of DOCUMENTS Manager for the remaining elements, respectively.
XMLExport XMLExport::XMLExport | ( | String | pathFileName, |
boolean | exportDocFile = true |
||
) |
Create a new instance of the XMLExport class.
The constructor is neccessary to initialize the XMLExport object with some basic settings. The pathFileName parameter is mandatory, the path must be an existing directory structure, and the target file should not yet exist in that directory structure.
pathFileName | String containing full path and file name of the desired target output XML file |
exportDocFile | Optional boolean value:
true . |
boolean XMLExport::addAccessProfile | ( | var | accessProfile | ) |
Add the desired access profile to the XMLExport.
accessProfile | The desired access profile to be added to the XML output and specified as follows:
|
true
if successful, false
in case of any error boolean XMLExport::addAlias | ( | String | aliasName | ) |
Add the desired alias to the XMLExport.
aliasName | String value containing the technical name of the alias to be added to the XML output. |
true
if successful, false
in case of any error boolean XMLExport::addCustomProperty | ( | String | propName | ) |
Add the desired global custom property to the XMLExport.
propName | The technical name of the desired global custom property to be added to the XML output. |
true
if successful, false
in case of any error boolean XMLExport::addDistributionList | ( | String | distributionListName | ) |
Add the desired distribution list to the XMLExport.
distributionListName | String containing the name of the distribution list to be added to the XML output. |
true
if successful, false
in case of any error boolean XMLExport::addDocumentsSettings | ( | ) |
Add the DOCUMENTS settings data to the XMLExport.
true
if successful, false
in case of any error boolean XMLExport::addFellow | ( | var | editor, |
boolean | includePrivateFolders = true |
||
) |
Add the desired editor (fellow) to the XMLExport.
editor | The editor to be added to the XML output and specified as follows:
|
includePrivateFolders | boolean value indicating whether to export the private folders of the fellow |
true
if successful, false
in case of any error boolean XMLExport::addFile | ( | DocFile | docFile, |
var | exportCondition = true |
||
) |
Add the desired DocFile object to the XMLExport.
docFile | An object of the DocFile class which should be added to the XML output |
exportCondition | Optional export conditions specified as follows:
|
true
if successful, false
in case of any error boolean XMLExport::addFileType | ( | String | fileTypeName | ) |
Add the desired file type to the XMLExport.
The XML output is able to update the same file type (Update-XML).
fileTypeName | The technical name of the file type to be added to the XML output. |
true
if successful, false
in case of any error boolean XMLExport::addFileTypesFromCategory | ( | String | categoryName | ) |
Add all file types belonging to the specified category to the XMLExport.
The XML output is able to update the same file types (Update-XML).
categoryName | The category name of the file types to be added to the XML output. |
true
if successful, false
in case of any error boolean XMLExport::addFileTypesFromFolder | ( | String | folderName | ) |
Add all file types belonging to the specified file type folder to the XMLExport.
The XML output is able to update the same file types (Update-XML).
folderName | The folder name of the file types to be added to the XML output. |
true
if successful, false
in case of any error boolean XMLExport::addFilingPlan | ( | String | filingPlanName | ) |
Add the desired filing plan to the XMLExport.
The XML output is able to update the same filing plan (Update-XML).
filingPlanName | String containing the technical name of the filing plan to be added to the XML output. |
true
if successful, false
in case of any error boolean XMLExport::addFolder | ( | Folder | folder, |
boolean | exportStructure, | ||
var | exportCondition, | ||
boolean | updateXML = false |
||
) |
Add the desired Folder object to the XMLExport.
This function is able to add the folder structure or the files in the folder to the XMLExport.
folder | The Folder object to be added to the XML output. |
exportStructure | Boolean value indicating whether to export the folder structure or the files in the folder, on which the current user has read rights. If you want to export the files in the folder, an XMLExport instance being able to export DocFile should be used. |
exportCondition | The export conditions can be specified as follows:
|
updateXML | Optional boolean value indicating whether the XML output is able to update the same folder (Update-XML) in case of exporting the folder structure. The default value is false. Note: This Parameter is ignored in case of exporting the files in the folder. |
true
if successful, false
in case of any error updateXML
)boolean XMLExport::addNumberRange | ( | String | name, |
boolean | withCounter = false |
||
) |
Add the desired number range alias to the XMLExport.
name | String value containing the technical name of the number range to be added to the XML output. |
withCounter | boolean value indicating whether to export the actual counter value of the number range |
true
if successful, false
in case of any error boolean XMLExport::addOutbar | ( | String | outbarName | ) |
Add the desired outbar to the XMLExport.
outbarName | String value containing the technical name of the outbar to be added to the XML output. |
true
if successful, false
in case of any error boolean XMLExport::addPartnerAccount | ( | var | userAccount, |
boolean | includePrivateFolders = true |
||
) |
Add the desired user account (not fellow) to the XMLExport.
userAccount | The user account to be added to the XML output and specified as follows:
|
includePrivateFolders | boolean value indicating whether to export the private folders of the user account |
true
if successful, false
in case of any error boolean XMLExport::addPortalScript | ( | String | namePattern, |
String | format = "5.0" |
||
) |
Add all PortalScripts with the desired name pattern to the XMLExport.
namePattern | The name pattern of the PortalScripts to be added to the XML output. |
format | Optional String value defining the desired export format. The following formats are available:
|
true
if successful, false
in case of any error boolean XMLExport::addPortalScriptCall | ( | String | nameScript | ) |
Defines a PortalScript, that will be executed after the XML-import.
This method does not export the content of a PortalScript (see XMLExport.addPortalScript()), but executes a PortalScript at the end of the XML-Import of the whole xml file.
nameScript | The name of the PortalScript, that should be executed. |
true
if successful, false
in case of any error boolean XMLExport::addPortalScriptsFromCategory | ( | String | nameCategory, |
String | format = "5.0" |
||
) |
Add all PortalScripts belonging to the specified category to the XMLExport.
nameCategory | The category name of the PortalScripts to be added to the XML output. |
format | Optional String value defining the desired export format. The following formats are available:
|
true
if successful, false
in case of any error boolean XMLExport::addSystemUser | ( | var | systemUser, |
boolean | includePrivateFolders = true |
||
) |
Add the desired SystemUser (user account or fellow) to the XMLExport.
systemUser | The SystemUser to be added to the XML output and specified as follows:
|
includePrivateFolders | boolean value indicating whether to export the private folders of the SystemUser |
true
if successful, false
in case of any error boolean XMLExport::addWorkflow | ( | String | workflowName | ) |
Add the desired workflow to the XMLExport.
workflowName | String containing the technical name and optional the version number of the workflow to be added to the XML output. The format of the workflowName is technicalName [-version]. If you don't specify the version of the workflow, the workflow with the highest workflow version number will be used. If you want to add a specific version, you have to use technicalName-version e.g. "Invoice-2" as workflowName. |
true
if successful, false
in case of any error boolean XMLExport::clearXML | ( | ) |
String XMLExport::getLastError | ( | ) |
Function to get the description of the last error that occurred.
String XMLExport::getXML | ( | ) |
Retrieve the XML structure of the DocFile objects already added to the XMLExport.
The XML structure is returned as a String, so it is possible to further manipulate it (e.g. with the E4X scripting extension (not discussed in this documentation) before outputting it to its final destination.
boolean XMLExport::saveXML | ( | ) |
Performs the final save process of the XML structure.
Not earlier than when executing this instruction the XML file is created in the target file path.
true
if successful, false
in case of any error