public abstract class AbstractConfig extends Object
Modifier and Type | Field and Description |
---|---|
protected NetSuiteClient |
client |
protected String |
connectionId
The login email of both NetSuite UI and SuiteTalk
|
protected com.google.common.base.Supplier<NetSuiteClient> |
cxfClient |
protected String |
endpoint
Web Service (SOAP) endpoint
|
protected String |
proxyHost
The hostname of the HTTP proxy e.g.
|
protected String |
proxyPassword
The password which would be supplied to the HTTP proxy on every request to NetSuite.
|
protected Integer |
proxyPort
The port number of the HTTP proxy e.g.
|
protected String |
proxyUsername
The username which should be supplied to the HTTP proxy on every request to NetSuite.
|
protected String |
restletEndpoint
RESTlet endpoint
|
protected String |
separator
Separator used to generate the keys required to provided a better support for custom fields/records.
|
Constructor and Description |
---|
AbstractConfig() |
Modifier and Type | Method and Description |
---|---|
protected ProxyConfig |
buildProxyConfig()
Builds a proxy configuration based on the values given in the proxy parameters above
|
protected String |
buildRestletAuthHeader(String account,
String email,
String password,
String roleId) |
void |
disconnect()
Connection Management disconnect method
|
protected void |
discoverDynamicEndpoints(String accountId) |
NetSuiteClient |
getClient() |
String |
getConnectionId() |
String |
getEndpoint() |
String |
getProxyHost() |
String |
getProxyPassword()
Retrieves the password that will be supplied to the proxy server on every HTTP request
|
Integer |
getProxyPort() |
String |
getProxyUsername()
Retrieves the username that will be supplied to the proxy server on every HTTP request
|
String |
getRestletAuthHeader()
Retrieves the Authorization header needed to perform RESTlet calls.
|
String |
getRestletEndpoint() |
String |
getSeparator() |
boolean |
isConnected() |
void |
setClient(NetSuiteClient client) |
void |
setConnectionId(String connectionId) |
void |
setEndpoint(String endpoint) |
void |
setProxyHost(String proxyHost) |
void |
setProxyPassword(String proxyPassword) |
void |
setProxyPort(Integer proxyPort) |
void |
setProxyUsername(String proxyUsername) |
String |
setRestletAuthHeader(String restletAuthHeader) |
void |
setRestletEndpoint(String restletEndpoint) |
void |
setSeparator(String separator) |
protected void |
throwNewConnectionExceptionIncorrectCredentials(Throwable t) |
protected void |
throwNewConnectionExceptionUnknown(Throwable t) |
protected void |
validateCredentials(String... fields) |
@Configurable @Optional @FriendlyName(value="Host") @Placement(group="Proxy Settings") protected String proxyHost
@Configurable @Optional @FriendlyName(value="Port") @Placement(group="Proxy Settings") protected Integer proxyPort
@Configurable @Optional @FriendlyName(value="Username") @Placement(group="Proxy Settings") protected String proxyUsername
@Configurable @Optional @FriendlyName(value="Password") @Placement(group="Proxy Settings") @Password protected String proxyPassword
@Configurable @Optional @FriendlyName(value="Web Service Endpoint") protected String endpoint
@Configurable @Optional @FriendlyName(value="RESTlet Endpoint") protected String restletEndpoint
@Configurable @FriendlyName(value="Customizations Separator") @Default(value="__") protected String separator
protected NetSuiteClient client
protected com.google.common.base.Supplier<NetSuiteClient> cxfClient
protected String connectionId
protected ProxyConfig buildProxyConfig()
ProxyConfig
containing the host, port, username and password values suppliedprotected void throwNewConnectionExceptionUnknown(Throwable t) throws org.mule.api.ConnectionException
org.mule.api.ConnectionException
protected void throwNewConnectionExceptionIncorrectCredentials(Throwable t) throws org.mule.api.ConnectionException
org.mule.api.ConnectionException
@Disconnect public void disconnect()
RuntimeException
@ValidateConnection public boolean isConnected()
protected String buildRestletAuthHeader(String account, String email, String password, String roleId)
public String getRestletAuthHeader()
UnsupportedOperationException
- if the configuration does not contain the required attributes needed to create the header.protected void discoverDynamicEndpoints(String accountId) throws org.mule.api.ConnectionException
org.mule.api.ConnectionException
protected void validateCredentials(String... fields)
public NetSuiteClient getClient()
public void setClient(NetSuiteClient client)
@ConnectionIdentifier public String getConnectionId()
public void setConnectionId(String connectionId)
public String getEndpoint()
public void setEndpoint(String endpoint)
public String getRestletEndpoint()
public void setRestletEndpoint(String restletEndpoint)
public String getSeparator()
public void setSeparator(String separator)
public String getProxyHost()
public void setProxyHost(String proxyHost)
public Integer getProxyPort()
public void setProxyPort(Integer proxyPort)
public String getProxyUsername()
public void setProxyUsername(String proxyUsername)
public String getProxyPassword()
public void setProxyPassword(String proxyPassword)
Copyright © 2010–2017. All rights reserved.