Interface IWorkflowItemRepository
The IWorkflowItemRepository interface describes a component capable of persisting and retrieving workflow item data from an underlying data store.
Namespace: EPiServer.Social.Moderation.Core
Assembly: EPiServer.Social.Moderation.Core.dll
Version: 1.5.4Syntax
public interface IWorkflowItemRepository
Methods
Add(WorkflowItem)
Adds a new workflow item to the underlying data store.
Declaration
WorkflowItem Add(WorkflowItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItem | item | Workflow item to be added |
Returns
| Type | Description |
|---|---|
| WorkflowItem | Workflow item which was added |
Add(WorkflowItem, TransitionSessionToken)
Adds a new workflow item to the underlying data store, within an exclusive transition session. If another client already has secured access to that target, a TransitionSessionDeniedException will be thrown.
Declaration
WorkflowItem Add(WorkflowItem item, TransitionSessionToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItem | item | Workflow item to be added |
| TransitionSessionToken | token | Token authorizing exclusive access to the target within a particular workflow |
Returns
| Type | Description |
|---|---|
| WorkflowItem | Workflow item which was added |
Exceptions
| Type | Condition |
|---|---|
| TransitionSessionDeniedException | Exclusive access for the specified workflow and target combination could not be secured. Access may have already been secured by another client. |
Add<TExtension>(WorkflowItem, TExtension)
Adds a new workflow item with supporting metadata to the underlying data store.
Declaration
Composite<WorkflowItem, TExtension> Add<TExtension>(WorkflowItem item, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItem | item | Workflow item to be added |
| TExtension | extension | Extended data supporting the workflow item |
Returns
| Type | Description |
|---|---|
| Composite<WorkflowItem, TExtension> | A workflow item composed with the specified extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of data applied as an extension of the workflow item |
Add<TExtension>(WorkflowItem, TExtension, TransitionSessionToken)
Adds a new workflow item with supporting metadata, within an exclusive transition session, to the underlying data store.
Declaration
Composite<WorkflowItem, TExtension> Add<TExtension>(WorkflowItem item, TExtension extension, TransitionSessionToken token)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItem | item | Workflow item to be added |
| TExtension | extension | Extended data supporting the workflow item |
| TransitionSessionToken | token | Token authorizing exclusive access to the target within a particular workflow |
Returns
| Type | Description |
|---|---|
| Composite<WorkflowItem, TExtension> | A workflow item composed with the specified extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of data applied as an extension of the workflow item |
Exceptions
| Type | Condition |
|---|---|
| TransitionSessionDeniedException | Exclusive access for the specified workflow and target combination could not be secured. Access may have already been secured by another client. |
AddAsync(WorkflowItem)
Asynchronously adds a new workflow item to the underlying data store.
Declaration
Task<WorkflowItem> AddAsync(WorkflowItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItem | item | Workflow item to be added |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<WorkflowItem> | Workflow item which was added |
AddAsync(WorkflowItem, TransitionSessionToken)
Asynchronously adds a new workflow item to the underlying data store, within an exclusive transition session. If another client already has secured access to that target, a TransitionSessionDeniedException will be thrown.
Declaration
Task<WorkflowItem> AddAsync(WorkflowItem item, TransitionSessionToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItem | item | Workflow item to be added |
| TransitionSessionToken | token | Token authorizing exclusive access to the target within a particular workflow |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<WorkflowItem> | Workflow item which was added |
Exceptions
| Type | Condition |
|---|---|
| TransitionSessionDeniedException | Exclusive access for the specified workflow and target combination could not be secured. Access may have already been secured by another client. |
AddAsync<TExtension>(WorkflowItem, TExtension)
Asynchronously adds a new workflow item with supporting metadata to the underlying data store.
Declaration
Task<Composite<WorkflowItem, TExtension>> AddAsync<TExtension>(WorkflowItem item, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItem | item | Workflow item to be added |
| TExtension | extension | Extended data supporting the workflow item |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<WorkflowItem, TExtension>> | A workflow item composed with the specified extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of data applied as an extension of the workflow item |
AddAsync<TExtension>(WorkflowItem, TExtension, TransitionSessionToken)
Asynchronously adds a new workflow item with supporting metadata, within an exclusive transition session, to the underlying data store.
Declaration
Task<Composite<WorkflowItem, TExtension>> AddAsync<TExtension>(WorkflowItem item, TExtension extension, TransitionSessionToken token)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItem | item | Workflow item to be added |
| TExtension | extension | Extended data supporting the workflow item |
| TransitionSessionToken | token | Token authorizing exclusive access to the target within a particular workflow |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<WorkflowItem, TExtension>> | A workflow item composed with the specified extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of data applied as an extension of the workflow item |
Exceptions
| Type | Condition |
|---|---|
| TransitionSessionDeniedException | Exclusive access for the specified workflow and target combination could not be secured. Access may have already been secured by another client. |
Delete(Reference)
Deletes the workflow items associated with the specified resource under moderation from the underlying data store.
Declaration
void Delete(Reference target)
Parameters
| Type | Name | Description |
|---|---|---|
| Reference | target | Reference identifying the resource under moderation whose workflow items should be deleted |
Delete(WorkflowId)
Deletes the workflow items associated with the identified workflow from the underlying data store.
Declaration
void Delete(WorkflowId id)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowId | id | ID of the workflow whose items should be deleted |
Delete(WorkflowItemId)
Deletes the workflow item with the specified ID from the underlying data store.
Declaration
void Delete(WorkflowItemId id)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItemId | id | ID of the workflow item to be deleted |
DeleteAsync(Reference)
Asynchronously deletes the workflow items associated with the specified resource under moderation from the underlying data store.
Declaration
Task DeleteAsync(Reference target)
Parameters
| Type | Name | Description |
|---|---|---|
| Reference | target | Reference identifying the resource under moderation whose workflow items should be deleted |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
DeleteAsync(WorkflowId)
Asynchronously deletes the workflow items associated with the identified workflow from the underlying data store.
Declaration
Task DeleteAsync(WorkflowId id)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowId | id | ID of the workflow whose items should be deleted |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
DeleteAsync(WorkflowItemId)
Asynchronously deletes the workflow item with the specified ID from the underlying data store.
Declaration
Task DeleteAsync(WorkflowItemId id)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItemId | id | ID of the workflow item to be deleted |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Get(Criteria<WorkflowItemFilter>)
Retrieves a page of workflow items from the underlying data store, as described by the specified criteria.
Declaration
ResultPage<WorkflowItem> Get(Criteria<WorkflowItemFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<WorkflowItemFilter> | criteria | Criteria by which to filter workflow items |
Returns
| Type | Description |
|---|---|
| ResultPage<WorkflowItem> | Page of workflow items |
Get(WorkflowItemId)
Gets a workflow item with the specified ID from the underlying data store.
Declaration
WorkflowItem Get(WorkflowItemId id)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItemId | id | ID of the item to be retrieved |
Returns
| Type | Description |
|---|---|
| WorkflowItem | Workflow item with the specified ID |
Get<TExtension>(CompositeCriteria<WorkflowItemFilter, TExtension>)
Retrieves a page of workflow items from the underlying data store, as described by the specified criteria. The workflow items are filtered by the type of their associated data.
Declaration
ResultPage<Composite<WorkflowItem, TExtension>> Get<TExtension>(CompositeCriteria<WorkflowItemFilter, TExtension> criteria)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeCriteria<WorkflowItemFilter, TExtension> | criteria | Criteria by which to filter workflow items |
Returns
| Type | Description |
|---|---|
| ResultPage<Composite<WorkflowItem, TExtension>> | Page of composite workflow items |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of data associated with the desired workflow items |
Get<TExtension>(WorkflowItemId)
Gets a workflow item composed with associated extension data from the underlying data store, as identified by the specified ID.
Declaration
Composite<WorkflowItem, TExtension> Get<TExtension>(WorkflowItemId id)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItemId | id | ID of the item to be retrieved |
Returns
| Type | Description |
|---|---|
| Composite<WorkflowItem, TExtension> | A workflow item composed with associated extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of data applied as an extension of the workflow item |
GetAsync(Criteria<WorkflowItemFilter>)
Asynchronously retrieves a page of workflow items from the underlying data store, as described by the specified criteria.
Declaration
Task<ResultPage<WorkflowItem>> GetAsync(Criteria<WorkflowItemFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<WorkflowItemFilter> | criteria | Criteria by which to filter workflow items |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<WorkflowItem>> | Page of workflow items |
GetAsync(WorkflowItemId)
Asynchronously retrieves a workflow item with the specified ID from the underlying data store.
Declaration
Task<WorkflowItem> GetAsync(WorkflowItemId id)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItemId | id | ID of the item to be retrieved |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<WorkflowItem> | Workflow item with the specified ID |
GetAsync<TExtension>(CompositeCriteria<WorkflowItemFilter, TExtension>)
Asynchronously retrieves a page of workflow items from the underlying data store, as described by the specified criteria. The workflow items are filtered by the type of their associated data.
Declaration
Task<ResultPage<Composite<WorkflowItem, TExtension>>> GetAsync<TExtension>(CompositeCriteria<WorkflowItemFilter, TExtension> criteria)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeCriteria<WorkflowItemFilter, TExtension> | criteria | Criteria by which to filter workflow items |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<Composite<WorkflowItem, TExtension>>> | Page of composite workflow items |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of data associated with the desired workflow items |
GetAsync<TExtension>(WorkflowItemId)
Asynchronously retrieves a workflow item composed with associated extension data from the underlying data store, as identified by the specified ID.
Declaration
Task<Composite<WorkflowItem, TExtension>> GetAsync<TExtension>(WorkflowItemId id)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItemId | id | ID of the item to be retrieved |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<WorkflowItem, TExtension>> | A workflow item composed with associated extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of data applied as an extension of the workflow item |