Interface IDocumentRepository
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
Returns
- Task<Attachment>
DeleteAsync(Attachment)
Delete the document. This does not delete the Attachment entity.
Task DeleteAsync(Attachment attachment)
Parameters
attachment
Attachment
Returns
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
AttachmenttypeName
string
Returns
RetrieveAsync(int, string)
Retrieve the attachment document.
Task<IDocument> RetrieveAsync(int attachmentId, string typeName)
Parameters
Returns
RetrieveAsync<T>(Attachment)
Retrieve the attachment document.
Task<Document<T>> RetrieveAsync<T>(Attachment attachment)
Parameters
attachment
Attachment
Returns
Type Parameters
T
RetrieveAsync<T>(int)
Retrieve the attachment document.
Task<Document<T>> RetrieveAsync<T>(int attachmentId)
Parameters
attachmentId
int
Returns
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
Returns
Type Parameters
T