Class SimpleNodeOverride
java.lang.Object
com.tccc.kos.ext.dispense.pipeline.beverage.graph.SimpleNodeOverride
- All Implemented Interfaces:
NodeOverride
Simple
NodeOvrride
that allows visibility and
availability to be set. Setting specific values will
override accordingly while setting null will allow
default behavior to be used for the associated node.- Since:
- 1.0
- Version:
- 2023-12-06
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleNodeOverride
(String nodeId) Create a newSimpleNodeOverride
that is for the specifiednodeId
in the beverage graph. -
Method Summary
Modifier and TypeMethodDescriptioncomputeAvailable
(GraphNode node) Called when the associated node availability is recomputed.computeVisible
(GraphNode node) Called when the associated node visibility is recomputed.Return the id of the node the override is for.void
onAttachNode
(GraphNode node) Called when the override is attached to a node.void
setAvailability
(Boolean availability) Set the availability override.void
setVisibility
(Boolean visibility) Set the visibility override.
-
Constructor Details
-
SimpleNodeOverride
Create a newSimpleNodeOverride
that is for the specifiednodeId
in the beverage graph.- Parameters:
nodeId
- the id of the node to override
-
-
Method Details
-
getNodeId
Description copied from interface:NodeOverride
Return the id of the node the override is for.- Specified by:
getNodeId
in interfaceNodeOverride
-
onAttachNode
Description copied from interface:NodeOverride
Called when the override is attached to a node. This will be called every time the graph is rebuilt and overrides are re-applied. If there is no matching node this will be called with null.- Specified by:
onAttachNode
in interfaceNodeOverride
-
computeVisible
Description copied from interface:NodeOverride
Called when the associated node visibility is recomputed. Return true to force the node visible or false to force the node not visible. Return null to use standard visibility logic.- Specified by:
computeVisible
in interfaceNodeOverride
-
computeAvailable
Description copied from interface:NodeOverride
Called when the associated node availability is recomputed. Return true to force the node available or false to force the node not available. Return null to use standard availability logic- Specified by:
computeAvailable
in interfaceNodeOverride
-
setVisibility
Set the visibility override. Use null to fall back to default behavior for the node. -
setAvailability
Set the availability override. Use null to fall back to default behavior for the node.
-