public class OnPremConnector extends Connector
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.
Use the getOrCreate(String)
method to obtain a OnPremConnector object.
Modifier and Type | Method | Description |
---|---|---|
List<String> |
availableAdAttributes() |
Gets a list of the names of all ad attributes that has been imported to eSales.
|
List<String> |
availableAttributeTypes() |
Returns a list of available attribute types from the eSales cluster.
|
List<String> |
availableCategoryAttributes() |
Gets a list of the names of all category attributes that has been imported to eSales.
|
List<String> |
availableProductAttributes() |
Gets a list of the names of all product and variant attributes that has been imported to eSales.
|
List<String> |
availableScanRules() |
Deprecated.
No longer serves any purpose.
|
List<String> |
availableStringRules() |
Deprecated.
No longer serves any purpose.
|
static OnPremConnector |
defineCluster(String clusterString) |
Defines a cluster.
|
void |
defragment() |
Defragments the eSales Servers in the eSales cluster.
|
static OnPremConnector |
get(String uri) |
Gets a connector, provided a cluster URI.
|
static OnPremConnector |
getOrCreate(String uri) |
Creates a connector, unless already created, provided a cluster URI.
|
String |
queryStatistics(int qp) |
Returns query statistics for the specified eSales Server.
|
void |
synchronize(boolean ignore) |
Synchronizes all eSales Servers in the eSales cluster.
|
String |
testPanel(String panelXml,
String panel,
String role,
Map<? extends CharSequence,? extends CharSequence> arguments) |
Deprecated.
use testPanel(String panelXml, String panel, String role, Map<String, String> arguments,
String sessionKey, String market, String customerKey) instead.
|
String |
testPanel(String panelXml,
String panel,
String role,
Map<String,String> arguments,
String sessionKey,
String market,
String customerKey) |
Executes a panel from the specified panel definition.
|
PanelContent |
testPanelAndParse(String panelXml,
String panel,
String role,
Map<? extends CharSequence,? extends CharSequence> arguments) |
Deprecated.
use testPanelAndParse(String panelXml, String panel, String role, Map<String, String> arguments,
String sessionKey, String market, String customerKey) instead.
|
PanelContent |
testPanelAndParse(String panelXml,
String panel,
String role,
Map<String,String> arguments,
String sessionKey,
String market,
String customerKey) |
Executes a panel from the specified panel definition.
|
availableMarkets, checkCustomerDataJobStatus, createExportCustomerDataJob, createRemoveCustomerDataJob, downloadExportCustomerDataJobResult, downloadExportCustomerDataJobResult, exportAds, exportAds, exportConfiguration, exportConfiguration, exportPanels, exportPanels, exportProducts, exportProducts, exportProducts, exportSynonyms, exportSynonyms, getVersion, importAds, importAds, importConfiguration, importConfiguration, importFile, importPanels, importPanels, importProducts, importProducts, importSynonyms, importSynonyms, latestNotifications, latestNotifications, putStrings, reporter, reporterForUnknownMarket, save, serverLog, serverLogNames, session, session, status
public static OnPremConnector get(String uri)
getOrCreate(String)
for details on the URI format.uri
- The base URI to an eSales clusterpublic static OnPremConnector getOrCreate(String uri) throws com.apptus.util.http.ClientCreationException, FetchClusterException, MalformedURLException
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:
uri
- The base URI to an eSales cluster.com.apptus.util.http.ClientCreationException
FetchClusterException
MalformedURLException
public static OnPremConnector defineCluster(String clusterString) throws IOException
clusterString
- A string defining a cluster.com.apptus.util.http.Response.BusyClusterIOException
- if the cluster is busy with another taskIOException
public void synchronize(boolean ignore) throws IOException
ignore
- should be set to true if inconsistencies in the cluster should be ignoredcom.apptus.util.http.Response.BusyClusterIOException
- if the cluster is busy with another taskIOException
public String queryStatistics(int qp) throws IOException
qp
- The (0-based) index of the eSales ServerIOException
IndexOutOfBoundsException
- if no qp with the given index can be foundpublic void defragment() throws IOException
IOException
com.apptus.util.http.Response.BusyClusterIOException
- if cluster is busy with another taskpublic List<String> availableAttributeTypes() throws IOException
IOException
@Deprecated public List<String> availableStringRules() throws IOException
IOException
@Deprecated public List<String> availableScanRules() throws IOException
IOException
public List<String> availableProductAttributes() throws IOException
IOException
public List<String> availableAdAttributes() throws IOException
IOException
public List<String> availableCategoryAttributes() throws IOException
IOException
@Deprecated public String testPanel(String panelXml, String panel, String role, Map<? extends CharSequence,? extends CharSequence> arguments) throws IOException
IOException
@Deprecated public PanelContent testPanelAndParse(String panelXml, String panel, String role, Map<? extends CharSequence,? extends CharSequence> arguments) throws IOException, ParseException
IOException
ParseException
public String testPanel(String panelXml, String panel, String role, Map<String,String> arguments, String sessionKey, String market, String customerKey) throws IOException
The arguments is always applied to the entire named panel.
panelXml
- The panel definition, as an XML documentpanel
- The panel to executerole
- The part of the panel the return results fromarguments
- The arguments of the panelsessionKey
- The session key for this requestmarket
- The market for this requestcustomerKey
- The customer key for this requestIOException
public PanelContent testPanelAndParse(String panelXml, String panel, String role, Map<String,String> arguments, String sessionKey, String market, String customerKey) throws IOException, ParseException
The arguments is always applied to the entire named panel.
panelXml
- The panel definition, as an XML documentpanel
- The panel to executerole
- The part of the panel the return results fromarguments
- The arguments of the panelsessionKey
- The session key for this requestmarket
- The market for this requestcustomerKey
- The customer key for this requestIOException
ParseException
Copyright © 2018 Apptus Technologies AB. All rights reserved.