Show / Hide Table of Contents

Class DocumentMigrationAgent

Proxy class for the DocumentMigration Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Online Restricted: This agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Inheritance
object
DocumentMigrationAgent
Implements
IDocumentMigrationAgent
IAgent
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public class DocumentMigrationAgent : IDocumentMigrationAgent, IAgent

Constructors

DocumentMigrationAgent(IDocumentMigrationItemListImplementation, IDocumentTemplateMigrationListImplementation, ISoRequestItemsAccessor)

Proxy class for the DocumentMigration Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Online Restricted: This agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Declaration
public DocumentMigrationAgent(IDocumentMigrationItemListImplementation documentMigrationItemListImplementation, IDocumentTemplateMigrationListImplementation documentTemplateMigrationListImplementation, ISoRequestItemsAccessor accessor)
Parameters
Type Name Description
IDocumentMigrationItemListImplementation documentMigrationItemListImplementation
IDocumentTemplateMigrationListImplementation documentTemplateMigrationListImplementation
ISoRequestItemsAccessor accessor

DocumentMigrationAgent(IDocumentMigrationItemListImplementation, IDocumentTemplateMigrationListImplementation, ISoRequestItemsAccessor, IDebugUser, IServiceCallsRepository)

Proxy class for the DocumentMigration Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Online Restricted: This agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Declaration
public DocumentMigrationAgent(IDocumentMigrationItemListImplementation documentMigrationItemListImplementation, IDocumentTemplateMigrationListImplementation documentTemplateMigrationListImplementation, ISoRequestItemsAccessor accessor, IDebugUser debugUser, IServiceCallsRepository serviceCallsRepository)
Parameters
Type Name Description
IDocumentMigrationItemListImplementation documentMigrationItemListImplementation
IDocumentTemplateMigrationListImplementation documentTemplateMigrationListImplementation
ISoRequestItemsAccessor accessor
IDebugUser debugUser
IServiceCallsRepository serviceCallsRepository

Methods

CreateDefaultDocumentMigrationItemListAsync(CancellationToken)

Loading default values into a new DocumentMigrationItemList. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance

Declaration
public Task<DocumentMigrationItemList> CreateDefaultDocumentMigrationItemListAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<DocumentMigrationItemList>

New DocumentMigrationItemList with default values

CreateDefaultDocumentTemplateMigrationListAsync(CancellationToken)

Loading default values into a new DocumentTemplateMigrationList. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance

Declaration
public Task<DocumentTemplateMigrationList> CreateDefaultDocumentTemplateMigrationListAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<DocumentTemplateMigrationList>

New DocumentTemplateMigrationList with default values

GetForAllDocumentsAsync(int, bool, CancellationToken)

Gets a migration summary for all documents stored in CRM. Warning: Expensive!

Declaration
public Task<DocumentMigrationItemList> GetForAllDocumentsAsync(int documentPluginId, bool includeEmails, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int documentPluginId

The ID of the document-plugin to migrate to.

bool includeEmails

True if documents to migrate should include emails.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<DocumentMigrationItemList>

Never null.

GetForDateRangeAsync(int, DateTime, DateTime, bool, CancellationToken)

Gets a migration summary for documents in the provided date-rage

Declaration
public Task<DocumentMigrationItemList> GetForDateRangeAsync(int documentPluginId, DateTime minDate, DateTime maxDate, bool includeEmails, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int documentPluginId

The ID of the document-plugin to migrate to.

DateTime minDate

Inclusive mininmum.

DateTime maxDate

Inclusive maximum.

bool includeEmails

True if documents to migrate should include emails.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<DocumentMigrationItemList>

Never null.

GetForSelectionAsync(int, int, bool, CancellationToken)

Gets a migration summary for documents in the provided selection

Declaration
public Task<DocumentMigrationItemList> GetForSelectionAsync(int documentPluginId, int selectionId, bool includeEmails, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int documentPluginId

The ID of the document-plugin to migrate to.

int selectionId

ID of the selection used to create the DocumentMigrationSummary instance.

bool includeEmails

True if documents to migrate should include emails.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<DocumentMigrationItemList>

Never null.

GetForTemplatesAsync(int, bool, CancellationToken)

Gets a migration summary for all templates stored in CRM.

Declaration
public Task<DocumentTemplateMigrationList> GetForTemplatesAsync(int targetDocumentPluginId, bool includeEmails, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int targetDocumentPluginId

The ID of the document-plugin to migrate to.

bool includeEmails

True if templates to migrate should include emails.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<DocumentTemplateMigrationList>

Never null.

GetNumberOfConfidentialDocumentsAsync(CancellationToken)

Gets the total number of documents that is not visible to everyone

Declaration
public Task<int> GetNumberOfConfidentialDocumentsAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<int>

Number of confidential documents.

HasDocumentsToMigrateAsync(CancellationToken)

Checks if there are any documents in the current database stored using a non-default document-plugin, and which can be migrated.

Declaration
public Task<bool> HasDocumentsToMigrateAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<bool>

True if there are documents available to migrate.

MigrateDocumentToNewDocPluginAsync(int, int, CancellationToken)

Migrates the document with the provided id to the specified document-plugin.

Declaration
public Task MigrateDocumentToNewDocPluginAsync(int documentId, int documentPluginId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int documentId

The ID of the document to migrate.

int documentPluginId

The ID of the document-plugin to migrate to.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task

This method has no return value

MigrateTemplateToNewDocPluginAsync(int, int, CancellationToken)

Migrates the template with the provided id to the specified document-plugin.

Declaration
public Task MigrateTemplateToNewDocPluginAsync(int documentTemplateId, int targetDocumentPluginId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int documentTemplateId

The ID of the document-template to migrate.

int targetDocumentPluginId

The ID of the document-plugin to migrate to.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task

This method has no return value

Implements

IDocumentMigrationAgent
IAgent
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top