ePages 6.11.0 - DE_EPAGES/ShopConfiguration/API/Object/Provider.pm

Package DE_EPAGES::ShopConfiguration::API::Object::Provider

object interface for Provider.

Base
DE_EPAGES::Object::API::Object::Site

Functions

addStore
className
databases
dbPackage
existsFeaturePack
existsShop
existsShopType
existsSiteLocale
exportXMLElements
featurePack
featurePacks
features
hasStore
insertFeaturePack
insertShop
insertShopType
preCreateShop
removeStore
shop
shopService
shopType
shopTypes
shops
siteLocale
stores

addStore

Assigns a store database to the provider.

Syntax
$Provider->addStore( $Store )
Input
$Store (object)
store object

className

Returns the class name, used for DAL access.

Syntax
$ClassName = $Provider->className;
Return
$ClassName (String)
class name

databases

Returns all store databases that are assigned to the provider.

Syntax
$aDatabases = $Provider->databases
Return
$aDatabases (ref.array.Store)
list of Store objects

dbPackage

Returns the database package, used for DAL access.

Syntax
$DbPackage = $Provider->dbPackage;
Return
$DbPackage (String)
database package name

existsFeaturePack

Returns true if the provider has a feature pack with the given alias name.

Syntax
$Exists = $Provider->existsFeaturePack( $Alias );
Input
$Alias (string)
feature pack alias
Return
$Exists (boolean)
true if the feature pack esists

existsShop

Returns true a shop with the given alias name exists for the provider.

Syntax
$Exists = $Provider->existsShop( $Alias );
Input
$Alias (string)
unique shop alias
Return
$Exists (boolean)
true if the shop exists

existsShopType

Returns true if the provider has a shop type with the given alias name.

Syntax
$Exists = $Provider->existsShopType( $Alias );
Input
$Alias (string)
shop type alias
Return
$Exists (boolean)
true if the shop type esists

existsSiteLocale

Returns true if the site supports the given locale.

Syntax
$Exists = $Site->existsSiteLocale($LocaleID);
Example
if( $Site->existsSiteLocale('en_GB') ) { ... }
Input
$LocaleID (string)
locale id, e.g. 'en_GB'
Return
$Exists (boolean)
true if the locale is supported by the site

exportXMLElements

Exports xml data of multilinguagal attributes of this object.

Syntax
$Object->exportXMLElements($Driver, $hAllAttributes);
Input
$Driver (object)
export driver
$hAllAttributes (ref.hash)
all attributes of object,
see $Object->allAttributes

featurePack

Returns a feature pack of a provider.

Syntax
$FeaturePack = $Provider->featurePack( $Alias );
Return
$FeaturePack (object)
feature pack object

featurePacks

Returns all feature packs of a provider.

Syntax
$aFeaturePacks = $Provider->featurePacks
Return
$aFeaturePacks (ref.array.object)
list of feature pack objects

features

Returns all features that are available for a provider for configuration of feature collections. This list contains the maximum of all features of all assigned store databases.

Syntax
$aFeatures = $Provider->features
Return
$aFeatures (ref.array.object)
list of feature objects

hasStore

Returns true if the store database is assigned to the provider.

Syntax
$HasStore = $Provider->hasStore( $Store )
Example
if( $Provider->hasStore( $Store ) { ... }
Input
$Store (object)
store object
Return
$HasStore (boolean)
true if the provider has the store

insertFeaturePack

Inserts a new feature pack for the provider.

Syntax
$FeaturePack = $Provider->insertFeaturePack( $hFeaturePack );
Input
$hFeaturePack (ref.hash)
feature pack attributes, required: Alias
Return
$FeaturePack (object)
feature pack object

insertShop

Inserts a shop of the provider. Re-uses a pre-created shop if one exists in the given store database with the given shop type. In this case, the parameters ImportFiles and PublicFilesDir are ignored. See also preCreateShop.

Syntax
$ShopRef = $Provider->insertShop({
    ShopType    => $ShopType,
    Store       => $Store,
    Alias       => $Alias,
    ShopAlias   => $ShopAlias,
    IsClosed    => $IsClosed,
    DomainName  => $DomainName,
    HasSSLCertificate => $HasSSLCertificate,
    WebServerScriptNamePart => $WebServerScriptNamePart,
    IsTrialShop => $IsTrialShop,
    IsInternalTestShop => $IsInternalTestShop,
    ImportFiles => $aImportFiles,
    PublicFilesDir => $PublicFilesDir,
});
Input
$ShopType (object)
shop type
$Store (object)
store database
$Alias (string)
unique shop name for the provider
$ShopAlias (string)
unique shop name for the database
$IsClosed (boolean)
true if the new shop is closed by provider (optional, default: 0)
$DomainName (string)
domain name to access the shop (optional)
$HasSSLCertificate (boolean)
true if the web server has an SSL certificate for $DomainName (optional)
$WebServerScriptNamePart (string)
script name part of the shop (optional)
$IsTrialShop (boolean)
true if the shop is in trial period (optional, default: 0)
$IsInternalTestShop (boolean)
true if the shop is used for test or support purposes (optional, default: 0)
$aImportFiles (string)
list of import files contianing initial shop date. These
files must be accessible for the application servers that are
responsible for the specified database. (optional)
$PublicFilesDir (string)
directory on the application server where image files
for the new shop are located. These files are copied to the
shop directory. (optional)
Return
$ShopRef (object)
shop reference object

insertShopType

Inserts a new shop type for the provider.

Syntax
$ShopType = $Provider->insertShopType( $hShopType );
Input
$hShopType (ref.hash)
shop type attributes, required: Alias
Return
$ShopType (object)
shop type object

preCreateShop

Creates a new shop without a real shop alias, which can be re-used later by insertShop

Syntax
$ShopRef = $Provider->preCreateShop({
    ShopType    => $ShopType,
    Store       => $Store,
    ImportFiles => $aImportFiles,
    PublicFilesDir => $PublicFilesDir,
});
Input
$ShopType (object)
shop type
$Store (object)
store database
$aImportFiles (string)
list of import files contianing initial shop date. These
files must be accessible for the application servers that are
responsible for the specified database. (optional)
$PublicFilesDir (string)
directory on the application server where image files
for the new shop are located. These files are copied to the
shop directory. (optional)
Return
$ShopRef (object)
shop reference object

removeStore

Unassigns a store database from the provider. The database is not deleted.

Syntax
$Provider->removeStore( $Store )
Input
$Store (object)
store object

shop

Returns a shop of the provider.

Syntax
$ShopRef = $Provider->shop( $Alias );
Input
$Alias (string)
unique shop alias
Return
$ShopRef (object)
shop reference object

shopService

Returns a web service client of the ShopService.

Syntax
$ShopService = $self->shopService;
$ShopService = $self->shopService( $Store );
Input
$Store (object)
(optional) Store object
Return
$ShopService (object)
web service client

shopType

Returns a shop type of a provider.

Syntax
$ShopType = $Provider->shopType( $Alias );
Input
$Alias (string)
shop type alias
Return
$ShopType (object)
shop type object

shopTypes

Returns all shop types packs of a provider.

Syntax
$aShopTypes = $Provider->shopTypes
Return
$aShopTypes (ref.array.object)
list of shop type objects

shops

Returns all shops of a provider.

Syntax
$aShopRefs = $Provider->shops;
Example
$_->delete foreach @{ $Provider->shops };
Return
$aShopRefs (ref.array.object)
list of shop reference objects

siteLocale

Returns locale object with given locale identifier.

Syntax
$Locale = $Site->siteLocale($LocaleID);
Example
$Site->siteLocale('en_GB')->roundMoney($amount, $CurrencyID);
Input
$LocaleID (string)
locale id, e.g. 'en_GB'
Return
$Locale (object)
supported locale of site

stores

Returns all store databases that are assigned to the provider.

Syntax
$aStores = $Provider->stores
Return
$aStores (ref.array.Store)
list of Store objects