Interface IFinalLifeCycleManager
Contains operations on the final life cycle status of an Asset.
Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ContractsContent
Assembly: Stylelabs.M.Sdk.dll
Syntax
public interface IFinalLifeCycleManagerMethods
ApproveAsync(long)
Approves an Asset. State will become Approved.
Declaration
Task ApproveAsync(long id)Parameters
| Type | Name | Description |
|---|---|---|
| long | id |
Id of the asset. |
Returns
| Type | Description |
|---|---|
| Task |
An awaitable . |
Exceptions
| Type | Condition |
|---|---|
| ForbiddenException |
When the id is not from an Asset entity. |
| ForbiddenException |
When the transition is not allowed. |
ArchiveAsync(long)
Archives an Asset. State will become Archived.
Declaration
Task ArchiveAsync(long id)Parameters
| Type | Name | Description |
|---|---|---|
| long | id |
Id of the asset. |
Returns
| Type | Description |
|---|---|
| Task |
An awaitable . |
Exceptions
| Type | Condition |
|---|---|
| ForbiddenException |
When the id is not from an Asset entity. |
| ForbiddenException |
When the transition is not allowed. |
DirectPublishAsync(long)
Directly publishes an Asset. State will become Approved.
Declaration
Task DirectPublishAsync(long id)Parameters
| Type | Name | Description |
|---|---|---|
| long | id |
Id of the asset. |
Returns
| Type | Description |
|---|---|
| Task |
An awaitable . |
Exceptions
| Type | Condition |
|---|---|
| ForbiddenException |
When the id is not from an Asset entity. |
| ForbiddenException |
When the transition is not allowed. |
GetFinalLifeCycleStatusIdAsync(FinalLifeCycleStatus)
Gets the id of a final life cycle status entity.
Declaration
Task<long?> GetFinalLifeCycleStatusIdAsync(FinalLifeCycleStatus status)Parameters
| Type | Name | Description |
|---|---|---|
| FinalLifeCycleStatus | status |
The status. |
Returns
| Type | Description |
|---|---|
| Task<>long |
The id or null when it was not found. |
GetFinalLifeCycleStatusIdAsync(string)
Gets the id of a final life cycle status entity.
Declaration
Task<long?> GetFinalLifeCycleStatusIdAsync(string status)Parameters
| Type | Name | Description |
|---|---|---|
| string | status |
The status. |
Returns
| Type | Description |
|---|---|
| Task<>long |
The id or null when it was not found. |
RejectAsync(long, string)
Rejects an Asset. State will become Rejected.
Declaration
Task RejectAsync(long id, string reason = null)Parameters
| Type | Name | Description |
|---|---|---|
| long | id |
Id of the asset. |
| string | reason |
The rejection reason. |
Returns
| Type | Description |
|---|---|
| Task |
An awaitable . |
Exceptions
| Type | Condition |
|---|---|
| ForbiddenException |
When the id is not from an Asset entity. |
| ForbiddenException |
When the transition is not allowed. |
RestoreAsync(long)
Restores an Asset. State will become Approved.
Declaration
Task RestoreAsync(long id)Parameters
| Type | Name | Description |
|---|---|---|
| long | id |
Id of the asset. |
Returns
| Type | Description |
|---|---|
| Task |
An awaitable . |
Exceptions
| Type | Condition |
|---|---|
| ForbiddenException |
When the id is not from an Asset entity. |
| ForbiddenException |
When the transition is not allowed. |
SubmitAsync(long)
Submits an Asset. State will become UnderReview.
Declaration
Task SubmitAsync(long id)Parameters
| Type | Name | Description |
|---|---|---|
| long | id |
Id of the asset. |
Returns
| Type | Description |
|---|---|
| Task |
An awaitable . |
Exceptions
| Type | Condition |
|---|---|
| ForbiddenException |
When the id is not from an Asset entity. |
| ForbiddenException |
When the transition is not allowed. |