Table of Contents

Interface IDocumentRepository

Namespace
JobFlow.Core.Documents
Assembly
JobFlow.Core.dll

Operations for documents.

public interface IDocumentRepository
Extension Methods

Remarks

This class allows one to manage documents, including both the workitem data as well as attachments. Note that attachments beyond the primary workitem data document cannot be used to match items in the routing rules.

This service cannot be resolved directly. Use IDocumentRepositoryManager to retrieve an appropriate IDocumentRepository instance.

JobFlow.Data.Entities.IAttachmentCollection designates any entity that can accept attachments.

Methods

CreateAsync(string, IDocument)

Create an attachment.

Task<Attachment> CreateAsync(string name, IDocument data)

Parameters

name string
data IDocument

Returns

Task<Attachment>

DeleteAsync(Attachment)

Delete the document. This does not delete the Attachment entity.

Task DeleteAsync(Attachment attachment)

Parameters

attachment Attachment

Returns

Task

DeleteAsync(int)

Delete the document. This does not delete the Attachment entity.

Task<Attachment> DeleteAsync(int attachmentId)

Parameters

attachmentId int

Returns

Task<Attachment>

RetrieveAsync(Attachment, string)

Retrieve the attachment document.

Task<IDocument> RetrieveAsync(Attachment attachment, string typeName)

Parameters

attachment Attachment
typeName string

Returns

Task<IDocument>

RetrieveAsync(int, string)

Retrieve the attachment document.

Task<IDocument> RetrieveAsync(int attachmentId, string typeName)

Parameters

attachmentId int
typeName string

Returns

Task<IDocument>

RetrieveAsync<T>(Attachment)

Retrieve the attachment document.

Task<Document<T>> RetrieveAsync<T>(Attachment attachment)

Parameters

attachment Attachment

Returns

Task<Document<T>>

Type Parameters

T

RetrieveAsync<T>(int)

Retrieve the attachment document.

Task<Document<T>> RetrieveAsync<T>(int attachmentId)

Parameters

attachmentId int

Returns

Task<Document<T>>

Type Parameters

T

UpdateAsync<T>(int, Document<T>, Action<Document<T>>)

Update an existing attachment document.

Task<Document<T>> UpdateAsync<T>(int attachmentId, Document<T> initial, Action<Document<T>> updateAction)

Parameters

attachmentId int
initial Document<T>
updateAction Action<Document<T>>

Returns

Task<Document<T>>

Type Parameters

T