ResolveInstanceSchema class
Resolves the attribute schema in scope for one instance.
ResolveSchema answers "which attributes apply to these trait ids"; this
answers which trait ids those are for an article: the traits the instance
carries itself, plus the traits of the SKU it instantiates, each walked up its
parent chain. An instance is classified independently of its model, so the
two claims merge — and this merged schema is what a form for that article
renders, and what AssertUniqueAttributeValues measures its values against.
Two boundaries are deliberate:
- A SKU nobody stored contributes nothing. An instance pointing at a model that is not there is the consumer's to surface; this is not the place to start refusing to describe an article.
- The SKUs above the model in an assembly are not in scope. A value an article inherits from the assembly it sits in is the assembly's claim, not the article's own.
Constructors
- ResolveInstanceSchema({required ISkuRepository skuRepository, required ResolveSchema resolveSchema})
-
Creates a ResolveInstanceSchema use case.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
{required Instance instance}) → TaskEither< DomainFailure, List< ResolvedAttribute> > -
Executes the use case: the schema for
instance, definitions only. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited