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 newSimpleNodeOverridethat is for the specifiednodeIdin 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.voidonAttachNode(GraphNode node) Called when the override is attached to a node.voidsetAvailability(Boolean availability) Set the availability override.voidsetVisibility(Boolean visibility) Set the visibility override.
-
Constructor Details
-
SimpleNodeOverride
Create a newSimpleNodeOverridethat is for the specifiednodeIdin the beverage graph.- Parameters:
nodeId- the id of the node to override
-
-
Method Details
-
getNodeId
Description copied from interface:NodeOverrideReturn the id of the node the override is for.- Specified by:
getNodeIdin interfaceNodeOverride
-
onAttachNode
Description copied from interface:NodeOverrideCalled 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:
onAttachNodein interfaceNodeOverride
-
computeVisible
Description copied from interface:NodeOverrideCalled 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:
computeVisiblein interfaceNodeOverride
-
computeAvailable
Description copied from interface:NodeOverrideCalled 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:
computeAvailablein 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.
-