Class ConnectionHandlerFacadeBase
Base class for implementations of the Erp Connector facade; one towards CRM and one towards the world
Inheritance
ConnectionHandlerFacadeBase
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public abstract class ConnectionHandlerFacadeBase
Constructors
ConnectionHandlerFacadeBase()
Declaration
protected ConnectionHandlerFacadeBase()
ConnectionHandlerFacadeBase(Guid)
Instatiates a connection handler using the external Connection ID
Declaration
protected ConnectionHandlerFacadeBase(Guid connId)
Parameters
Type |
Name |
Description |
Guid |
connId |
|
ConnectionHandlerFacadeBase(int)
Instatiates a connection handler using the internal Connection ID (database key)
Declaration
protected ConnectionHandlerFacadeBase(int erpConnId)
Parameters
Type |
Name |
Description |
int |
erpConnId |
|
Fields
_ConnectionId
Base class for implementations of the Erp Connector facade; one towards CRM and one towards the world
Declaration
protected Guid _ConnectionId
Field Value
Methods
CreateActorAsync(ErpSyncActor, ErpActorType)
Creates a new actor and returns the actor from the connection as if looks after the create operation (e.g. with a new ErpKey and timestamp, etc)
Declaration
public abstract Task<ErpSyncActor> CreateActorAsync(ErpSyncActor act, ErpActorType actorType)
Parameters
Type |
Name |
Description |
ErpSyncActor |
act |
|
ErpActorType |
actorType |
|
Returns
GetActorsAsync(ErpActorType, string[])
Retrieves a specified set of actors. Will use the field mapping for the given actor type and connection.
Declaration
public abstract Task<ErpSyncActor[]> GetActorsAsync(ErpActorType actorType, string[] ErpKeys)
Parameters
Type |
Name |
Description |
ErpActorType |
actorType |
|
string[] |
ErpKeys |
|
Returns
GetConfigDataAsync()
Base class for implementations of the Erp Connector facade; one towards CRM and one towards the world
Declaration
protected abstract Task<FieldMetadataInfo[]> GetConfigDataAsync()
Returns
Type |
Description |
Task<FieldMetadataInfo[]> |
|
GetConnectionIdAsync()
Get or set (set method is protected) the external connection ID for the connection handler. If set, it will use this to find its own internal ID (database key)
Declaration
public abstract Task<Guid> GetConnectionIdAsync()
Returns
GetErpConnectionIdAsync()
Get or set (set method is protected) the internal connection ID (database key) for the connection handler. If set, it will use this to find its own external ID
Declaration
public abstract Task<int> GetErpConnectionIdAsync()
Returns
GetListAsync(string)
Retrieves an entire list with a given name
Declaration
public abstract Task<Dictionary<string, string>> GetListAsync(string listName)
Parameters
Type |
Name |
Description |
string |
listName |
|
Returns
GetListItemsAsync(string, string[])
Retrieves a specific set of list items from a given list
Declaration
public abstract Task<Dictionary<string, string>> GetListItemsAsync(string listName, string[] listItemKeys)
Parameters
Returns
GetSupportedActorTypeFieldsAsync(ErpActorType)
Retrieves the supported fields for a given actor type
Declaration
public abstract Task<FieldMetadataInfo[]> GetSupportedActorTypeFieldsAsync(ErpActorType actorType)
Parameters
Type |
Name |
Description |
ErpActorType |
actorType |
|
Returns
Type |
Description |
Task<FieldMetadataInfo[]> |
|
GetSupportedActorTypesAsync()
Retrieves all actor types this connection supports.
Declaration
public abstract Task<string[]> GetSupportedActorTypesAsync()
Returns
GetUpdatedActorsAsync()
Retrieves all actors updated on or after the most recent timestamp stored in the CRM database.
Declaration
public abstract Task<ErpSyncActor[]> GetUpdatedActorsAsync()
Returns
SaveActorTimestampAsync(ErpSyncActor, CancellationToken)
If the timestamp of the given actor is larger than the currently stored timestamp from the database, the new timestamp is stored to the database.
Declaration
public abstract Task SaveActorTimestampAsync(ErpSyncActor act, CancellationToken cancellationToken = default)
Parameters
Returns
SaveActorsAsync(ErpSyncActor[])
Saves a set of actors to the connection and returns those same actors with their updated values from the ERP system (new timestamp, possibly new field values, etc)
Declaration
public abstract Task<ErpSyncActor[]> SaveActorsAsync(ErpSyncActor[] actors)
Parameters
Returns
SaveActorsAsync(ErpSyncActor[], bool)
Saves a set of actors to the connection and returns those same actors with their updated values from the ERP system (new timestamp, possibly new field values, etc)
Can be used to change behavior for blank values
Declaration
public virtual Task<ErpSyncActor[]> SaveActorsAsync(ErpSyncActor[] actors, bool noBlankValues)
Parameters
Returns
SaveConnectionAsync(Dictionary<string, string>)
Saves a set of configuration data to the active connection (either a new or an existing connection). NOTE: Does not save the configuration data to the CRM database.
Declaration
public abstract Task<PluginResponseInfo> SaveConnectionAsync(Dictionary<string, string> connectionInfo)
Parameters
Returns
Type |
Description |
Task<PluginResponseInfo> |
|
SaveConnectionTimestampAsync(ErpSyncActor, CancellationToken)
If the timestamp of the given actor is larger than the currently stored timestamp from the database, the new timestamp is stored to the database.
Declaration
public abstract Task SaveConnectionTimestampAsync(ErpSyncActor act, CancellationToken cancellationToken = default)
Parameters
Returns
SearchActorByParentAsync(ErpActorType, string, ErpActorType, string)
Searches for actors with a specified parent actor using a given search string. Will use the field mapping for the given actor type and connection.
Declaration
public abstract Task<ErpSyncActor[]> SearchActorByParentAsync(ErpActorType actorType, string searchText, ErpActorType parentActorType, string parentActorErpKey)
Parameters
Type |
Name |
Description |
ErpActorType |
actorType |
|
string |
searchText |
|
ErpActorType |
parentActorType |
|
string |
parentActorErpKey |
|
Returns
SearchActorsAsync(ErpActorType, string)
Searches for actors using a given search string. Will use the field mapping for the given actor type and connection.
Declaration
public abstract Task<ErpSyncActor[]> SearchActorsAsync(ErpActorType actorType, string searchText)
Parameters
Type |
Name |
Description |
ErpActorType |
actorType |
|
string |
searchText |
|
Returns
SearchActorsAsync(ErpActorType, string, string[])
Base class for implementations of the Erp Connector facade; one towards CRM and one towards the world
Declaration
public abstract Task<ErpSyncActor[]> SearchActorsAsync(ErpActorType actorType, string searchText, string[] returnFields)
Parameters
Type |
Name |
Description |
ErpActorType |
actorType |
|
string |
searchText |
|
string[] |
returnFields |
|
Returns
SetConnectionIdAsync(Guid)
Get or set (set method is protected) the external connection ID for the connection handler. If set, it will use this to find its own internal ID (database key)
Declaration
protected abstract Task SetConnectionIdAsync(Guid value)
Parameters
Type |
Name |
Description |
Guid |
value |
|
Returns
SetErpConnectionIdAsync(int)
Get or set (set method is protected) the internal connection ID (database key) for the connection handler. If set, it will use this to find its own external ID
Declaration
protected abstract Task SetErpConnectionIdAsync(int value)
Parameters
Type |
Name |
Description |
int |
value |
|
Returns
TestConnectionAsync()
Asks the Connector to see if the connection is up and running, using the connector's own stored configuration data.
Declaration
public abstract Task<PluginResponseInfo> TestConnectionAsync()
Returns
Type |
Description |
Task<PluginResponseInfo> |
|