Package com.tccc.kos.ext.dispense
Class Holder
java.lang.Object
com.tccc.kos.ext.dispense.Holder
- All Implemented Interfaces:
com.tccc.kos.commons.core.service.handle.HandleAware,com.tccc.kos.commons.util.AttributeAware,com.tccc.kos.commons.util.ClientAttributeAware,com.tccc.kos.core.service.assembly.AssemblyAware,PourAvailability
public class Holder
extends Object
implements com.tccc.kos.core.service.assembly.AssemblyAware, com.tccc.kos.commons.core.service.handle.HandleAware, PourAvailability, com.tccc.kos.commons.util.AttributeAware, com.tccc.kos.commons.util.ClientAttributeAware
Abstraction of how a
ContainerSlice attaches to a pump. In many cases
this is simply a hose that connects a BiB container to a pump, but in more
complex devices this represents a cartridge slot which may have associated
hardware, such as RFID antenna, indicator lights, and so on. This also holds
state about the availability of a pump to pump the connected ingredient.- Since:
- 1.0
- Version:
- 2023-01-16
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tccc.kos.commons.util.ClientAttributeAware
com.tccc.kos.commons.util.ClientAttributeAware.HiddenNested classes/interfaces inherited from interface com.tccc.kos.ext.dispense.PourAvailability
PourAvailability.Type -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a pump to the holder.com.tccc.kos.core.service.assembly.AssemblygetAttribute(Object key) Return the object add to a trouble impact list to block beverage pouring.Returns the container associated with the holder.Return the containerId associated with this holder.com.tccc.kos.commons.core.service.handle.HandleReturn the object add to a trouble impact list to block all pouring.Return the ingredientId associated with this holder.Return theIngredientSourceid the holder is restricted to.Return the ingredient compatibility type that indicates which types of ingredients are compatible with this holder.getNext()Get the optional nextHolderafter this one.getPrev()Get the optional previousHolderbefore this one.getPumps()Returns the pumps associated with the holder.getSlice()Returns the slice of the container that is inserted into the holder.voidNotifies the holder that the linked state has changed, so it should generate a change event fromHolderService.removeAttribute(Object key) voidsetAttribute(Object key, Object value) voidsetIngSourceId(String ingSourceId) Set the ingredient source id the holder is restricted to.setIngType(String ingType) Set the ingredient compatibility type that indicates which types of ingredients are compatible with this holder.voidSet the nextHolderafter this one.voidSet the previousHolderbefore this one.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tccc.kos.core.service.assembly.AssemblyAware
getAssemblyNameMethods inherited from interface com.tccc.kos.commons.util.ClientAttributeAware
getClientAttribute, getClientAttributes, removeClientAttribute, setClientAttribute, setHiddenClientAttributeMethods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPathMethods inherited from interface com.tccc.kos.ext.dispense.PourAvailability
getAvailbilityLock
-
Field Details
-
TOPIC_CHANGE
- See Also:
-
WATER
- See Also:
-
CARB
- See Also:
-
NS
- See Also:
-
NNS
- See Also:
-
MICROS
- See Also:
-
MACROS
- See Also:
-
-
Constructor Details
-
Holder
Creates a holder with the specified name.- Parameters:
assembly- assembly the holder is part ofname- the name of the holder
-
Holder
Creates a holder with the specified name and pump.- Parameters:
assembly- assembly the holder is part ofname- the name of the holderpump- the pump to add to the holder
-
-
Method Details
-
getNext
Get the optional nextHolderafter this one. This is entirely optional but if specified, can be used byInsertionServiceto automatically insert containers with multiple slices. -
setNext
Set the nextHolderafter this one. This is entirely optional but if specified, can be used byInsertionServiceto automatically insert containers with multiple slices.If using
setNext(),setPrev()should also be used. -
getPrev
Get the optional previousHolderbefore this one. This is entirely optional but if specified, can be used byInsertionServiceto automatically insert containers with multiple slices. -
setPrev
Set the previousHolderbefore this one. This is entirely optional but if specified, can be used byInsertionServiceto automatically insert containers with multiple slices.If using
setPrev(),setNext()should also be used. -
getIngSourceId
Return theIngredientSourceid the holder is restricted to. If set, only ingredients from this source can be assigned to this holder. -
setIngSourceId
Set the ingredient source id the holder is restricted to. Only ingredients from this source can be assigned to this holder. This is typically only used to manage multipleIngredientSourceobjects on a device with multiple nozzles that use different ingredients. For more typical compatibility checks within a givenIngredientSource, such as ensuring BiB ingredients are assigned to syrup valves, use theingTypefunctionality which provides matching functionality in the UI sdk.- Parameters:
ingSourceId- id of the source the holder is restricted to
-
notifyChanged
public void notifyChanged()Notifies the holder that the linked state has changed, so it should generate a change event fromHolderService. -
add
Adds a pump to the holder. -
getPumps
Returns the pumps associated with the holder. -
getSlice
Returns the slice of the container that is inserted into the holder. This is null if no container is inserted. If not null, the ingredient cannot be used until the ready flag is true, as there are validation steps that may block a container from being usable, such as expiration date. -
getContainer
Returns the container associated with the holder. This is a convenience method that performs null checks on the slice. -
getIngType
Return the ingredient compatibility type that indicates which types of ingredients are compatible with this holder. If set, only ingredients with the same type may be assigned to this holder. If there is a container inserted and it is intrinsic, this will return"intrinsic"regardless of whatingTypeis set to. -
setIngType
Set the ingredient compatibility type that indicates which types of ingredients are compatible with this holder. If set, only ingredients with the same type may be assigned to this holder. -
getIngredientId
Return the ingredientId associated with this holder. -
getContainerId
Return the containerId associated with this holder. -
setAttribute
- Specified by:
setAttributein interfacecom.tccc.kos.commons.util.AttributeAware
-
getAttribute
- Specified by:
getAttributein interfacecom.tccc.kos.commons.util.AttributeAware
-
removeAttribute
- Specified by:
removeAttributein interfacecom.tccc.kos.commons.util.AttributeAware
-
_getClientAttributeMap
- Specified by:
_getClientAttributeMapin interfacecom.tccc.kos.commons.util.ClientAttributeAware
-
getAssembly
public com.tccc.kos.core.service.assembly.Assembly getAssembly()- Specified by:
getAssemblyin interfacecom.tccc.kos.core.service.assembly.AssemblyAware
-
getHandle
public com.tccc.kos.commons.core.service.handle.Handle getHandle()- Specified by:
getHandlein interfacecom.tccc.kos.commons.core.service.handle.HandleAware
-
getBeverageAvailabilityLock
Description copied from interface:PourAvailabilityReturn the object add to a trouble impact list to block beverage pouring.- Specified by:
getBeverageAvailabilityLockin interfacePourAvailability
-
getIngredientAvailabilityLock
Description copied from interface:PourAvailabilityReturn the object add to a trouble impact list to block all pouring.- Specified by:
getIngredientAvailabilityLockin interfacePourAvailability
-