SaaS CMS has officially launched! Learn more now.

Interface IApprovalRepository

NOTE: This is a pre-release API that is UNSTABLE and might not satisfy the compatibility requirements as denoted by its associated normal version. Repository for handling approval instances.

Namespace: EPiServer.Approvals
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
public interface IApprovalRepository

Methods

DeleteAsync(IEnumerable<Int32>)

Deletes a list of approval instances.

Declaration
Task DeleteAsync(IEnumerable<int> ids)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Int32> ids

A list of ids for the approval instances

Returns
Type Description
System.Threading.Tasks.Task

GetItemsAsync(IEnumerable<Int32>)

Gets a list of approval instances by using ids.

Declaration
Task<IEnumerable<Approval>> GetItemsAsync(IEnumerable<int> ids)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Int32> ids

List of approval instance ids

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Approval>>

A list of approval instances

GetItemsAsync(IEnumerable<Uri>)

Gets a list of approval instances by using approval references.

Declaration
Task<IEnumerable<Approval>> GetItemsAsync(IEnumerable<Uri> references)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Uri> references

List of approval references

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Approval>>

A list of approval instances

ListAsync(ApprovalQuery, Int64, Int32)

Get a filtered and paged list of approval instances.

Declaration
Task<PagedApprovalResult> ListAsync(ApprovalQuery query, long startIndex, int maxRows)
Parameters
Type Name Description
ApprovalQuery query

Query information

System.Int64 startIndex

The start index, used for paging

System.Int32 maxRows

The maximum number of rows returned

Returns
Type Description
System.Threading.Tasks.Task<PagedApprovalResult>

Paged list of approval instances

ListDecisionsAsync(Int32, Nullable<Int32>)

Gets a list of step decisions for an approval instance.

Declaration
Task<IEnumerable<ApprovalStepDecision>> ListDecisionsAsync(int id, int? stepIndex)
Parameters
Type Name Description
System.Int32 id

An approval instance id

System.Nullable<System.Int32> stepIndex

Filter result for a single step

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ApprovalStepDecision>>

A list of step decisions

SaveAsync(IEnumerable<Approval>, String)

Saves a list of approval instances.

Declaration
Task SaveAsync(IEnumerable<Approval> approvals, string username)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Approval> approvals

List of approval instances

System.String username

The user who saved the approvals

Returns
Type Description
System.Threading.Tasks.Task
Exceptions
Type Condition
ApprovalFormatException

The format of the approval is invalid

SaveDecisionAsync(Int32, ApprovalStepDecision)

Saves a decision to an approval instance

Declaration
Task SaveDecisionAsync(int id, ApprovalStepDecision decision)
Parameters
Type Name Description
System.Int32 id

The id of the approval that the decision is associated with

ApprovalStepDecision decision

The decision to add

Returns
Type Description
System.Threading.Tasks.Task

Extension Methods