Package uk.ac.gda.devices.insitu.core
Class _PlateInventory
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
uk.ac.gda.devices.insitu.core.ObservableBase
uk.ac.gda.devices.insitu.core._PlateInventory
- All Implemented Interfaces:
Configurable,Findable,gda.observable.IObservable,Serializable,PlateInventory
@ServiceInterface(PlateInventory.class)
public class _PlateInventory
extends ObservableBase
implements PlateInventory
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintfindPlateIndex(String barcode) Find a PlateType identified by barcode if it existsfindPlateType(String typeId) Find a PlateType identified by typeId if it existsintintgetCount()getPlate(int index) Retrieve the plate specification from the beamline hotel inventoryvoidvoidloadInventory(String configName) voidRe-initialisation of values and states.voidreloadInventoryFromConfig(String configName) voidvoidsaveInventory(String configName) voidsetCapacity(int capacity) Set the maximum number of plates held in the hotel inventoryvoidsetConfigurationName(String configName) voidsetInventory(List<Plate> inventory) Set the list of plates physically (or logically by type) available in the beamline hoteltoString()Methods inherited from class uk.ac.gda.devices.insitu.core.ObservableBase
addIObserver, deleteIObserver, deleteIObserversMethods inherited from class gda.factory.FindableConfigurableBase
getName, setNameMethods inherited from class gda.factory.ConfigurableBase
configure, isConfigureAtStartup, isConfigured, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
configure, isConfigureAtStartup, isConfiguredMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Field Details
-
logger
public static org.slf4j.Logger logger
-
-
Constructor Details
-
_PlateInventory
public _PlateInventory()
-
-
Method Details
-
addPlate
- Specified by:
addPlatein interfacePlateInventory
-
clearInventory
public void clearInventory()- Specified by:
clearInventoryin interfacePlateInventory
-
findPlateIndex
Description copied from interface:PlateInventoryFind a PlateType identified by barcode if it exists- Specified by:
findPlateIndexin interfacePlateInventory- Parameters:
barcode- the bar code for plate to be found- Returns:
- index of plate found, otherwise -1
-
findPlateType
Description copied from interface:PlateInventoryFind a PlateType identified by typeId if it exists- Specified by:
findPlateTypein interfacePlateInventory- Parameters:
typeId- the label for PlateType to be found- Returns:
- PlateType found, otherwise null
-
getCapacity
public int getCapacity()- Specified by:
getCapacityin interfacePlateInventory- Returns:
- Returns the capacity.
-
getCount
public int getCount()- Specified by:
getCountin interfacePlateInventory
-
getInventory
- Specified by:
getInventoryin interfacePlateInventory- Returns:
- Returns the inventory.
-
getPlate
Description copied from interface:PlateInventoryRetrieve the plate specification from the beamline hotel inventory- Specified by:
getPlatein interfacePlateInventory- Parameters:
index- the index of plate in the hotel inventory- Returns:
- plate the plate specification at the index, or null
-
loadInventory
public void loadInventory() throws org.apache.commons.configuration.ConfigurationException, IOException- Specified by:
loadInventoryin interfacePlateInventory- Throws:
org.apache.commons.configuration.ConfigurationExceptionIOException
-
loadInventory
public void loadInventory(String configName) throws org.apache.commons.configuration.ConfigurationException, IOException - Specified by:
loadInventoryin interfacePlateInventory- Throws:
org.apache.commons.configuration.ConfigurationExceptionIOException
-
saveInventory
public void saveInventory() throws org.apache.commons.configuration.ConfigurationException- Specified by:
saveInventoryin interfacePlateInventory- Throws:
org.apache.commons.configuration.ConfigurationException
-
saveInventory
public void saveInventory(String configName) throws org.apache.commons.configuration.ConfigurationException - Specified by:
saveInventoryin interfacePlateInventory- Throws:
org.apache.commons.configuration.ConfigurationException
-
setCapacity
public void setCapacity(int capacity) Description copied from interface:PlateInventorySet the maximum number of plates held in the hotel inventory- Specified by:
setCapacityin interfacePlateInventory- Parameters:
capacity- The capacity to set.
-
setConfigurationName
- Specified by:
setConfigurationNamein interfacePlateInventory
-
setInventory
Description copied from interface:PlateInventorySet the list of plates physically (or logically by type) available in the beamline hotel- Specified by:
setInventoryin interfacePlateInventory- Parameters:
inventory- The inventory to set.
-
setPlate
- Specified by:
setPlatein interfacePlateInventory
-
reconfigure
Description copied from interface:ConfigurableRe-initialisation of values and states.Moved from Reconfigurable which has been deleted
- Specified by:
reconfigurein interfaceConfigurable- Overrides:
reconfigurein classConfigurableBase- Throws:
FactoryException
-
reloadInventoryFromConfig
public void reloadInventoryFromConfig(String configName) throws org.apache.commons.configuration.ConfigurationException, IOException - Throws:
org.apache.commons.configuration.ConfigurationExceptionIOException
-
toString
-