Class AbstractComputerSystem

  • All Implemented Interfaces:
    java.io.Serializable, ComputerSystem

    public abstract class AbstractComputerSystem
    extends java.lang.Object
    implements ComputerSystem
    Hardware data
    Author:
    SchiTho1 [at] Securiton AG, widdis [at] gmail [dot] com
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractComputerSystem

        protected AbstractComputerSystem()
    • Method Detail

      • getManufacturer

        public java.lang.String getManufacturer()
        Get the computer system manufacturer.
        Specified by:
        getManufacturer in interface ComputerSystem
        Returns:
        The manufacturer.
      • getModel

        public java.lang.String getModel()
        Get the computer system model.
        Specified by:
        getModel in interface ComputerSystem
        Returns:
        The model.
      • getSerialNumber

        public java.lang.String getSerialNumber()
        Get the computer system serial number, if available. Performs a best-effort attempt to retrieve a unique serial number from the computer system. This may originate from the baseboard, BIOS, processor, hardware UUID, etc. This value is provided for information only. Caution should be exercised if using this result to "fingerprint" a system for licensing or other purposes, as the result may change based on program permissions or installation of software packages. Specifically, on Linux and FreeBSD, this requires either root permissions, or installation of the (deprecated) HAL library (lshal command). Linux also attempts to read the dmi/id serial number files in sysfs, which are read-only root by default but may have permissions altered by the user.
        Specified by:
        getSerialNumber in interface ComputerSystem
        Returns:
        the System Serial Number, if available, otherwise returns "unknown"
      • setManufacturer

        protected void setManufacturer​(java.lang.String manufacturer)
        Parameters:
        manufacturer - The manufacturer to set.
      • setModel

        protected void setModel​(java.lang.String model)
        Parameters:
        model - The model to set.
      • setSerialNumber

        protected void setSerialNumber​(java.lang.String serialNumber)
        Parameters:
        serialNumber - The serialNumber to set.
      • setFirmware

        protected void setFirmware​(Firmware firmware)
        Parameters:
        firmware - The firmware to set.
      • setBaseboard

        protected void setBaseboard​(Baseboard baseboard)
        Parameters:
        baseboard - The baseboard to set.