Interface IWorkflowItemService
The IWorkflowItemService interface is responsible for facilitating the creation and retrieval of items within a moderation workflow.
Namespace: EPiServer.Social.Moderation.Core
Assembly: EPiServer.Social.Moderation.Core.dll
Version: 1.5.4Syntax
public interface IWorkflowItemService
Methods
Add(WorkflowItem)
Adds a new workflow item.
Declaration
WorkflowItem Add(WorkflowItem item)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItem | item | Workflow item to be added |
Returns
| Type | Description |
|---|---|
| WorkflowItem | Workflow item which was just added |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| WorkflowDoesNotExistException | Thrown when the workflow specified for workflow item being added does not exist. |
| InvalidWorkflowStateException | Thrown when the workflow item being added has a state that is not currently supported by its associated workflow. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Add(WorkflowItem, TransitionSessionToken)
Adds a new workflow item within an exclusive transition session. Use the BeginTransitionSession() method of the IWorkflowService to retrieve a session token. 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. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Add<TExtension>(WorkflowItem, TExtension)
Adds a new workflow item with supporting metadata to form a composite.
Declaration
Composite<WorkflowItem, TExtension> Add<TExtension>(WorkflowItem workflowItem, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItem | workflowItem | Workflow item to be added |
| TExtension | extension | Extended data related to the workflow item |
Returns
| Type | Description |
|---|---|
| Composite<WorkflowItem, TExtension> | The workflow item composed with the extended data |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type applied as an extension of the workflow item |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| WorkflowDoesNotExistException | Thrown when the workflow specified for workflow item being added does not exist. |
| InvalidWorkflowStateException | Thrown when the workflow item being added has a state that is not currently supported by its associated workflow. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Add<TExtension>(WorkflowItem, TExtension, TransitionSessionToken)
Adds a new workflow item with supporting metadata, within an exclusive transition session. Use the BeginTransitionSession() method of the IWorkflowService to retrieve a session token. If another client already has secured access to that target, a TransitionSessionDeniedException will be thrown.
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. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
AddAsync(WorkflowItem)
Asynchronously adds a new workflow item.
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 just added |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| WorkflowDoesNotExistException | Thrown when the workflow specified for workflow item being added does not exist. |
| InvalidWorkflowStateException | Thrown when the workflow item being added has a state that is not currently supported by its associated workflow. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
AddAsync(WorkflowItem, TransitionSessionToken)
Asynchronously adds a new workflow item within an exclusive transition session. Use the BeginTransitionSession() method of the IWorkflowService to retrieve a session token. 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. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
AddAsync<TExtension>(WorkflowItem, TExtension)
Asynchronously adds a new workflow item with supporting metadata to form a composite.
Declaration
Task<Composite<WorkflowItem, TExtension>> AddAsync<TExtension>(WorkflowItem workflowItem, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItem | workflowItem | Workflow item to be added |
| TExtension | extension | Extended data related to the workflow item |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<WorkflowItem, TExtension>> | The workflow item composed with the extended data |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type applied as an extension of the workflow item |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| WorkflowDoesNotExistException | Thrown when the workflow specified for workflow item being added does not exist. |
| InvalidWorkflowStateException | Thrown when the workflow item being added has a state that is not currently supported by its associated workflow. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
AddAsync<TExtension>(WorkflowItem, TExtension, TransitionSessionToken)
Asynchronously adds a new workflow item with supporting metadata, within an exclusive transition session. Use the BeginTransitionSession() method of the IWorkflowService to retrieve a session token. If another client already has secured access to that target, a TransitionSessionDeniedException will be thrown.
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. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Get(Criteria<WorkflowItemFilter>)
Retrieves a page of workflow items as specified by the provided criteria.
Declaration
ResultPage<WorkflowItem> Get(Criteria<WorkflowItemFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<WorkflowItemFilter> | criteria | Filters the result set of workflow items |
Returns
| Type | Description |
|---|---|
| ResultPage<WorkflowItem> | Page of workflow items filtered according to the specified criteria |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| InvalidPageInfoException | Thrown when the page info is invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Get(WorkflowItemId)
Gets the workflow item represented by the specified ID.
Declaration
WorkflowItem Get(WorkflowItemId id)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItemId | id | ID of the workflow item to retrieve |
Returns
| Type | Description |
|---|---|
| WorkflowItem | Workflow item with the specified ID |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| WorkflowItemDoesNotExistException | Thrown when the identified workflow item does not exist. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Get<TExtension>(CompositeCriteria<WorkflowItemFilter, TExtension>)
Retrieves a page of workflow items as specified by the provided 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 | Filters the result set of workflow items |
Returns
| Type | Description |
|---|---|
| ResultPage<Composite<WorkflowItem, TExtension>> | Page of composite workflow items filtered according to the specified criteria |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of data associated with the desired workflow items |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| InvalidPageInfoException | Thrown when the page info is invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Get<TExtension>(WorkflowItemId)
Gets a workflow item composed with associated extension data, 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 |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| WorkflowItemDoesNotExistException | Thrown when the identified workflow item does not exist. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
GetAsync(Criteria<WorkflowItemFilter>)
Asynchronously retrieves a page of workflow items as specified by the provided criteria.
Declaration
Task<ResultPage<WorkflowItem>> GetAsync(Criteria<WorkflowItemFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<WorkflowItemFilter> | criteria | Filters the result set of workflow items |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<WorkflowItem>> | Page of workflow items filtered according to the specified criteria |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| InvalidPageInfoException | Thrown when the page info is invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
GetAsync(WorkflowItemId)
Asynchronously gets the workflow item represented by the specified ID.
Declaration
Task<WorkflowItem> GetAsync(WorkflowItemId id)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItemId | id | ID of the workflow item to retrieve |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<WorkflowItem> | Workflow item with the specified ID |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| WorkflowItemDoesNotExistException | Thrown when the identified workflow item does not exist. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
GetAsync<TExtension>(CompositeCriteria<WorkflowItemFilter, TExtension>)
Asynchronously retrieves a page of workflow items as specified by the provided 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 | Filters the result set of workflow items |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<Composite<WorkflowItem, TExtension>>> | Page of composite workflow items filtered according to the specified criteria |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of data associated with the desired workflow items |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| InvalidPageInfoException | Thrown when the page info is invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
GetAsync<TExtension>(WorkflowItemId)
Asynchronously gets a workflow item composed with associated extension data, 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 |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| WorkflowItemDoesNotExistException | Thrown when the identified workflow item does not exist. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Remove(Reference)
Removes the workflow items associated with the specified resource under moderation.
Declaration
void Remove(Reference target)
Parameters
| Type | Name | Description |
|---|---|---|
| Reference | target | Reference identifying the resource under moderation whose workflow items should be removed |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are null or invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Remove(WorkflowId)
Removes the workflow items associated with the identified workflow.
Declaration
void Remove(WorkflowId id)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowId | id | ID of the workflow whose items should be removed |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are null or invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Remove(WorkflowItemId)
Removes the workflow item with the specified ID.
Declaration
void Remove(WorkflowItemId id)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItemId | id | ID of the workflow item to be removed |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are null or invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
RemoveAsync(Reference)
Asynchronously removes the workflow items associated with the specified resource under moderation.
Declaration
Task RemoveAsync(Reference target)
Parameters
| Type | Name | Description |
|---|---|---|
| Reference | target | Reference identifying the resource under moderation whose workflow items should be removed |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are null or invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
RemoveAsync(WorkflowId)
Asynchronously removes the workflow items associated with the identified workflow.
Declaration
Task RemoveAsync(WorkflowId id)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowId | id | ID of the workflow whose items should be removed |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are null or invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
RemoveAsync(WorkflowItemId)
Asynchronously removes the workflow item with the specified ID.
Declaration
Task RemoveAsync(WorkflowItemId id)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkflowItemId | id | ID of the workflow item to be removed |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are null or invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |