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
- _findPool
- deletePool
- deleteSite
- deleteStore
- disconnect
- existsDomainName
- existsPool
- existsSite
- existsStore
- getDatabasesByPool
- getInfoPool
- getInfoSiteByObjectPath
- getInfoSiteByURI
- getInfoStore
- getPoolByDatabase
- getSiteByDomainName
- insertPool
- insertSite
- insertStore
- invalidateCache
- needCacheReset
- needsFullCacheReset
- new
- searchSiteByDomainName
- setDatabasePool
- setSiteRequest
- setSiteRequests
- updateSite
- updateStore
_findPool
Returns the pool id if the Pool exists, otherwise undef.
Syntax |
$PoolID = $ASPoolDB->_findPool($PoolName); |
Example |
if( $ASPoolDB->existsPool('DefaultPool') ) { ... } |
Input |
|
Return |
|
deletePool
Deletes the pool by name.
Syntax |
$ASPoolDB->deletePool($PoolName); |
Input |
|
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 |
|
existsPool
Returns true if the Pool exists.
Syntax |
$Exists = $ASPoolDB->existsPool($PoolName); |
Example |
if( $ASPoolDB->existsPool('DefaultPool') ) { ... } |
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 |
|
getDatabasesByPool
Returns the database name of a pool.
Syntax |
$DatabaseNames = $ASPoolDB->getDatabasesByPool( $PoolName); |
Example |
$DatabaseNames = $ASPoolDB->getDatabasesByPool( 'StorePool'); |
Input |
|
Return |
|
getInfoPool
Returns information about a pool.
Syntax |
$hPool = $ASPoolDB->getInfoPool($PoolName); |
Input |
|
Return |
|
getInfoSiteByObjectPath
Returns the site information for the Store and Objectpath.
Syntax |
$hSite = $ASPoolDB->getInfoSiteByObjectPath( $Store, $ObjectPath ); |
Example |
$hSite = $ASPoolDB->getInfoSiteByObjectPath( 'Store', '/Shops/DemoShop' ); |
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
Returns information about a store.
Syntax |
$hStore = $ASPoolDB->getInfoStore($DatabaseName); |
Example |
$hStore = $ASPoolDB->getInfoStore('Store'); |
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 |
|
insertPool
Adds a new pool.
Syntax |
$PoolID = $ASPoolDB->insertPool($PoolName); |
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 |
|
invalidateCache
Marks the site GUID as invalid in the ASPoolDBCacheServer.
Syntax |
$CacheResetRequired = $ASPoolDB->invalidateCache( $GUID ); |
Input |
|
needCacheReset
Returns the GUIDs of sites that the ASPoolDB cache server should delete from its cache.
Syntax |
$aSiteGUIDs = $ASPoolDB->needCacheReset |
Return |
|
needsFullCacheReset
Returns true if the ASPoolDB cache server should reset its complete cache.
Syntax |
$Reset = $ASPoolDB->needsFullCacheReset |
Return |
|
new
Connects to the application server pool database.
Syntax |
$ASPoolDB = DE_EPAGES::WebInterfacePoolDB::API::Object::ASPoolDB->new; |
Return |
|
searchSiteByDomainName
Returns the sites corresponding a given domain pattern. Returns undef if no site corresponds to this pattern.
Syntax |
$ahSites = $ASPoolDB->searchSiteByDomainName( $Pattern ); |
Example |
$ahSites = $ASPoolDB->searchSiteByDomainName( 'www.epages.de' ); $ahSites = $ASPoolDB->searchSiteByDomainName( '%ep_g%de' ); |
Input |
|
Return |
|
setDatabasePool
Sets the pool for a database.
Syntax |
$ASPoolDB->setDatabasePool($DatabaseName, $PoolName); |
Example |
$ASPoolDB->setDatabasePool('Store', 'StorePool'); |
Input |
|
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 |
|