DVStudioContent class

The content workflow for Studio page documents, wired to the page store and to DV.Cache.

Constructors

DVStudioContent({required String actorId(Object? user), Future<Object?> findActor(String actorId)?, List<int>? previewKey, DVDatabaseAdapter? database, DVAuthAuthorization authorization = const DVAuthAuthorization(), Future<void> notify(String recipient, DVNotificationMessage message)?, bool requireApproval = true, Duration missedAfter = const Duration(minutes: 5), DateTime clock()?, DVPageStore store = const DVPageStore(), Uri previewUrl(String route, String token)?})

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
workflow → DVContentWorkflow<DVPageDocument>
Policies register against DVPageDocument for the DVContentActions.
final

Methods

actorIdOf(Object? user) → String
The id the workflow records for user.
attach(DVStudioEditorController controller, {required Object? as}) → void
Makes controller's save open or edit a draft as as, rather than publishing.
bundle({required String version}) → Future<DVPageBundle>
A bundle of every published page, with the approval each was published under.
can(Object? user, String action, DVPageDocument document) → Future<bool>
Whether user holds action on document, asked of the same policies the workflow checks.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
now() → DateTime
The workflow's clock, so a schedule picked in Studio is judged against the same "now" the workflow refuses a past slot by.
A signed, expiring link to version on the application's own routes.
routes() → Future<List<String>>
Every route with at least one page version, sorted.
saveDraft(DVPageDocument document, {required Object? as}) → Future<DVContentVersion<DVPageDocument>>
Saves document into its open version, or opens a draft beside the published one when there is none.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

kind → const String
The document kind page versions are stored under.