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

Package DE_EPAGES::ShopConfiguration::API::Object::RemoteObject

Provides access from the site database to an object in a store database.

Example
my $RemoteObject = DE_EPAGES::ShopConfiguration::API::Object::RemoteObject->new(
    Store => $Store,
    ObjectID => $ObjectID
);
$RemoteObject->set( { WebServer => 'www.server.com' } );

Functions

child
delete
existsChild
factoryService
folder
get
getLoop
id
insertChild
new
objectService
set
store

child

Returns the direct child object with the given alias name.

Syntax
$RemoteChildObject = $RemoteObject->child( $Alias );
Input
$Alias (string)
child object alias
Return
$ChildObject (object)
remote child object

delete

Deletes the remote object.

Syntax
$RemoteObject->delete;

existsChild

Returns true if the direct child object with the given alias name exists.

Syntax
$Exists = $RemoteObject->existsChild( $Alias );
Return
$Exists (boolean)
true if the child object exists

factoryService

Returns a web service client of the FactoryService.

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

folder

Returns the folder object with the given alias name.

Syntax
$RemoteFolderObject = $RemoteObject->folder( $Alias );
Input
$Alias (string)
child object alias
Return
$FolderObject (object)
remote folder object

get

Returns attribute values of an object.

Syntax
$hValues = $RemoteObject->get( $aNames );
$hValues = $RemoteObject->get( $aNames, $LanguageCode );
Example
$Position = $RemoteObject->get( ['Position'] )->{'Position'};
Input
$aNames (ref.array.string)
list of attribute names
$LanguageCode (string)
ISO-639 language code, case sensitive
Return
$hValues (ref.hash)
attribute name => value hash

getLoop

Returns attribute values of multiple objects.

Syntax
$ahValues = $RemoteObject->getLoop( $aObjectIDs, $aNames );
$ahValues = $RemoteObject->getLoop( $aObjectIDs, $aNames, $LanguageCode );
Input
$aObjectIDs (ref.array.int)
list object ids
$aNames (ref.array.string)
list of attribute names
$LanguageCode (string)
(optional) ISO-639 language code
Return
$ahValues (ref.array.hash)
list of hashes (attribute name => value)

id

Returns or sets the object id within the remote database.

Syntax
$ObjectID = $self->id;
$self->id( $ObjectID );
Input
$ObjectID (integer)
remote object id
Return
$ObjectID (integer)
remote object id

insertChild

Returns a new inserted child object.

Syntax
$RemoteChildObject = $RemoteObject->insertChild($RemoteClassObject, $hValues  );
Input
$RemoteClassObject (object)
remote class object
$hValues (ref.hash)
attribute name => value hash
Return
$ChildObject (object)
remote child object

new

Creates a RemoteObject.

Syntax
$RemoteObject = DE_EPAGES::ShopConfiguration::API::Object::RemoteObject->new(
    Store => $Store,
    ObjectID => $ObjectID
);
Input
$Store (object)
Store object (references the remote database)
$ObjectID (integer)
(optional) object id within the store database
Return
$RemoteObject (object)
remote object

objectService

Returns a web service client of the ObjectService.

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

set

Sets attribute values of an object.

Syntax
$RemoteObject->set( $hValues );
$RemoteObject->set( $hValues, $LanguageCode );
Example
$RemoteObject->set( { Position => 21 } );
Input
$hValues (ref.hash)
attribute name => value hash
$LanguageCode (string)
(optional) ISO-639 language code, case sensitive

store

Returns the store database object where the shop data is stored.

Syntax
$Store = $self->store;
Return
$Store (object)
Store object or undef if the shop is deleted