Connector for on-premise instances of Apptus eSales.
This class acts as a facade to the connector library. All requests to the eSales service are initiated by method calls to a
connector object, or an object obtained via the connector.
Methods summary
public
Apptus\ESales\Connector\OnPremConnector
|
#
__construct( string $uri, Apptus\Util\Cache\StateCache $stateCache = null )
Creates a connector for the given eSales cluster URI.
Creates a connector for the given eSales cluster URI.
The URI should be on the following format:
esales://host1[:port1][;host2[:port2][;...]][?parameter1=value1[¶meter2=value2[&...]]]
Example: esales://node1.apptus.com;node2.apptus.com:35811?query_timeout=3500¬ification_timeout=3500
Unspecified ports defaults to 35810.
The available parameters are:
- connection_timeout - the connection timeout in milliseconds, default 2000
- query_timeout - the query timeout in milliseconds, default 3000
- export_timeout - the export timeout in milliseconds, default 60000
- import_timeout - the import timeout in milliseconds, default 600000
- notification_timeout - the notification timeout in milliseconds, default 3000
- health_check_timeout - the health check timeout in milliseconds, default 500
- compression_mode - what compression should be used when sending imports. Available settings:
- none - No compression.
- gzip - Compress with GZIP. This is the default.
- pre_compressed_gzip - Send headers to indicate the import is compressed with GZIP, but don't do any compression. Use this if the file or InputStream you supply is already compressed.
Note that files with names that end with ".gz" or ".gzip" will behave as if compression_mode=pre_compressed_gzip,
regardless of what compression_mode is actually set to.
Parameter values must be URL encoded in order to avoid ambiguity.
Parameters
- $uri
- base URI to an eSales cluster.
- $stateCache
instance of an object implementing the Apptus\Util\Cache\StateCache interface.
Defaults to an SQLite3StateCache using the file 'esales.statecache' in the current working directory.
Returns
Throws
|
public static
|
#
defineCluster( string $clusterString )
Defines a cluster. The format of the cluster string is :;:;...
Defines a cluster. The format of the cluster string is :;:;...
Parameters
- $clusterString
- string defining a cluster.
Throws
|
public
|
#
synchronize( boolean $ignore = false )
Synchronizes all eSales Servers in the eSales cluster.
Synchronizes all eSales Servers in the eSales cluster.
When ignore is set to true any inconsistencies between eSales Servers in the eSales
cluster are ignored by clearing the update history on all servers.
Parameters
- $ignore
- if inconsistencies in the cluster should be ignored.
Throws
|
public
string
|
#
queryStatistics( integer $qp )
Return query statistics for the specified eSales Server.
Return query statistics for the specified eSales Server.
Parameters
- $qp
- (0-based) index of the eSales Server.
Returns
string A string containing query statistics in the form of an XML document.
Throws
|
public
|
#
defragment( )
Defragments the eSales Servers in the eSales cluster.
Defragments the eSales Servers in the eSales cluster.
Throws
|
public
array
|
#
availableAttributeTypes( )
Return a list of available attribute types from the eSales cluster. Never returns null.
Return a list of available attribute types from the eSales cluster. Never returns null.
Returns
array An indexed array of type names.
Throws
|
public
array
|
#
availableStringRules( )
Always returns an empty list.
Always returns an empty list.
Deprecated
No longer of any use.
Returns
array An empty array.
|
public
array
|
#
availableScanRules( )
Always returns an empty list.
Always returns an empty list.
Deprecated
No longer of any use.
Returns
array An empty array.
|
public
array
|
#
availableProductAttributes( )
Gets a list of the name of all product and variant attributes that has been imported to eSales.
Gets a list of the name of all product and variant attributes that has been imported to eSales.
Returns
array An indexed array of product and variant attribute names.
Throws
|
public
array
|
#
availableAdAttributes( )
Gets a list of the name of all ad attributes that has been imported to eSales.
Gets a list of the name of all ad attributes that has been imported to eSales.
Returns
array An indexed array of ad attribute names.
Throws
|
public
string
|
#
testPanel( string $panelXml, string $panel, string $role, Apptus\ESales\Connector\ArgMap |array|null $arguments )
Executes a panel from the specified panel definition.
Executes a panel from the specified panel definition.
If a role is specified, then only the part of the panel specified by
the role is executed.
The arguments is always applied to the entire named panel.
Parameters
- $panelXml
- panel definition, as a string with an XML document.
- $panel
- panel to execute.
- $role
- part of the panel the return results from.
- $arguments
- arguments of the panel.
Returns
string The result as an XML document.
Throws
|
public
Apptus\ESales\Connector\PanelContent
|
#
testPanelAndParse( string $panelXml, string $panel, string $role, Apptus\ESales\Connector\ArgMap |array|null $arguments )
Executes a panel from the specified panel definition and parse the resulting XML.
Executes a panel from the specified panel definition and parse the resulting XML.
If a role is specified, then only the part of the panel specified by
the role is executed.
The arguments is always applied to the entire named panel.
Parameters
- $panelXml
- panel definition, as a string with an XML document.
- $panel
- panel to execute.
- $role
- part of the panel the return results from.
- $arguments
- arguments of the panel.
Returns
Throws
|