Package DE_EPAGES::WebInterfacePoolDB::API::Object::ASPoolDB
Provides access to the application server pool database.
Example |
my $ASPoolDB = DE_EPAGES::WebInterfacePoolDB::API::Object::ASPoolDB->new; my $hSite = $ASPoolDB->getInfoSiteByURI( 'www.provider.com', '/epages/MyShop.sf' ); my $DatabaseName = $hSite->{'DatabaseName'}; |
Functions
- deleteSite
- deleteStore
- disconnect
- existsDomainName
- existsSite
- existsStore
- getAllPools
- getDatabasesByPool
- getInfoSiteByURI
- getInfoStore
- getPoolByAS
- getPoolByDatabase
- getSiteByDomainName
- insertSite
- insertStore
- new
- setSiteRequest
- setSiteRequests
- updateSite
- updateStore
deleteSite
Deletes the site.
Syntax |
$ASPoolDB->deleteSite($GUID); |
Input |
|
deleteStore
Deletes a store and all dependent entries.
Syntax |
$ASPoolDB->deleteStore($DatabaseName); |
Example |
$ASPoolDB->deleteStore('Store'); |
Input |
|
disconnect
Disconnects the database. It's recommended to use RunOnPoolDB instead of calling disconnect() directly.
Syntax |
$ASPoolDB->disconnect; |
existsDomainName
Returns true if domainname is used by a different shop.
Syntax |
$exists = $ASPoolDB->existsDomainName( $DomainName, $ObjectPath ); |
Example |
$exists = $ASPoolDB->existsDomainName( 'www.epages.de', '/Shops/MyShop' ); |
Input |
|
Return |
|
existsSite
Returns true if a site with the GUID exists.
Syntax |
$Exists = $ASPoolDB->existsSite($GUID); |
Input |
|
Return |
|
existsStore
Returns true if the Store exists.
Syntax |
$Exists = $ASPoolDB->existsStore($DatabaseName); |
Example |
if( $ASPoolDB->existsStore('Store') ) { ... } |
Input |
|
Return |
|
getAllPools
Returns the names of all application server pools.
Syntax |
$aPoolNames = $ASPoolDB->getAllPools; |
Return |
|
getDatabasesByPool
Returns the database name of a pool.
Syntax |
$DatabaseNames = $ASPoolDB->getDatabasesByPool( $PoolName); |
Example |
$DatabaseNames = $ASPoolDB->getDatabasesByPool( 'StorePool'); |
Input |
|
Return |
|
getInfoSiteByURI
Returns the site information for the web server name and URI. Returns undef if the web server name / uri combination is not found.
Syntax |
$hSite = $ASPoolDB->getInfoSiteByURI( $HttpHost, $URI ); |
Example |
$hSite = $ASPoolDB->getInfoSiteByURI( 'www.provider.com', '/epages/MyShop.sf' ); $hSite = $ASPoolDB->getInfoSiteByURI( 'www.provider.com', '/epages/MyShop.' ); |
Input |
|
Return |
|
getInfoStore
Deletes a store and all dependent entries.
Syntax |
$hStore = $ASPoolDB->getInfoStore($DatabaseName); |
Example |
$hStore = $ASPoolDB->getInfoStore('Store'); |
Input |
|
Return |
|
getPoolByAS
Returns the pool name of an application server. Returns 'DefaultPool' if the application server is not explicitely assigned to a pool.
Syntax |
$PoolName = $ASPoolDB->getPoolByAS( $IP, $Port ); |
Example |
$PoolName = $ASPoolDB->getPoolByAS( '127.0.0.1', 10045 ); |
Input |
|
Return |
|
getPoolByDatabase
Returns the pool name of a database. Returns 'DefaultPool' if the database is not explicitely assigned to a pool.
Syntax |
$PoolName = $ASPoolDB->getPoolByDatabase( $DatabaseName); |
Example |
$PoolName = $ASPoolDB->getPoolByDatabase( 'Store'); |
Input |
|
Return |
|
getSiteByDomainName
Returns the site that is the owner of the given domain. Returns undef if the domain does not exist or if the owner is NULL.
Syntax |
$hSite = $ASPoolDB->getSiteByDomainName( $DomainName ); |
Example |
$hSite = $ASPoolDB->getSiteByDomainName( 'www.epages.de' ); |
Input |
|
Return |
|
insertSite
Inserts a site. Updates the GUID of the site if the $DatabaseName/$ObjectPath combination already exists.
Syntax |
$ASPoolDB->insertSite($DatabaseName, $GUID, $ObjectPath); |
Example |
$ASPoolDB->insertSite('Store', 'E882746E-56EA-4EA7-B36E-B9299C648A34', '/Shops/DemoShop'); |
Input |
|
insertStore
Inserts a store.
Syntax |
$ASPoolDB->insertStore($DatabaseName, $GUID); |
Example |
$ASPoolDB->insertStore('Store', 'E882746E-56EA-4EA7-B36E-B9299C648A34'); |
Input |
|
new
Connects to the application server pool database.
Syntax |
$ASPoolDB = DE_EPAGES::WebInterfacePoolDB::API::Object::ASPoolDB->new; |
Return |
|
setSiteRequest
set domain and uri for site.
Syntax |
$ASPoolDB->setSiteRequest($DatabaseName, $ObjectPath, $Host, $URI ); |
Example |
$ASPoolDB->setSiteRequest('Store', '/Shops/DemoShop', 'www.provider.com', '/epages/MyShop.sf'); |
Input |
|
setSiteRequests
set domain and uri for site.
Syntax |
$ASPoolDB->setSiteRequests($DatabaseName, $ObjectPath, $ahEntries); |
Example |
$ASPoolDB->setSiteRequests('Store', '/Shops/DemoShop', [{ 'Host'=>'www.provider.com', 'URI'=>'/epages/MyShop.' }]); |
Input |
|
updateSite
Updates the site.
Syntax |
$ASPoolDB->updateSite($GUID, $hValues); |
Input |
|
updateStore
Updates a store.
Syntax |
$ASPoolDB->updateStore($DatabaseName, $hStore); |
Example |
$ASPoolDB->updateStore('Store', { PoolID => $PoolID }); |
Input |
|