Show / Hide Table of Contents

Class ConnectionHandlerFacadeBase

Base class for implementations of the Erp Connector facade; one towards CRM and one towards the world

Inheritance
object
ConnectionHandlerFacadeBase
CrmConnectionHandlerFacade
ErpConnectionHandlerFacade
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.ErpSync
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public abstract class ConnectionHandlerFacadeBase

Constructors

ConnectionHandlerFacadeBase()

Default constructor

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
Type Description
Guid

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
Type Description
Task<ErpSyncActor>

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
Type Description
Task<ErpSyncActor[]>

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
Type Description
Task<Guid>

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
Type Description
Task<int>

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
Type Description
Task<Dictionary<string, string>>

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
Type Name Description
string listName
string[] listItemKeys
Returns
Type Description
Task<Dictionary<string, string>>

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
Type Description
Task<string[]>

GetUpdatedActorsAsync()

Retrieves all actors updated on or after the most recent timestamp stored in the CRM database.

Declaration
public abstract Task<ErpSyncActor[]> GetUpdatedActorsAsync()
Returns
Type Description
Task<ErpSyncActor[]>

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
Type Name Description
ErpSyncActor act
CancellationToken cancellationToken
Returns
Type Description
Task

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
Type Name Description
ErpSyncActor[] actors
Returns
Type Description
Task<ErpSyncActor[]>

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
Type Name Description
ErpSyncActor[] actors
bool noBlankValues
Returns
Type Description
Task<ErpSyncActor[]>

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
Type Name Description
Dictionary<string, string> connectionInfo
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
Type Name Description
ErpSyncActor act
CancellationToken cancellationToken
Returns
Type Description
Task

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
Type Description
Task<ErpSyncActor[]>

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
Type Description
Task<ErpSyncActor[]>

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
Type Description
Task<ErpSyncActor[]>

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
Type Description
Task

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
Type Description
Task

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>
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top