NodeAggregateCommandHandler
final class NodeAggregateCommandHandler implements CommandHandlerInterface (View source)
internal | from userland, you'll use ContentRepository::handle to dispatch commands |
Traits
Properties
protected | $propertyConverter |
Methods
No description
No description
No description
No description
No description
No description
No description
No description
NodeType and NodeName must belong together to the same node, which is the to-be-checked one.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
This is the remediation action for non-existing tethered nodes.
No description
No description
No description
No description
No description
No description
No description
No description
Use this closure to run code with the Ancestor Node Type Checks disabled; e.g.
No description
Details
protected NodeTypeManager
getNodeTypeManager()
No description
protected DimensionSpacePointSet
getAllowedDimensionSubspace()
No description
protected void
requireContentStreamToExist(ContentStreamId $contentStreamId, ContentRepository $contentRepository)
No description
protected void
requireDimensionSpacePointToExist(DimensionSpacePoint $dimensionSpacePoint)
No description
protected NodeType
requireNodeType(NodeTypeName $nodeTypeName)
No description
protected void
requireNodeTypeToNotBeAbstract(NodeType $nodeType)
No description
protected void
requireNodeTypeToBeOfTypeRoot(NodeType $nodeType)
No description
protected void
requireNodeTypeToNotBeOfTypeRoot(NodeType $nodeType)
No description
protected void
requireTetheredDescendantNodeTypesToExist(NodeType $nodeType)
No description
protected void
requireTetheredDescendantNodeTypesToNotBeOfTypeRoot(NodeType $nodeType)
No description
protected void
requireNodeTypeToDeclareProperty(NodeTypeName $nodeTypeName, PropertyName $propertyName)
No description
protected void
requireNodeTypeToDeclareReference(NodeTypeName $nodeTypeName, ReferenceName $propertyName)
No description
protected void
requireNodeTypeToAllowNodesOfTypeInReference(NodeTypeName $nodeTypeName, ReferenceName $referenceName, NodeTypeName $nodeTypeNameInQuestion)
No description
protected void
requireConstraintsImposedByAncestorsAreMet(ContentStreamId $contentStreamId, NodeType $nodeType, NodeName|null $nodeName, array $parentNodeAggregateIds, ContentRepository $contentRepository)
NodeType and NodeName must belong together to the same node, which is the to-be-checked one.
protected void
requireNodeTypeConstraintsImposedByParentToBeMet(NodeType $parentsNodeType, NodeName|null $nodeName, NodeType $nodeType)
No description
protected bool
areNodeTypeConstraintsImposedByParentValid(NodeType $parentsNodeType, NodeName|null $nodeName, NodeType $nodeType)
No description
protected void
requireNodeTypeConstraintsImposedByGrandparentToBeMet(NodeType $grandParentsNodeType, NodeName|null $parentNodeName, NodeType $nodeType)
No description
protected bool
areNodeTypeConstraintsImposedByGrandparentValid(NodeType $grandParentsNodeType, NodeName|null $parentNodeName, NodeType $nodeType)
No description
protected NodeAggregate
requireProjectedNodeAggregate(ContentStreamId $contentStreamId, NodeAggregateId $nodeAggregateId, ContentRepository $contentRepository)
No description
protected void
requireProjectedNodeAggregateToNotExist(ContentStreamId $contentStreamId, NodeAggregateId $nodeAggregateId, ContentRepository $contentRepository)
No description
NodeAggregate
requireProjectedParentNodeAggregate(ContentStreamId $contentStreamId, NodeAggregateId $childNodeAggregateId, OriginDimensionSpacePoint $childOriginDimensionSpacePoint, ContentRepository $contentRepository)
No description
protected void
requireNodeAggregateToCoverDimensionSpacePoint(NodeAggregate $nodeAggregate, DimensionSpacePoint $dimensionSpacePoint)
No description
protected void
requireNodeAggregateToCoverDimensionSpacePoints(NodeAggregate $nodeAggregate, DimensionSpacePointSet $dimensionSpacePointSet)
No description
protected void
requireNodeAggregateToNotBeRoot(NodeAggregate $nodeAggregate)
No description
protected void
requireNodeAggregateToBeUntethered(NodeAggregate $nodeAggregate)
No description
protected void
requireNodeAggregateToNotBeDescendant(ContentStreamId $contentStreamId, NodeAggregate $nodeAggregate, NodeAggregate $referenceNodeAggregate, ContentRepository $contentRepository)
No description
protected void
requireNodeNameToBeUnoccupied(ContentStreamId $contentStreamId, NodeName|null $nodeName, NodeAggregateId $parentNodeAggregateId, OriginDimensionSpacePoint $parentOriginDimensionSpacePoint, DimensionSpacePointSet $dimensionSpacePoints, ContentRepository $contentRepository)
No description
protected void
requireNodeNameToBeUncovered(ContentStreamId $contentStreamId, NodeName|null $nodeName, NodeAggregateId $parentNodeAggregateId, DimensionSpacePointSet $dimensionSpacePointsToBeCovered, ContentRepository $contentRepository)
No description
protected void
requireNodeAggregateToOccupyDimensionSpacePoint(NodeAggregate $nodeAggregate, OriginDimensionSpacePoint $originDimensionSpacePoint)
No description
protected void
requireNodeAggregateToNotOccupyDimensionSpacePoint(NodeAggregate $nodeAggregate, OriginDimensionSpacePoint $originDimensionSpacePoint)
No description
protected void
requireNodeAggregateToDisableDimensionSpacePoint(NodeAggregate $nodeAggregate, DimensionSpacePoint $dimensionSpacePoint)
No description
protected void
requireNodeAggregateToNotDisableDimensionSpacePoint(NodeAggregate $nodeAggregate, DimensionSpacePoint $dimensionSpacePoint)
No description
protected void
validateReferenceProperties(ReferenceName $referenceName, PropertyValuesToWrite $referenceProperties, NodeTypeName $nodeTypeName)
No description
protected InterDimensionalVariationGraph
getInterDimensionalVariationGraph()
No description
protected bool
areAncestorNodeTypeConstraintChecksEnabled()
No description
PropertyConverter
getPropertyConverter()
No description
abstract static protected NodeAggregateIdsByNodePaths
populateNodeAggregateIds(NodeType $nodeType, NodeAggregateIdsByNodePaths $nodeAggregateIds, NodePath $childPath = null)
No description
EventsToPublish
handleEnableNodeAggregate(EnableNodeAggregate $command, ContentRepository $contentRepository)
No description
protected void
requireNodeAggregateNotToBeTethered(NodeAggregate $nodeAggregate)
No description
protected Events
createEventsForMissingTetheredNode(NodeAggregate $parentNodeAggregate, Node $parentNode, NodeName $tetheredNodeName, NodeAggregateId|null $tetheredNodeAggregateId, NodeType $expectedTetheredNodeType, ContentRepository $contentRepository)
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.
protected Events
createEventsForVariations(ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, ContentRepository $contentRepository)
No description
protected Events
handleCreateNodeSpecializationVariant(ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, ContentRepository $contentRepository)
No description
protected array
collectNodeSpecializationVariantsThatWillHaveBeenCreated(ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $specializationVisibility, array $events, ContentRepository $contentRepository)
No description
protected Events
handleCreateNodeGeneralizationVariant(ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, ContentRepository $contentRepository)
No description
protected array
collectNodeGeneralizationVariantsThatWillHaveBeenCreated(ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $generalizationVisibility, array $events, ContentRepository $contentRepository)
No description
protected Events
handleCreateNodePeerVariant(ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, ContentRepository $contentRepository)
No description
protected array
collectNodePeerVariantsThatWillHaveBeenCreated(ContentStreamId $contentStreamId, OriginDimensionSpacePoint $sourceOrigin, OriginDimensionSpacePoint $targetOrigin, NodeAggregate $nodeAggregate, DimensionSpacePointSet $peerVisibility, array $events, ContentRepository $contentRepository)
No description
__construct(NodeTypeManager $nodeTypeManager, ContentDimensionZookeeper $contentDimensionZookeeper, InterDimensionalVariationGraph $interDimensionalVariationGraph, PropertyConverter $propertyConverter)
No description
bool
canHandle(CommandInterface $command)
No description
EventsToPublish
handle(CommandInterface $command, ContentRepository $contentRepository)
No description
void
withoutAncestorNodeTypeConstraintChecks(Closure $callback)
Use this closure to run code with the Ancestor Node Type Checks disabled; e.g.
during imports.
You can disable this because many old sites have this constraint violated more or less; and it's easy to fix later on; as it does not touch the fundamental integrity of the CR.
protected void
checkConstraintsImposedByAncestors(ChangeNodeAggregateType $command, ContentRepository $contentRepository)
No description