Class FinalLifeCycleManagerBase
Contains operations on the final life cycle status of an Asset.
Inheritance
Implements
Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsClients
Assembly: Stylelabs.M.Sdk.dll
Syntax
public abstract class FinalLifeCycleManagerBase : IFinalLifeCycleManagerConstructors
FinalLifeCycleManagerBase(IMClient)
Declaration
public FinalLifeCycleManagerBase(IMClient client)Parameters
| Type | Name | Description |
|---|---|---|
| IMClient | client |
Methods
ApproveAsync(long)
Approves an Asset. State will become Approved.
Declaration
public abstract 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
public abstract 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
public abstract 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
public 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
public 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
public abstract 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
public abstract 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
public abstract 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. |