public abstract class BaseCrmConnectionStrategy extends Object
Modifier and Type | Field and Description |
---|---|
protected static Pattern |
urlPattern |
protected String |
username |
Constructor and Description |
---|
BaseCrmConnectionStrategy() |
Modifier and Type | Method and Description |
---|---|
protected void |
callSimpleQueryToTestConnection(IOrganizationService client) |
protected void |
configureHttpConduit(org.apache.cxf.transport.http.HTTPConduit httpConduit) |
void |
connect(String username,
String password,
String organizationServiceUrl)
Creates and establishes a new connection against the CRM instance.
|
protected org.apache.http.impl.client.HttpClientBuilder |
createHttpClientBuilder() |
protected abstract IOrganizationService |
createOrganizationServiceClient(String username,
String password,
String organizationServiceUrl) |
void |
destroySession()
Disconnects the client from the current session
|
Integer |
getConnectionTimeout() |
boolean |
getDisableCnCheck() |
org.mule.api.MuleContext |
getMuleContext() |
protected org.apache.cxf.Bus |
getNewBusForClient(boolean policyEngineEnabled) |
protected IOrganizationService |
getNewClientInstance(URL organizationServiceWsdlUrl,
boolean policyEngineEnabled,
WebServiceFeature... features) |
protected OrganizationService |
getNewServiceInstance(org.apache.cxf.Bus bus,
URL organizationServiceWsdlUrl) |
IOrganizationService |
getOrganizationServiceClient() |
protected Document |
getOrganizationServiceWsdl(URL organizationServiceWsdlUrl) |
String |
getProxyConnection() |
String |
getSessionId()
Returns the session id for the current connection
|
boolean |
isConnected()
Returns whether the client is connected
|
void |
setConnectionTimeout(Integer connectionTimeout) |
void |
setDisableCnCheck(Boolean disableCnCheck) |
void |
setMuleContext(org.mule.api.MuleContext context) |
void |
setProxyConnection(String proxyConnection) |
protected abstract void |
testClientConnectivity(IOrganizationService client,
String organizationServiceUrl) |
void |
testConnectivity(String username,
String password,
String organizationServiceUrl) |
protected static final Pattern urlPattern
protected String username
@Connect public void connect(@ConnectionKey String username, @Password String password, @ConnectionKey String organizationServiceUrl) throws org.mule.api.ConnectionException
username
- User to authenticate with.password
- Password for the user to authenticate with.organizationServiceUrl
- The path to the Microsoft Dynamics CRM Organization service
(https://crm.myorganization.com/XRMServices/2011/Organization.svc).org.mule.api.ConnectionException
- If the connection failed@TestConnectivity public void testConnectivity(String username, String password, String organizationServiceUrl) throws org.mule.api.ConnectionException
org.mule.api.ConnectionException
@Disconnect public void destroySession()
@ConnectionIdentifier public String getSessionId()
@ValidateConnection public boolean isConnected()
protected org.apache.http.impl.client.HttpClientBuilder createHttpClientBuilder() throws org.mule.api.ConnectionException
org.mule.api.ConnectionException
protected org.apache.cxf.Bus getNewBusForClient(boolean policyEngineEnabled)
protected OrganizationService getNewServiceInstance(org.apache.cxf.Bus bus, URL organizationServiceWsdlUrl) throws org.mule.api.ConnectionException
org.mule.api.ConnectionException
protected IOrganizationService getNewClientInstance(URL organizationServiceWsdlUrl, boolean policyEngineEnabled, WebServiceFeature... features) throws org.mule.api.ConnectionException
org.mule.api.ConnectionException
protected abstract IOrganizationService createOrganizationServiceClient(String username, String password, String organizationServiceUrl) throws org.mule.api.ConnectionException
org.mule.api.ConnectionException
protected abstract void testClientConnectivity(IOrganizationService client, String organizationServiceUrl) throws org.mule.api.ConnectionException
org.mule.api.ConnectionException
protected void configureHttpConduit(org.apache.cxf.transport.http.HTTPConduit httpConduit)
protected Document getOrganizationServiceWsdl(URL organizationServiceWsdlUrl) throws org.mule.api.ConnectionException
org.mule.api.ConnectionException
protected void callSimpleQueryToTestConnection(IOrganizationService client) throws IOrganizationServiceRetrieveMultipleOrganizationServiceFaultFaultFaultMessage
public boolean getDisableCnCheck()
public void setDisableCnCheck(Boolean disableCnCheck)
public Integer getConnectionTimeout()
public void setConnectionTimeout(Integer connectionTimeout)
public String getProxyConnection()
public void setProxyConnection(String proxyConnection)
public IOrganizationService getOrganizationServiceClient()
public org.mule.api.MuleContext getMuleContext()
public void setMuleContext(org.mule.api.MuleContext context)
Copyright © 2010–2019. All rights reserved.