Class _PlateInventory

All Implemented Interfaces:
Configurable, Findable, gda.observable.IObservable, Serializable, PlateInventory

@ServiceInterface(PlateInventory.class) public class _PlateInventory extends ObservableBase implements PlateInventory
See Also:
  • Field Details

    • logger

      public static org.slf4j.Logger logger
  • Constructor Details

    • _PlateInventory

      public _PlateInventory()
  • Method Details

    • addPlate

      public Plate addPlate(Plate plate)
      Specified by:
      addPlate in interface PlateInventory
    • clearInventory

      public void clearInventory()
      Specified by:
      clearInventory in interface PlateInventory
    • findPlateIndex

      public int findPlateIndex(String barcode)
      Description copied from interface: PlateInventory
      Find a PlateType identified by barcode if it exists
      Specified by:
      findPlateIndex in interface PlateInventory
      Parameters:
      barcode - the bar code for plate to be found
      Returns:
      index of plate found, otherwise -1
    • findPlateType

      public PlateType findPlateType(String typeId)
      Description copied from interface: PlateInventory
      Find a PlateType identified by typeId if it exists
      Specified by:
      findPlateType in interface PlateInventory
      Parameters:
      typeId - the label for PlateType to be found
      Returns:
      PlateType found, otherwise null
    • getCapacity

      public int getCapacity()
      Specified by:
      getCapacity in interface PlateInventory
      Returns:
      Returns the capacity.
    • getCount

      public int getCount()
      Specified by:
      getCount in interface PlateInventory
    • getInventory

      public List<Plate> getInventory()
      Specified by:
      getInventory in interface PlateInventory
      Returns:
      Returns the inventory.
    • getPlate

      public Plate getPlate(int index)
      Description copied from interface: PlateInventory
      Retrieve the plate specification from the beamline hotel inventory
      Specified by:
      getPlate in interface PlateInventory
      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:
      loadInventory in interface PlateInventory
      Throws:
      org.apache.commons.configuration.ConfigurationException
      IOException
    • loadInventory

      public void loadInventory(String configName) throws org.apache.commons.configuration.ConfigurationException, IOException
      Specified by:
      loadInventory in interface PlateInventory
      Throws:
      org.apache.commons.configuration.ConfigurationException
      IOException
    • saveInventory

      public void saveInventory() throws org.apache.commons.configuration.ConfigurationException
      Specified by:
      saveInventory in interface PlateInventory
      Throws:
      org.apache.commons.configuration.ConfigurationException
    • saveInventory

      public void saveInventory(String configName) throws org.apache.commons.configuration.ConfigurationException
      Specified by:
      saveInventory in interface PlateInventory
      Throws:
      org.apache.commons.configuration.ConfigurationException
    • setCapacity

      public void setCapacity(int capacity)
      Description copied from interface: PlateInventory
      Set the maximum number of plates held in the hotel inventory
      Specified by:
      setCapacity in interface PlateInventory
      Parameters:
      capacity - The capacity to set.
    • setConfigurationName

      public void setConfigurationName(String configName)
      Specified by:
      setConfigurationName in interface PlateInventory
    • setInventory

      public void setInventory(List<Plate> inventory)
      Description copied from interface: PlateInventory
      Set the list of plates physically (or logically by type) available in the beamline hotel
      Specified by:
      setInventory in interface PlateInventory
      Parameters:
      inventory - The inventory to set.
    • setPlate

      public Plate setPlate(Plate plate, int index)
      Specified by:
      setPlate in interface PlateInventory
    • reconfigure

      public void reconfigure() throws FactoryException
      Description copied from interface: Configurable
      Re-initialisation of values and states.

      Moved from Reconfigurable which has been deleted

      Specified by:
      reconfigure in interface Configurable
      Overrides:
      reconfigure in class ConfigurableBase
      Throws:
      FactoryException
    • reloadInventoryFromConfig

      public void reloadInventoryFromConfig(String configName) throws org.apache.commons.configuration.ConfigurationException, IOException
      Throws:
      org.apache.commons.configuration.ConfigurationException
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object