Package DE_EPAGES::Cartridge::API::CartridgeInstaller
Cartridge installer for the Cartridge cartridge.
It registers cartridge at store database.
Functions
- addDependency
- directDependentCartridges
- finishInstall
- finishPatch
- finishPatchDBStructure
- finishUninstall
- getDBStructureVersion
- id
- insertRequiredCartridges
- installedVersion
- isCompliant
- isInstalled
- removeDependency
- setDBStructureVersion
- setVersion
- startInstall
- startPatch
- startPatchDBStructure
- startUninstall
- testDBVersionPatch
- testDependentCartridges
- testPatch
addDependency
Adds a cartridge to dependencies of executed cartridge and
install required cartridge if this is not installed.
Updates the comment if the cartridge dependency is alreads registered.
Syntax |
$Installer->addDependency($CartridgePackage, $Comment);
|
Example |
$Installer->addDependency('DE_EPAGES::Design', 'adds navigation elements');
|
Input |
- $CartridgePackage (string)
- required cartridge
- $Comment (string)
- reason for the dependency (optional)
|
directDependentCartridges
Returns a list of cartridges that have declared dependencies on this
cartridge. The list is generated from the database table
'cartridgedependency'.
Syntax |
$Installer->directDependentCartridges;
|
Return |
- $aDependentCartridges (ref.array.object)
- list of cartridge objects
|
finishInstall
Updates entry at cartridge table with state STATE_INSTALLED.
Syntax |
$Installer->finishInstall;
|
finishPatch
Updates entry at cartridge table with state STATE_INSTALLED.
Syntax |
$Installer->finishPatch;
|
finishPatchDBStructure
Syntax |
$Installer->finishPatchDBStructure;
|
finishUninstall
Removes the cartridge entry from the database (table 'cartridge').
Syntax |
$Installer->finishUninstall;
|
getDBStructureVersion
Returns the current database structure version.
Syntax |
$DBStructureVersion = $Installer->getDBStructureVersion;
|
id
Returns the cartridge id in the database or undef if the cartridge is
not installed in the current database.
Syntax |
$CartridgeID = $Installer->id;
|
Return |
- $CartridgeID (integer)
- cartridge id
|
insertRequiredCartridges
Inserts required cartridges into the cartridgedependency table.
Syntax |
$Installer->insertRequiredCartridges;
|
installedVersion
gets the installed Version for the cartridge.
Syntax |
my $InstalledVersion = $Installer->installedVersion();
|
isCompliant
Is the supported version complaint to the new version of patch.
Syntax |
$IsCompliant = $Installer->isCompliant($RequiredVersion, $SupportedVersion);
|
Input |
- $RequiredVersion (string)
- required version
- $SupportedVersion (string)
- supported version (optional default version in database)
|
Return |
- $IsCompliant (boolean)
- true if the required cartridge is compatible
|
isInstalled
Returns true if the cartridge is installed in the current database.
Syntax |
$IsInstalled= $Installer->isInstalled;
|
Return |
- $IsInstalled (boolean)
- true if the cartridge is installed
|
removeDependency
removes a cartridge to dependencies of executed cartridge.
Syntax |
$Installer->removeDependency($CartridgePackage);
|
Input |
- $CartridgePackage (string)
- not longer required cartridge
|
setDBStructureVersion
Sets the current database structure version.
Syntax |
$Installer->setDBStructureVersion( $Version );
|
setVersion
Updates entry at cartridge table with Version $NewVersion.
Syntax |
$Installer->setVersion($NewVersion);
|
Input |
- $NewVersion (string)
- version
|
startInstall
Inserts entry at cartridge table with state STATE_INSTALLATION.
Syntax |
$Installer->startInstall;
|
startPatch
Updates entry at cartridge table with state STATE_PATCH.
Syntax |
$Installer->startPatch;
|
startPatchDBStructure
Sets the cartridge InstallState to STATE_PATCHDBSTRUCTURE.
Syntax |
$Installer->startPatchDBStructure;
|
startUninstall
Sets the install state of the cartridge to STATE_DEINSTALLATION.
Syntax |
$Installer->startUninstall;
|
testDBVersionPatch
Tests if cartridge can patch database version.
Calls DE_EPAGES::Core::API::BaseInstaller::addReason if the
currently installed version cannot be updated.
Syntax |
$Installer->testDBVersionPatch($DBVersion);
|
Input |
- $DBVersion (string)
- version
|
testDependentCartridges
Tests if new version cartridge package is isCompliant to dependent
cartridges.
Calls DE_EPAGES::Core::API::BaseInstaller::addReason for each
cartridge that does not exist with a supported version.
Syntax |
$Installer->testDependentCartridges;
|
testPatch
Test if cartridge package is complaint to the existing enviroment.
Calls DE_EPAGES::Core::API::BaseInstaller::addReason for each
reason why the cartridge cannot be updated, for example if one or more
required cartridges are not installed with a supported version.
Syntax |
$Installer->testPatch;
|