trait TetheredNodeInternals (View source)

internal  implementation details of command handlers
 

Traits

Methods

requireOrderedOccupiedDimensionSpacePoints(NodeAggregate $nodeAggregate)

A node aggregate's order of {NodeAggregate::$occupiedDimensionSpacePoints} is undefined as returned from the database.

requireOrderedOriginDimensionSpacePoints(OriginDimensionSpacePointSet $affectedOriginDimensionSpacePoints)

FIXME: This method might make sense on the InterDimensionVariationGraph but for this an explicit distinctions of unordered Set and List value objects for dimension space points is required. Currently we have Set value objects that still have sometimes an order with meaning.

createEventsForVariations(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, NodeAggregate|null $parentNodeAggregateForCoverageFilter)

No description

handleCreateNodeSpecializationVariant(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, NodeAggregate|null $parentNodeAggregateForCoverageFilter)

No description

array
collectNodeSpecializationVariantsThatWillHaveBeenCreated(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $specializationVisibility, array $events)

No description

handleCreateNodeGeneralizationVariant(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, NodeAggregate|null $parentNodeAggregateForCoverageFilter)

No description

array
collectNodeGeneralizationVariantsThatWillHaveBeenCreated(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $generalizationVisibility, array $events)

No description

handleCreateNodePeerVariant(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, NodeAggregate|null $parentNodeAggregateForCoverageFilter)

No description

array
collectNodePeerVariantsThatWillHaveBeenCreated(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $peerVisibility, array $events)

No description

createEventsForMissingTetheredNode(ContentGraphInterface $contentGraph, NodeAggregateId $parentNodeAggregateId, NodeTypeName $parentNodeTypeName, DimensionSpacePointSet $parentNodeAggregateCoverageByOccupant, OriginDimensionSpacePoint $originDimensionSpacePoint, TetheredNodeTypeDefinition $tetheredNodeTypeDefinition, NodeAggregateId|null $tetheredNodeAggregateId)

This is the remediation action for non-existing tethered nodes.

array
createEventsForMissingTetheredNodeAggregate(ContentGraphInterface $contentGraph, TetheredNodeTypeDefinition $tetheredNodeTypeDefinition, OriginDimensionSpacePointSet $affectedOriginDimensionSpacePoints, CoverageByOrigin $coverageByOrigin, NodeAggregateId $parentNodeAggregateId, NodeAggregateId|null $succeedingSiblingNodeAggregateId, NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePaths, NodePath $currentNodePath)

No description

createEventsForWronglyTypedNodeAggregate(ContentGraphInterface $contentGraph, NodeAggregate $nodeAggregate, NodeTypeName $newNodeTypeName, NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePaths, NodePath $currentNodePath, NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy|NodeAggregateTypeChangeChildConstraintConflictResolutionMarkWithTagStrategy $conflictResolutionStrategy, NodeAggregateIds $alreadyRemovedNodeAggregateIds)

No description

Details

final protected OriginDimensionSpacePointSet requireOrderedOccupiedDimensionSpacePoints(NodeAggregate $nodeAggregate)

A node aggregate's order of {NodeAggregate::$occupiedDimensionSpacePoints} is undefined as returned from the database.

Before using this unorder to emit events we use the interdimensional variation graph to order them into a flattened tree according to configuration.

Parameters

NodeAggregate $nodeAggregate

Return Value

OriginDimensionSpacePointSet

final protected OriginDimensionSpacePointSet requireOrderedOriginDimensionSpacePoints(OriginDimensionSpacePointSet $affectedOriginDimensionSpacePoints)

FIXME: This method might make sense on the InterDimensionVariationGraph but for this an explicit distinctions of unordered Set and List value objects for dimension space points is required. Currently we have Set value objects that still have sometimes an order with meaning.

Parameters

OriginDimensionSpacePointSet $affectedOriginDimensionSpacePoints

Return Value

OriginDimensionSpacePointSet

abstract protected InterDimensionalVariationGraph getInterDimensionalVariationGraph()

No description

abstract protected Events createEventsForVariations(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, NodeAggregate|null $parentNodeAggregateForCoverageFilter)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate
NodeAggregate|null $parentNodeAggregateForCoverageFilter

Return Value

Events

protected Events handleCreateNodeSpecializationVariant(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, NodeAggregate|null $parentNodeAggregateForCoverageFilter)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate
NodeAggregate|null $parentNodeAggregateForCoverageFilter

Return Value

Events

protected array collectNodeSpecializationVariantsThatWillHaveBeenCreated(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $specializationVisibility, array $events)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate
DimensionSpacePointSet $specializationVisibility
array $events

Return Value

array

protected Events handleCreateNodeGeneralizationVariant(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, NodeAggregate|null $parentNodeAggregateForCoverageFilter)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate
NodeAggregate|null $parentNodeAggregateForCoverageFilter

Return Value

Events

protected array collectNodeGeneralizationVariantsThatWillHaveBeenCreated(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $generalizationVisibility, array $events)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate
DimensionSpacePointSet $generalizationVisibility
array $events

Return Value

array

protected Events handleCreateNodePeerVariant(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, NodeAggregate|null $parentNodeAggregateForCoverageFilter)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate
NodeAggregate|null $parentNodeAggregateForCoverageFilter

Return Value

Events

protected array collectNodePeerVariantsThatWillHaveBeenCreated(ContentGraphInterface $contentGraph, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $peerVisibility, array $events)

No description

Parameters

ContentGraphInterface $contentGraph
OriginDimensionSpacePoint $sourceOrigin
OriginDimensionSpacePoint $targetOrigin
NodeAggregate $nodeAggregate
DimensionSpacePointSet $peerVisibility
array $events

Return Value

array

abstract protected PropertyConverter getPropertyConverter()

No description

Return Value

PropertyConverter

protected Events createEventsForMissingTetheredNode(ContentGraphInterface $contentGraph, NodeAggregateId $parentNodeAggregateId, NodeTypeName $parentNodeTypeName, DimensionSpacePointSet $parentNodeAggregateCoverageByOccupant, OriginDimensionSpacePoint $originDimensionSpacePoint, TetheredNodeTypeDefinition $tetheredNodeTypeDefinition, NodeAggregateId|null $tetheredNodeAggregateId)

This is the remediation action for non-existing tethered nodes.

It handles two cases:

  • there is no tethered node IN ANY DimensionSpacePoint -> we can simply create it
  • there is a tethered node already in some DimensionSpacePoint -> we need to specialize/generalize/... the other Tethered Node.

Parameters

ContentGraphInterface $contentGraph
NodeAggregateId $parentNodeAggregateId
NodeTypeName $parentNodeTypeName
DimensionSpacePointSet $parentNodeAggregateCoverageByOccupant
OriginDimensionSpacePoint $originDimensionSpacePoint
TetheredNodeTypeDefinition $tetheredNodeTypeDefinition
NodeAggregateId|null $tetheredNodeAggregateId

Return Value

Events

Exceptions

Exception

protected array createEventsForMissingTetheredNodeAggregate(ContentGraphInterface $contentGraph, TetheredNodeTypeDefinition $tetheredNodeTypeDefinition, OriginDimensionSpacePointSet $affectedOriginDimensionSpacePoints, CoverageByOrigin $coverageByOrigin, NodeAggregateId $parentNodeAggregateId, NodeAggregateId|null $succeedingSiblingNodeAggregateId, NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePaths, NodePath $currentNodePath)

No description

Parameters

ContentGraphInterface $contentGraph
TetheredNodeTypeDefinition $tetheredNodeTypeDefinition
OriginDimensionSpacePointSet $affectedOriginDimensionSpacePoints
CoverageByOrigin $coverageByOrigin
NodeAggregateId $parentNodeAggregateId
NodeAggregateId|null $succeedingSiblingNodeAggregateId
NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePaths
NodePath $currentNodePath

Return Value

array

protected Events createEventsForWronglyTypedNodeAggregate(ContentGraphInterface $contentGraph, NodeAggregate $nodeAggregate, NodeTypeName $newNodeTypeName, NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePaths, NodePath $currentNodePath, NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy|NodeAggregateTypeChangeChildConstraintConflictResolutionMarkWithTagStrategy $conflictResolutionStrategy, NodeAggregateIds $alreadyRemovedNodeAggregateIds)

No description

Parameters

ContentGraphInterface $contentGraph
NodeAggregate $nodeAggregate
NodeTypeName $newNodeTypeName
NodeAggregateIdsByNodePaths $nodeAggregateIdsByNodePaths
NodePath $currentNodePath
NodeAggregateTypeChangeChildConstraintConflictResolutionStrategy|NodeAggregateTypeChangeChildConstraintConflictResolutionMarkWithTagStrategy $conflictResolutionStrategy
NodeAggregateIds $alreadyRemovedNodeAggregateIds

Return Value

Events