ePages 6.10 - DE_EPAGES/XML/API/XMLInstaller.pm

Package DE_EPAGES::XML::API::XMLInstaller

Adds dependencies functions for cartridge installer via Dependencies.xml file at each cartridge Database/XML directory. Adds patch functions for cartridge installer via patch.xml file at each cartridge Patches/Patch_xx_xx directory.

Base
DE_EPAGES::Core::API::FileInstaller

Functions

directRequiredCartridges
importPatch
importPatchDir
patchLanguages
patchXMLByFunctionName
requiredCartridgeComment
supportedVersions
xmlDirectory

directRequiredCartridges

Returns a list of all cartridges that are directly required by this cartridges. The list is created from the Dependencies.xml file. The list does not include indirectly required cartridges.

Syntax
$aRequiredCartridges = $Installer->directRequiredCartridges;
Return
$aRequiredCartridges (ref.array.object)
list of cartridge objects

importPatch

processes patch.xml via xml import DE_EPAGES::XML::API::XML::PatchImportHandler::importXML

Syntax
$NewVersion = $Installer->importPatch($PatchXMLFile, $PatchSection);
Example
my $FunctionName = GetCallerFunction();
my $PatchXMLFile = $self->patchXMLByFunctionName($FunctionName);
$self->importPatch($PatchXMLFile, 'PatchDBStructure');
$self->importPatch($PatchXMLFile, 'Patch');
Input
$PatchFileName (string)
FileName incl. directory for patch.xml
$PatchSection (string)
'PatchDBStructure' or 'Patch'
Return
$NewVersion (string)
new version of the cartridge after installing the patch

importPatchDir

Processes the file patch.xml in the directory Patches/$PatchSubDir if it exists.

Syntax
$NewVersion = $Installer->importPatchDir($PatchSubDir, $PatchSection);
Example
$NewVersion = $self->importPatchDir('Patch_6_9_0', 'Patch');
Input
$PatchSubDir (string)
name of the sub directory of 'Patches'
$PatchSection (string)
'Patch' or 'PatchCartridgeDir' or 'PatchDBStructure'
Return
$NewVersion (string)
new version of the cartridge after installing the patch

patchLanguages

Processes all existing files patch.*.xml in the directory Patches/$PatchSubDir.

Syntax
$Installer->patchLanguages($PatchSubDir, $PatchSection);
Example
$self->patchLanguages('Patch_6_9_0', 'PatchCartridgeDir');
Input
$PatchSubDir (string)
name of the sub directory of 'Patches'
$PatchSection (string)
'Patch' or 'PatchCartridgeDir'

patchXMLByFunctionName

Returns FileName to the patch.xml in the correct patch directory e.g. 'C:\epages\Cartridges\DE_EPAGES\Cartridge\Patches\Patch_1_0\patch.xml'. this should be used by importPatch

Syntax
$PatchXMLFile = $Installer->patchXMLByFunctionName($FunctionName);
Example
my $FunctionName = GetCallerFunction();
my $PatchXMLFile = $self->patchXMLByFunctionName($FunctionName);
$self->importPatch($PatchXMLFile, 'Patch');
Input
$FunctionName (string)
patch_x_x or patchDBStructure_x_x funtion
Return
$PatchXMLFile (string)
FileName to patch file

requiredCartridgeComment

Returns a verbal description about why the cartridge is required.

Syntax
$Comment = $Installer->requiredCartridgeComment( $Package );
Example
$Comment = $Installer->requiredCartridgeComment( 'DE_EPAGES::Object' );
Input
$Package (string)
package name of a required cartridge
Return
$Comment (string)
description of the dependency

supportedVersions

Returns versions of package which are supported. If no versions are returned, all versions supported.

Syntax
$Versions = $Installer->supportedVersions($Package);
Input
$Package (string)
dependent packages of installer cartridge
Return
$Versions (ref.array.string)
version strings

xmlDirectory

Returns xml install/uninstall directory.

Syntax
$Directory = $Installer->xmlDirectory;
Return
$Directory (string)
directory where the xml files stored