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: 12.0.3Syntax
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. |
ids | The identifiers of the approval definitions |
Returns
Type | Description |
---|---|
System. |
Exceptions
Type | Condition |
---|---|
Approval |
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. |
ids | The identifiers of the approval definitions |
Returns
Type | Description |
---|---|
System. |
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. |
references | References to the contents where the definitions resides |
Returns
Type | Description |
---|---|
System. |
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. |
reference | Reference to where traversal begins |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
Approval |
definition | The approval definition to be saved |
Returns
Type | Description |
---|---|
System. |
Exceptions
Type | Condition |
---|---|
Approval |
The format of the approval definition is invalid |