November Happy Hour will be moved to Thursday December 5th.

Interface IApprovalDefinitionRepository

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 the current/active approval definitions

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

Methods

DeleteAsync(IEnumerable<Int32>)

Deletes approval definitions and all versions connected to them.

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

The identifiers of the approval definitions

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

The operation cannot be executed due to a conflict with an approval in review

GetItemsAsync(IEnumerable<Int32>)

Gets a list of the current approval definition versions. Note that this can be a version that didn't exist when the approval definition were created.

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

The identifiers of the approval definitions

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

Current definitions

GetItemsAsync(IEnumerable<Uri>)

Gets the current approval definition versions. Note that this can be a version that didn't exist when an approval definition were created.

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

References to the contents where the definitions resides

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

Current definitions

ResolveAsync(Uri)

This method resolvs an approval reference looking for a definition.

Declaration
Task<ApprovalDefinitionResolveResult> ResolveAsync(Uri reference)
Parameters
Type Name Description
System.Uri reference

Reference to where traversal begins

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

A result class where ApprovalDefinition is the current definition or null if no definition can be found

SaveAsync(ApprovalDefinition)

Saves an approval definition as a new current version.

Declaration
Task SaveAsync(ApprovalDefinition definition)
Parameters
Type Name Description
ApprovalDefinition definition

The approval definition to be saved

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

The format of the approval definition is invalid

Extension Methods