final class NodeAggregateWasMoved implements EventInterface, PublishableToWorkspaceInterface, EmbedsContentStreamId, EmbedsNodeAggregateId, EmbedsWorkspaceName (View source)

A node aggregate was moved in a content stream

We always move a node aggregate identified by a NodeAggregateId (in a given ContentStreamId); or parts of the NodeAggregate.

The inner structure of the event is rather complicated, that's why the following picture shows it:

┌───────────────────────────────────┐
│   NodeAggregateWasMoved           │
│-> contains NodeAggregateId        │
│-> contains parent NodeAggregateId │
└─────────┬─────────────────────────┘
         │
         │   ┌────────────────────────────────────────────────────┐
         │   │             InterdimensionalSibling                │
         │   │     -> contains DimensionSpacePoint                │
         │  *│     -> contains succeeding sibling NodeAggregateId │
         └───▶                                                    │
             │ (1 per affected dimension space point)             │
             └────────────────────────────────────────────────────┘
  • We move some parts of a single NodeAggregate (NodeAggregateWasMoved).
  • If given, a single parent NodeAggregateId is provided and to be used for all affected DimensionSpacePoints. Else, no new parent will be set for any on the variants.
  • For each affected DimensionSpacePoint, an optional succeeding sibling is provided. -- If a single node is to be moved to the end, the succeeding sibling NodeAggregateId is null -- If a single node is to be moved to the start, the previous first sibling is to be set as succeeding sibling -- If a single node is not to be moved at all, e.g. if no siblings can be determined, it is considered unaffected and it (its DSP respectively) is not part of the InterdimensionalSibling collection

Methods

__construct(WorkspaceName $workspaceName, ContentStreamId $contentStreamId, NodeAggregateId $nodeAggregateId, NodeAggregateId|null $newParentNodeAggregateId, InterdimensionalSiblings $succeedingSiblingsForCoverage)

No description

getWorkspaceName()

No description

static EventInterface
fromArray(array $values)

No description

array
jsonSerialize()

No description

Details

__construct(WorkspaceName $workspaceName, ContentStreamId $contentStreamId, NodeAggregateId $nodeAggregateId, NodeAggregateId|null $newParentNodeAggregateId, InterdimensionalSiblings $succeedingSiblingsForCoverage)

No description

Parameters

WorkspaceName $workspaceName
ContentStreamId $contentStreamId
NodeAggregateId $nodeAggregateId
NodeAggregateId|null $newParentNodeAggregateId
InterdimensionalSiblings $succeedingSiblingsForCoverage

ContentStreamId getContentStreamId()

No description

Return Value

ContentStreamId

NodeAggregateId getNodeAggregateId()

No description

Return Value

NodeAggregateId

WorkspaceName getWorkspaceName()

No description

Return Value

WorkspaceName

PublishableToWorkspaceInterface withWorkspaceNameAndContentStreamId(WorkspaceName $targetWorkspaceName, ContentStreamId $contentStreamId)

No description

Parameters

WorkspaceName $targetWorkspaceName
ContentStreamId $contentStreamId

Return Value

PublishableToWorkspaceInterface

static EventInterface fromArray(array $values)

No description

Parameters

array $values

Return Value

EventInterface

array jsonSerialize()

No description

Return Value

array