trait ConstraintChecks (View source)

internal  implementation details of command handlers
 

Methods

NodeTypeManager
getNodeTypeManager()

No description

DimensionSpacePointSet
getAllowedDimensionSubspace()

No description

void
requireContentStreamToExist(ContentStreamId $contentStreamId, ContentRepository $contentRepository)

No description

void
requireDimensionSpacePointToExist(DimensionSpacePoint $dimensionSpacePoint)

No description

NodeType
requireNodeType(NodeTypeName $nodeTypeName)

No description

void
requireNodeTypeToNotBeAbstract(NodeType $nodeType)

No description

void
requireNodeTypeToBeOfTypeRoot(NodeType $nodeType)

No description

void
requireNodeTypeToNotBeOfTypeRoot(NodeType $nodeType)

No description

void
requireTetheredDescendantNodeTypesToExist(NodeType $nodeType)

No description

void
requireTetheredDescendantNodeTypesToNotBeOfTypeRoot(NodeType $nodeType)

No description

void
requireNodeTypeToDeclareProperty(NodeTypeName $nodeTypeName, PropertyName $propertyName)

No description

void
requireNodeTypeToDeclareReference(NodeTypeName $nodeTypeName, ReferenceName $propertyName)

No description

void
requireNodeTypeToAllowNodesOfTypeInReference(NodeTypeName $nodeTypeName, ReferenceName $referenceName, NodeTypeName $nodeTypeNameInQuestion)

No description

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.

void
requireNodeTypeConstraintsImposedByParentToBeMet(NodeType $parentsNodeType, NodeName|null $nodeName, NodeType $nodeType)

No description

bool
areNodeTypeConstraintsImposedByParentValid(NodeType $parentsNodeType, NodeName|null $nodeName, NodeType $nodeType)

No description

void
requireNodeTypeConstraintsImposedByGrandparentToBeMet(NodeType $grandParentsNodeType, NodeName|null $parentNodeName, NodeType $nodeType)

No description

bool
areNodeTypeConstraintsImposedByGrandparentValid(NodeType $grandParentsNodeType, NodeName|null $parentNodeName, NodeType $nodeType)

No description

NodeAggregate
requireProjectedNodeAggregate(ContentStreamId $contentStreamId, NodeAggregateId $nodeAggregateId, ContentRepository $contentRepository)

No description

void
requireProjectedNodeAggregateToNotExist(ContentStreamId $contentStreamId, NodeAggregateId $nodeAggregateId, ContentRepository $contentRepository)

No description

NodeAggregate
requireProjectedParentNodeAggregate(ContentStreamId $contentStreamId, NodeAggregateId $childNodeAggregateId, OriginDimensionSpacePoint $childOriginDimensionSpacePoint, ContentRepository $contentRepository)

No description

void
requireNodeAggregateToCoverDimensionSpacePoint(NodeAggregate $nodeAggregate, DimensionSpacePoint $dimensionSpacePoint)

No description

void
requireNodeAggregateToCoverDimensionSpacePoints(NodeAggregate $nodeAggregate, DimensionSpacePointSet $dimensionSpacePointSet)

No description

void
requireNodeAggregateToNotBeRoot(NodeAggregate $nodeAggregate)

No description

void
requireNodeAggregateToBeUntethered(NodeAggregate $nodeAggregate)

No description

void
requireNodeAggregateToNotBeDescendant(ContentStreamId $contentStreamId, NodeAggregate $nodeAggregate, NodeAggregate $referenceNodeAggregate, ContentRepository $contentRepository)

No description

void
requireNodeNameToBeUnoccupied(ContentStreamId $contentStreamId, NodeName|null $nodeName, NodeAggregateId $parentNodeAggregateId, OriginDimensionSpacePoint $parentOriginDimensionSpacePoint, DimensionSpacePointSet $dimensionSpacePoints, ContentRepository $contentRepository)

No description

void
requireNodeNameToBeUncovered(ContentStreamId $contentStreamId, NodeName|null $nodeName, NodeAggregateId $parentNodeAggregateId, DimensionSpacePointSet $dimensionSpacePointsToBeCovered, ContentRepository $contentRepository)

No description

void
requireNodeAggregateToOccupyDimensionSpacePoint(NodeAggregate $nodeAggregate, OriginDimensionSpacePoint $originDimensionSpacePoint)

No description

void
requireNodeAggregateToNotOccupyDimensionSpacePoint(NodeAggregate $nodeAggregate, OriginDimensionSpacePoint $originDimensionSpacePoint)

No description

void
requireNodeAggregateToDisableDimensionSpacePoint(NodeAggregate $nodeAggregate, DimensionSpacePoint $dimensionSpacePoint)

No description

void
requireNodeAggregateToNotDisableDimensionSpacePoint(NodeAggregate $nodeAggregate, DimensionSpacePoint $dimensionSpacePoint)

No description

void
validateReferenceProperties(ReferenceName $referenceName, PropertyValuesToWrite $referenceProperties, NodeTypeName $nodeTypeName)

No description

Details

abstract protected NodeTypeManager getNodeTypeManager()

No description

Return Value

NodeTypeManager

abstract protected DimensionSpacePointSet getAllowedDimensionSubspace()

No description

Return Value

DimensionSpacePointSet

protected void requireContentStreamToExist(ContentStreamId $contentStreamId, ContentRepository $contentRepository)

No description

Parameters

ContentStreamId $contentStreamId
ContentRepository $contentRepository

Return Value

void

Exceptions

ContentStreamDoesNotExistYet

protected void requireDimensionSpacePointToExist(DimensionSpacePoint $dimensionSpacePoint)

No description

Parameters

DimensionSpacePoint $dimensionSpacePoint

Return Value

void

Exceptions

DimensionSpacePointNotFound

protected NodeType requireNodeType(NodeTypeName $nodeTypeName)

No description

Parameters

NodeTypeName $nodeTypeName

Return Value

NodeType

Exceptions

NodeTypeNotFound

protected void requireNodeTypeToNotBeAbstract(NodeType $nodeType)

No description

Parameters

NodeType $nodeType

Return Value

void

protected void requireNodeTypeToBeOfTypeRoot(NodeType $nodeType)

No description

Parameters

NodeType $nodeType

Return Value

void

Exceptions

NodeTypeIsNotOfTypeRoot

protected void requireNodeTypeToNotBeOfTypeRoot(NodeType $nodeType)

No description

Parameters

NodeType $nodeType

Return Value

void

Exceptions

NodeTypeIsOfTypeRoot

protected void requireTetheredDescendantNodeTypesToExist(NodeType $nodeType)

No description

Parameters

NodeType $nodeType

Return Value

void

Exceptions

NodeTypeNotFoundException

protected void requireTetheredDescendantNodeTypesToNotBeOfTypeRoot(NodeType $nodeType)

No description

Parameters

NodeType $nodeType

Return Value

void

Exceptions

NodeTypeIsOfTypeRoot

protected void requireNodeTypeToDeclareProperty(NodeTypeName $nodeTypeName, PropertyName $propertyName)

No description

Parameters

NodeTypeName $nodeTypeName
PropertyName $propertyName

Return Value

void

protected void requireNodeTypeToDeclareReference(NodeTypeName $nodeTypeName, ReferenceName $propertyName)

No description

Parameters

NodeTypeName $nodeTypeName
ReferenceName $propertyName

Return Value

void

protected void requireNodeTypeToAllowNodesOfTypeInReference(NodeTypeName $nodeTypeName, ReferenceName $referenceName, NodeTypeName $nodeTypeNameInQuestion)

No description

Parameters

NodeTypeName $nodeTypeName
ReferenceName $referenceName
NodeTypeName $nodeTypeNameInQuestion

Return Value

void

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.

Parameters

ContentStreamId $contentStreamId
NodeType $nodeType
NodeName|null $nodeName
array $parentNodeAggregateIds
ContentRepository $contentRepository

Return Value

void

Exceptions

NodeConstraintException

protected void requireNodeTypeConstraintsImposedByParentToBeMet(NodeType $parentsNodeType, NodeName|null $nodeName, NodeType $nodeType)

No description

Parameters

NodeType $parentsNodeType
NodeName|null $nodeName
NodeType $nodeType

Return Value

void

Exceptions

NodeTypeNotFoundException
NodeConstraintException

protected bool areNodeTypeConstraintsImposedByParentValid(NodeType $parentsNodeType, NodeName|null $nodeName, NodeType $nodeType)

No description

Parameters

NodeType $parentsNodeType
NodeName|null $nodeName
NodeType $nodeType

Return Value

bool

protected void requireNodeTypeConstraintsImposedByGrandparentToBeMet(NodeType $grandParentsNodeType, NodeName|null $parentNodeName, NodeType $nodeType)

No description

Parameters

NodeType $grandParentsNodeType
NodeName|null $parentNodeName
NodeType $nodeType

Return Value

void

Exceptions

NodeConstraintException

protected bool areNodeTypeConstraintsImposedByGrandparentValid(NodeType $grandParentsNodeType, NodeName|null $parentNodeName, NodeType $nodeType)

No description

Parameters

NodeType $grandParentsNodeType
NodeName|null $parentNodeName
NodeType $nodeType

Return Value

bool

protected NodeAggregate requireProjectedNodeAggregate(ContentStreamId $contentStreamId, NodeAggregateId $nodeAggregateId, ContentRepository $contentRepository)

No description

Parameters

ContentStreamId $contentStreamId
NodeAggregateId $nodeAggregateId
ContentRepository $contentRepository

Return Value

NodeAggregate

Exceptions

NodeAggregatesTypeIsAmbiguous
NodeAggregateCurrentlyDoesNotExist

protected void requireProjectedNodeAggregateToNotExist(ContentStreamId $contentStreamId, NodeAggregateId $nodeAggregateId, ContentRepository $contentRepository)

No description

Parameters

ContentStreamId $contentStreamId
NodeAggregateId $nodeAggregateId
ContentRepository $contentRepository

Return Value

void

Exceptions

NodeAggregatesTypeIsAmbiguous
NodeAggregateCurrentlyExists

NodeAggregate requireProjectedParentNodeAggregate(ContentStreamId $contentStreamId, NodeAggregateId $childNodeAggregateId, OriginDimensionSpacePoint $childOriginDimensionSpacePoint, ContentRepository $contentRepository)

No description

Parameters

ContentStreamId $contentStreamId
NodeAggregateId $childNodeAggregateId
OriginDimensionSpacePoint $childOriginDimensionSpacePoint
ContentRepository $contentRepository

Return Value

NodeAggregate

Exceptions

NodeAggregateCurrentlyDoesNotExist

protected void requireNodeAggregateToCoverDimensionSpacePoint(NodeAggregate $nodeAggregate, DimensionSpacePoint $dimensionSpacePoint)

No description

Parameters

NodeAggregate $nodeAggregate
DimensionSpacePoint $dimensionSpacePoint

Return Value

void

Exceptions

NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint

protected void requireNodeAggregateToCoverDimensionSpacePoints(NodeAggregate $nodeAggregate, DimensionSpacePointSet $dimensionSpacePointSet)

No description

Parameters

NodeAggregate $nodeAggregate
DimensionSpacePointSet $dimensionSpacePointSet

Return Value

void

Exceptions

NodeAggregateDoesCurrentlyNotCoverDimensionSpacePointSet

protected void requireNodeAggregateToNotBeRoot(NodeAggregate $nodeAggregate)

No description

Parameters

NodeAggregate $nodeAggregate

Return Value

void

Exceptions

NodeAggregateIsRoot

protected void requireNodeAggregateToBeUntethered(NodeAggregate $nodeAggregate)

No description

Parameters

NodeAggregate $nodeAggregate

Return Value

void

Exceptions

NodeAggregateIsTethered

protected void requireNodeAggregateToNotBeDescendant(ContentStreamId $contentStreamId, NodeAggregate $nodeAggregate, NodeAggregate $referenceNodeAggregate, ContentRepository $contentRepository)

No description

Parameters

ContentStreamId $contentStreamId
NodeAggregate $nodeAggregate
NodeAggregate $referenceNodeAggregate
ContentRepository $contentRepository

Return Value

void

Exceptions

NodeAggregateIsDescendant

protected void requireNodeNameToBeUnoccupied(ContentStreamId $contentStreamId, NodeName|null $nodeName, NodeAggregateId $parentNodeAggregateId, OriginDimensionSpacePoint $parentOriginDimensionSpacePoint, DimensionSpacePointSet $dimensionSpacePoints, ContentRepository $contentRepository)

No description

Parameters

ContentStreamId $contentStreamId
NodeName|null $nodeName
NodeAggregateId $parentNodeAggregateId
OriginDimensionSpacePoint $parentOriginDimensionSpacePoint
DimensionSpacePointSet $dimensionSpacePoints
ContentRepository $contentRepository

Return Value

void

Exceptions

NodeNameIsAlreadyOccupied

protected void requireNodeNameToBeUncovered(ContentStreamId $contentStreamId, NodeName|null $nodeName, NodeAggregateId $parentNodeAggregateId, DimensionSpacePointSet $dimensionSpacePointsToBeCovered, ContentRepository $contentRepository)

No description

Parameters

ContentStreamId $contentStreamId
NodeName|null $nodeName
NodeAggregateId $parentNodeAggregateId
DimensionSpacePointSet $dimensionSpacePointsToBeCovered
ContentRepository $contentRepository

Return Value

void

Exceptions

NodeNameIsAlreadyCovered

protected void requireNodeAggregateToOccupyDimensionSpacePoint(NodeAggregate $nodeAggregate, OriginDimensionSpacePoint $originDimensionSpacePoint)

No description

Parameters

NodeAggregate $nodeAggregate
OriginDimensionSpacePoint $originDimensionSpacePoint

Return Value

void

Exceptions

DimensionSpacePointIsNotYetOccupied

protected void requireNodeAggregateToNotOccupyDimensionSpacePoint(NodeAggregate $nodeAggregate, OriginDimensionSpacePoint $originDimensionSpacePoint)

No description

Parameters

NodeAggregate $nodeAggregate
OriginDimensionSpacePoint $originDimensionSpacePoint

Return Value

void

Exceptions

DimensionSpacePointIsAlreadyOccupied

protected void requireNodeAggregateToDisableDimensionSpacePoint(NodeAggregate $nodeAggregate, DimensionSpacePoint $dimensionSpacePoint)

No description

Parameters

NodeAggregate $nodeAggregate
DimensionSpacePoint $dimensionSpacePoint

Return Value

void

Exceptions

NodeAggregateCurrentlyDoesNotDisableDimensionSpacePoint

protected void requireNodeAggregateToNotDisableDimensionSpacePoint(NodeAggregate $nodeAggregate, DimensionSpacePoint $dimensionSpacePoint)

No description

Parameters

NodeAggregate $nodeAggregate
DimensionSpacePoint $dimensionSpacePoint

Return Value

void

Exceptions

NodeAggregateCurrentlyDisablesDimensionSpacePoint

protected void validateReferenceProperties(ReferenceName $referenceName, PropertyValuesToWrite $referenceProperties, NodeTypeName $nodeTypeName)

No description

Parameters

ReferenceName $referenceName
PropertyValuesToWrite $referenceProperties
NodeTypeName $nodeTypeName

Return Value

void