ePages 6.11.0 - DE_EPAGES/Presentation/API/PresentationInstaller.pm

Package DE_EPAGES::Presentation::API::PresentationInstaller

Install/patch/uninstall page types and forms. Processes Database/XML/PageTypes*.xml and Database/XML/Forms*.xml files. Use functions DE_EPAGES::Object::API::ObjectInstaller::onPatchDeleteObjects, DE_EPAGES::Object::API::ObjectInstaller::onPatchImportObjects to patch pagetypes.

Base
DE_EPAGES::Permission::API::PermissionInstaller

Functions

copyWebRootFiles
install
onPatchCopyWebRootFile
onPatchDeleteWebRootDirectory
onPatchDeleteWebRootFile
uninstall

copyWebRootFiles

Copies files from Data/WebRoot to EPAGES_WEBROOT with backup in EPAGES_STORES/STORE_NAME/Backup/Data/WebRoot. The files are copied to the DocRoot directory if the directory name starts with 'Data/WebRoot/Doc/' and DocRoot is a sub directory of System.WebRoot. Overrides DE_EPAGES::Core::API::FileInstaller::copyWebRootFiles.

Syntax
$Installer->copyWebRootFiles();
Example
$Installer->copyWebRootFiles();

install

Installs files Database/XML/PageTypes*.xml and Database/XML/Forms*.xml Database/XML/Translation.HelpTopics*.xml on installation process.

Syntax
$self->install

onPatchCopyWebRootFile

Copies a file from Data/WebRoot to EPAGES_WEBROOT. If the target file already exists and has been modified, i.e. OldMD5Digest does not match, then the file is not replaced and the following warning appears in the log file: "'$Source' not copied. File '$Target' was not overwritten because the original target file has been modified." If the target file is replaced by a new file, a backup copy is created. The file is copied to the DocRoot directory if the file name start with 'Data/WebRoot/Doc/' and DocRoot is a sub directory of System.WebRoot. Overrides DE_EPAGES::Core::API::FileInstaller::onPatchCopyWebRootFile.

Syntax
$Installer->onPatchCopyWebRootFile($File, $hParams);
Example
$Installer->onPatchCopyWebRootFile(
          'Data/WebRoot/BO/icons/context_ico_s_helpbook.gif',
          {'CVS' => 'Changed',
           'OldMD5Digest' => '4c832c34a88de899dab3d00b7ccca632'
          });
Input
$File (string)
cartridgefilename without cartridge directory
$hParams (ref.hash.*)
patch file parameters, keys are
  • CVS - could be New or Changed - string
  • OldMD5Digest - md5 hex digest of the old release of the file
    (only for files with CVS= 'Changed')
    - string

onPatchDeleteWebRootDirectory

Deletes the directory $Directory in EPAGES_WEBROOT. Deletes the directory in the DocRoot directory if the file name start with 'Data/WebRoot/Doc/' and DocRoot is a sub directory of System.WebRoot. Overrides DE_EPAGES::Core::API::FileInstaller::onPatchDeleteWebRootDirectory.

Syntax
$Installer->onPatchDeleteWebRootDirectory($Directory, $hParams);
Example
$Installer->onPatchDeleteWebRootDirectory(
          'Data/WebRoot/Doc/Help/de/ClickAndBuy',
          {'CVS' => 'Removed',
          });
Input
$Directory (string)
cartridgeDirectoryName without cartridge directory
$hParams (ref.hash.*)
patch Directory parameters, keys are
  • CVS - could only be Removed - string

onPatchDeleteWebRootFile

Deletes a file in EPAGES_WEBROOT. If the target file has been modified, i.e. OldMD5Digest does not match, then the file is not deleted and the following warning appears in the log file: "File '$Target' was not deleted because the original target file has been modified." Deletes the file in the DocRoot directory if the file name start with 'Data/WebRoot/Doc/' and DocRoot is a sub directory of System.WebRoot. Overrides DE_EPAGES::Core::API::FileInstaller::onPatchDeleteWebRootFile.

Syntax
$Installer->onPatchDeleteWebRootFile($File, $hParams);
Example
$Installer->onPatchDeleteWebRootFile(
         'Data/WebRoot/BO/icons/context_ico_s_helpbook.gif',
          {'CVS' => 'Removed',
           'OldMD5Digest' => '4c832c34a88de899dab3d00b7ccca632'
          });
Input
$File (string)
cartridgefilename without cartridge directory
$hParams (ref.hash.*)
patch file parameters, keys are
  • CVS - could only be Removed - string
  • OldMD5Digest - md5 hex digest of the old release of the file
    - string

uninstall

Uninstalls files Database/XML/Forms*.xml and Database/XML/PageTypes*.xml on uninstallation process.

Syntax
$self->uninstall