Skip to main content

<a id=β€œSuperOffice_WebApi_Agents_IDocumentMigrationAgent”></a> Interface IDocumentMigrationAgent

Namespace: SuperOffice.WebApi.Agents
Assembly: SuperOffice.WebApi.dll
Agent used to support migrating documents between different document-plugins, as single documents or batches. <p></p> <b>Online Restricted:</b> This agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.

Implements

IAgentBase, IDisposable

Methods

<a id=β€œSuperOffice_WebApi_Agents_IDocumentMigrationAgent_CreateDefaultDocumentMigrationItemListAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultDocumentMigrationItemListAsync(RequestOptions)

Set default values into a new DocumentMigrationItemList. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DocumentMigrationItemList&gt; A blank DocumentMigrationItemList

<a id=β€œSuperOffice_WebApi_Agents_IDocumentMigrationAgent_CreateDefaultDocumentTemplateMigrationListAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultDocumentTemplateMigrationListAsync(RequestOptions)

Set default values into a new DocumentTemplateMigrationList. NetServer calculates default values on the entity, which is required when creating/storing a new instance

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DocumentTemplateMigrationList&gt; A blank DocumentTemplateMigrationList

<a id=β€œSuperOffice_WebApi_Agents_IDocumentMigrationAgent_GetForAllDocumentsAsync_System_Int32_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> GetForAllDocumentsAsync(int, bool, RequestOptions)

Gets a migration summary for all documents stored in CRM. Warning: Expensive! <p></p> <b>Online Restricted:</b> The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.

Parameters

documentPluginId int The ID of the document-plugin to migrate to. includeEmails bool True if documents to migrate should include emails. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DocumentMigrationItemList&gt; Never null.

<a id=β€œSuperOffice_WebApi_Agents_IDocumentMigrationAgent_GetForDateRangeAsync_System_Int32_System_DateTime_System_DateTime_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> GetForDateRangeAsync(int, DateTime, DateTime, bool, RequestOptions)

Gets a migration summary for documents in the provided date-rage <p></p> <b>Online Restricted:</b> The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.

Parameters

documentPluginId int The ID of the document-plugin to migrate to. minDate DateTime Inclusive mininmum. maxDate DateTime Inclusive maximum. includeEmails bool True if documents to migrate should include emails. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DocumentMigrationItemList&gt; Never null.

<a id=β€œSuperOffice_WebApi_Agents_IDocumentMigrationAgent_GetForSelectionAsync_System_Int32_System_Int32_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> GetForSelectionAsync(int, int, bool, RequestOptions)

Gets a migration summary for documents in the provided selection <p></p> <b>Online Restricted:</b> The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.

Parameters

documentPluginId int The ID of the document-plugin to migrate to. selectionId int ID of the selection used to create the DocumentMigrationSummary instance. includeEmails bool True if documents to migrate should include emails. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DocumentMigrationItemList&gt; Never null.

<a id=β€œSuperOffice_WebApi_Agents_IDocumentMigrationAgent_GetForTemplatesAsync_System_Int32_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> GetForTemplatesAsync(int, bool, RequestOptions)

Gets a migration summary for all templates stored in CRM. <p></p> <b>Online Restricted:</b> The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.

Parameters

targetDocumentPluginId int The ID of the document-plugin to migrate to. includeEmails bool True if templates to migrate should include emails. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<DocumentTemplateMigrationList&gt; Never null.

<a id=β€œSuperOffice_WebApi_Agents_IDocumentMigrationAgent_GetNumberOfConfidentialDocumentsAsync_SuperOffice_WebApi_RequestOptions_”></a> GetNumberOfConfidentialDocumentsAsync(RequestOptions)

Gets the total number of documents that is not visible to everyone <p></p> <b>Online Restricted:</b> The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<int&gt; Number of confidential documents.

<a id=β€œSuperOffice_WebApi_Agents_IDocumentMigrationAgent_HasDocumentsToMigrateAsync_SuperOffice_WebApi_RequestOptions_”></a> HasDocumentsToMigrateAsync(RequestOptions)

Checks if there are any documents in the current database stored using a non-default document-plugin, and which can be migrated. <p></p> <b>Online Restricted:</b> The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<bool&gt; True if there are documents available to migrate.

<a id=β€œSuperOffice_WebApi_Agents_IDocumentMigrationAgent_MigrateDocumentToNewDocPluginAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> MigrateDocumentToNewDocPluginAsync(int, int, RequestOptions)

Migrates the document with the provided id to the specified document-plugin. <p></p> <b>Online Restricted:</b> The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.

Parameters

documentId int The ID of the document to migrate. documentPluginId int The ID of the document-plugin to migrate to. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value

<a id=β€œSuperOffice_WebApi_Agents_IDocumentMigrationAgent_MigrateTemplateToNewDocPluginAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> MigrateTemplateToNewDocPluginAsync(int, int, RequestOptions)

Migrates the template with the provided id to the specified document-plugin. <p></p> <b>Online Restricted:</b> The DocumentMigration agent is not available in Online by default. Access must be requested specifically when app is registered. Intended for SuperOffice-internal apps.

Parameters

documentTemplateId int The ID of the document-template to migrate. targetDocumentPluginId int The ID of the document-plugin to migrate to. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task This method has no return value