Show / Hide Table of Contents

Interface IDocumentMigrationAgent

Interface for the DocumentMigration Agent Agent used to support migrating documents between different document-plugins, as single documents or batches.

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.
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("DocumentMigration Agent", "Interface for the DocumentMigration Agent. Agent used to support migrating documents between different document-plugins, as single documents or batches.")]
public interface IDocumentMigrationAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;

using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
   using (DocumentMigrationAgent agent = new DocumentMigrationAgent())
   {
      // call methods on agent here...
   }
}

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

Online Restricted: The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Declaration
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

Online Restricted: The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Declaration
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!

Online Restricted: The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Declaration
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
Returns
Type Description
Task<DocumentMigrationItemList>

Never null.

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

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

Online Restricted: The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Declaration
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
Returns
Type Description
Task<DocumentMigrationItemList>

Never null.

GetForSelectionAsync(int, int, bool, CancellationToken)

Gets a migration summary for documents in the provided selection

Online Restricted: The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Declaration
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
Returns
Type Description
Task<DocumentMigrationItemList>

Never null.

GetForTemplatesAsync(int, bool, CancellationToken)

Gets a migration summary for all templates stored in CRM.

Online Restricted: The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Declaration
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
Returns
Type Description
Task<DocumentTemplateMigrationList>

Never null.

GetNumberOfConfidentialDocumentsAsync(CancellationToken)

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

Online Restricted: The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Declaration
Task<int> GetNumberOfConfidentialDocumentsAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
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.

Online Restricted: The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Declaration
Task<bool> HasDocumentsToMigrateAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
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.

Online Restricted: The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Declaration
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
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.

Online Restricted: The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.
Declaration
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
Returns
Type Description
Task

This method has no return value

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