ePages 6.15.1 - DE_EPAGES/Installer/API/EpagesJ.pm

Package DE_EPAGES::Installer::API::EpagesJ

Functions for handling epagesj

@EXPORT_OK
GetEpagesJVersion
GetEpagesJZipUrl
GetEpagesJEtcUrl
UpdateEpagesJEtc
UpdateEpagesJ
UnpackEpagesJ
AddEpagesJService
AddMongoDBService

Functions

AddEpagesJService
AddMongoDBService
GetEpagesJEtcUrl
GetEpagesJVersion
GetEpagesJZipUrl
UnpackEpagesJ
UpdateEpagesJ
UpdateEpagesJEtc

AddEpagesJService

Adds windows epagesj services (does nothing under Linux)

Syntax
AddEpagesJService();

AddMongoDBService

Adds windows mongodb service (does nothing under Linux)

Syntax
AddMongoDBService($MongoBinDir, $MongoDataDir, $hFlags);
Input
$MongoBinDir (string)
directory that contains the mongodb executables
$MongoDataDir (string)
directory that contains the mongodb data
$hFlags (ref.hash)
flags
  • remove - uninstall service
  • reinstall - uninstall service and install again

GetEpagesJEtcUrl

Returns URL for epagesj start/stop scripts (Linux) on the download site.

Syntax
$DownloadUrl = GetEpagesJEtcUrl($Version);
Input
$Version (string)
version is either empty, then get the URL for the latest
version, or epages version string as 6.15.0, or snapshot
version as 6.15.0-SNAPSHOT (only epages internal use)
Return
$DownloadUrl (string)
download URL

GetEpagesJVersion

Get version of installed epagesj as defd. in j/webapps/epagesj.version Returns 0 unless installed.

Syntax
$Version = GetEpagesJVersion();
Return
$Version (string)
version of installed epagesj

GetEpagesJZipUrl

Returns URL for epagesj.zip on the download site.

Syntax
$DownloadUrl = GetEpagesJZipUrl($Version);
Input
$Version (string)
version is either empty, then get the URL for the latest
version, or epages version string as 6.15.0, or snapshot
version as 6.15.0-SNAPSHOT (only epages internal use)
Return
$DownloadUrl (string)
download URL

UnpackEpagesJ

Updates $ENV{EPAGESJ} with package $EpagesJZip.

Syntax
UnpackEpagesJ($EpagesJZip, $OldVersion, $NewVersion);
Input
$EpagesJZip (string)
path to epagesj zip file
$OldVersion (string)
installed epagesj version
$NewVersion (string)
epagesj version to be installed

UpdateEpagesJ

If $Version is set, upgrades/downgrades/installs epagesj. If $Version is unset, installs epagesj unless installed. Does nothing if installed and new version are same. Returns error if upgrade/downgrade/install fails.

Syntax
$Update = UpdateEpagesJ($Version, $Source);
Input
$Version (string)
version is one of:
- empty : update epagesj to the latest version
- epages version (6.15.0) : upgrade/downgrade to specific
version if exists, else use snapshot version (6.15.0-SNAPSHOT)
- snapshot version (6.15.0-SNAPSHOT) : upgrade/downgrade to
specific snapshot version (only epages internal use)
$Source (string)
download epagesj from source (file/URL)
Return
$Update (boolean)
true if epagesj was updated, else false

UpdateEpagesJEtc

Updates epagesj start/stop scripts (Linux).

Syntax
UpdateEpagesJEtc($OldVersion, $NewVersion);
Input
$OldVersion (string)
installed epagesj version
$NewVersion (string)
epagesj version to be installed