1. Stylelabs.M.Sdk.Contracts.Content

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 IFinalLifeCycleManager

Methods

ApproveAsync(long)

Approves an Asset. State will become Approved.

Declaration

Task ApproveAsync(long id)

Parameters

TypeNameDescription
longidId of the asset.

Returns

TypeDescription
TaskAn awaitable .

Exceptions

TypeCondition
ForbiddenExceptionWhen the id is not from an Asset entity.
ForbiddenExceptionWhen the transition is not allowed.

ArchiveAsync(long)

Archives an Asset. State will become Archived.

Declaration

Task ArchiveAsync(long id)

Parameters

TypeNameDescription
longidId of the asset.

Returns

TypeDescription
TaskAn awaitable .

Exceptions

TypeCondition
ForbiddenExceptionWhen the id is not from an Asset entity.
ForbiddenExceptionWhen the transition is not allowed.

DirectPublishAsync(long)

Directly publishes an Asset. State will become Approved.

Declaration

Task DirectPublishAsync(long id)

Parameters

TypeNameDescription
longidId of the asset.

Returns

TypeDescription
TaskAn awaitable .

Exceptions

TypeCondition
ForbiddenExceptionWhen the id is not from an Asset entity.
ForbiddenExceptionWhen the transition is not allowed.

GetFinalLifeCycleStatusIdAsync(FinalLifeCycleStatus)

Gets the id of a final life cycle status entity.

Declaration

Task<long?> GetFinalLifeCycleStatusIdAsync(FinalLifeCycleStatus status)

Parameters

TypeNameDescription
FinalLifeCycleStatusstatusThe status.

Returns

TypeDescription
Task<>longThe 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

TypeNameDescription
stringstatusThe status.

Returns

TypeDescription
Task<>longThe 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

TypeNameDescription
longidId of the asset.
stringreasonThe rejection reason.

Returns

TypeDescription
TaskAn awaitable .

Exceptions

TypeCondition
ForbiddenExceptionWhen the id is not from an Asset entity.
ForbiddenExceptionWhen the transition is not allowed.

RestoreAsync(long)

Restores an Asset. State will become Approved.

Declaration

Task RestoreAsync(long id)

Parameters

TypeNameDescription
longidId of the asset.

Returns

TypeDescription
TaskAn awaitable .

Exceptions

TypeCondition
ForbiddenExceptionWhen the id is not from an Asset entity.
ForbiddenExceptionWhen the transition is not allowed.

SubmitAsync(long)

Submits an Asset. State will become UnderReview.

Declaration

Task SubmitAsync(long id)

Parameters

TypeNameDescription
longidId of the asset.

Returns

TypeDescription
TaskAn awaitable .

Exceptions

TypeCondition
ForbiddenExceptionWhen the id is not from an Asset entity.
ForbiddenExceptionWhen the transition is not allowed.
If you have suggestions for improving this article, let us know!