Enum Class HardwareIdentication
- All Implemented Interfaces:
- Serializable,- Comparable<HardwareIdentication>,- Constable
The identification strings such as Operating System "Family:" is followed by a tab ('\t') and then the string. Multiple identification strings are separated with new lines ('\n').
- Author:
- Christopher Mindus
- Nested Class Summary- Nested classes/interfaces inherited from class java.lang.Enum- Enum.EnumDesc<E extends Enum<E>>
- Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionThe MAC addresses for all the network cards.General information about the computer system.The disk(s) serial number.The IPv4 address of the server.The host name(s) without domain (not recommended).The host name with domain (not recommended).The MAC addresses for all the network cards with IPv4 address and a speed set.The MAC addresses for all the network cards with IPv6 address and a speed set.Memory information.General information about the operating system.General information about the operating system with version.Processor identification.The system environment.
- Field SummaryFieldsModifier and TypeFieldDescription- static final StringThe default hardware identification used for new installations.
- Method SummaryModifier and TypeMethodDescription- void- append- (SendTransaction trans, boolean refresh) Appends the hardware information to a transaction.- static HardwareIdentication- from- (int indexValue) Gets the hardware identification from the "index" value.- static final IntArrayListThe default hardware indexed IDs used for new installations.Gets the information for this hardware identification.- getIdentification- (boolean refresh) Gets the information for this hardware identification.- getIdentification- (boolean refresh, String... ipAddresses) Gets the information for this hardware identification.- getIdentification- (String... ipAddresses) Gets the information for this hardware identification.- int- getValue()Gets the value for this identification as an integer.- booleanFlag for long processing with DNS look-up.- booleanReturns if this information might need a refresh because it could change.- voidSets the hardware information to a VS field.- voidSets the hardware information into a VS table.- static HardwareIdenticationReturns the enum constant of this class with the specified name.- static HardwareIdentication[]- values()Returns an array containing the constants of this enum class, in the order they are declared.
- Enum Constant Details- ComputerInfoGeneral information about the computer system. This information should ALWAYS be formatted the same way, e.g.:- Manufacturer: Dell Inc. Model: XPS 8920 Serial: 75GDXJ2 
- ProcessorInfoProcessor identification. This information should ALWAYS be formatted the same way, e.g.:- Information: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz Identifier: Intel64 Family 6 Model 158 Stepping 9 IdentifierID: 158 ProcessorID: BFEBFBFF000906E9 Physical: 4 Logical: 8 
- MemoryInfoMemory information. This information can change during runtime and should not be used as identification, but can serve as a activation code trigger. It is always formatted as:- Total: 17076768768 Swap: 11274289152 
- OperatingSystemGeneral information about the operating system. This information should ALWAYS be formatted the same way, e.g.:- Family: Windows Manufacturer: Microsoft 
- OperatingSystemWithVersionGeneral information about the operating system with version. This information should be formatted the same way, but the version may change during system updates, e.g.:- Family: Windows Manufacturer: Microsoft Version: 10 build 15063 
- AllMacAddressesThe MAC addresses for all the network cards.- This value is often a good value that should NOT be separated with ':', but, beware: it can change in an virtualized environment unless it is fixed. If it is fixed, this value is the most secure value in terms of not changing. - Beware: if this value changes, it could mean that the user is moving server. If this happens very often, it should attract your attention in terms of licensing. - The format of the returned string is comma separated. 
- IPv4MacAddressesThe MAC addresses for all the network cards with IPv4 address and a speed set.- This value is often a good value that should NOT be separated with ':', but, beware: it can change in an virtualized environment unless it is fixed. If it is fixed, this value is the most secure value in terms of not changing. - Beware: if this value changes, it could mean that the user is moving server. If this happens very often, it should attract your attention in terms of licensing. - The format of the returned string is comma separated. 
- IPv6MacAddressesThe MAC addresses for all the network cards with IPv6 address and a speed set.- This value is often a good value that should NOT be separated with ':', but, beware: it can change in an virtualized environment unless it is fixed. If it is fixed, this value is the most secure value in terms of not changing. - Beware: if this value changes, it could mean that the user is moving server. If this happens very often, it should attract your attention in terms of licensing. - The format of the returned string is comma separated. 
- HostNamesWithDomainThe host name with domain (not recommended). The DNS structure may change quite often at companies.- WARNING: this requires a DNS look-up and MAY take time! - The format is an array of comma separated String's as: - name1.domain.com,name2.domain.com 
- HostNamesThe host name(s) without domain (not recommended). The DNS structure may change quite often at companies.- WARNING: this requires a DNS look-up and MAY take time! - The format is an array of comma separated String's as: - name1,name2 
- HostAddressesIPv4The IPv4 address of the server. This is also not recommended. Only network adapters that has a speed (e.g. 1GB) registered are included in the list.- The format is an array of comma separated String's as: - 1.2.3.4,5.6.7.8 
- DiskSerialsThe disk(s) serial number. This value has no particular meaning in a Virtualized environment. The disks listed must have at least one partition that has a mount point (i.e. drive letter for Windows).- An example of an SSD and a hard disk, formatted as an array of comma separated String's as: - BF3A_0E00_030D_0800,Z4Z7KFE2 
- SystemEnvironmentThe system environment. This value SHOULD NEVER be used to test for.- An example for Windows would be: - ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\iiziBuildInstall\windows\appdata CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=CHRIS ComSpec=C:\WINDOWS\system32\cmd.exe FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer FPS_BROWSER_USER_PROFILE_STRING=Default HOME=C:\Users\myuser HOMEDRIVE=C: HOMEPATH=\Users\ LOCALAPPDATA=C:\Users\myuser\AppData\Local LOGONSERVER=\\MYMACHINE NUMBER_OF_PROCESSORS=8 OneDrive=D:\OneDrive-Data\OneDrive ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PUBLIC=C:\Users\Public SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS USERDOMAIN=MYMACHINE USERDOMAIN_ROAMINGPROFILE=MYMACHINE USERNAME=myuser USERPROFILE=C:\Users\myuser windir=C:\WINDOWS 
 
- Field Details- defaultHWIDsThe default hardware identification used for new installations.- The default ones are: - ComputerInfo,
- ProcessorInfo,
- OperatingSystem,
- AllMacAddresses, and
- DiskSerials.
 - It's a comma separated string with the values of each hardware identification. 
 
- Method Details- valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- getValuepublic int getValue()Gets the value for this identification as an integer.- Returns:
- A unique integer for this identification (not the ordinal value).
 
- needsRefreshpublic boolean needsRefresh()Returns if this information might need a refresh because it could change.- Returns:
- true if refresh would matter, false otherwise.
 
- hasDNSLookUppublic boolean hasDNSLookUp()Flag for long processing with DNS look-up.
- getIdentificationGets the information for this hardware identification.- Returns:
- The hardware identification string.
 
- getIdentificationGets the information for this hardware identification.- Parameters:
- refresh- Flag for refresh required.
- Returns:
- The hardware identification string.
 
- getIdentificationGets the information for this hardware identification.- Parameters:
- ipAddresses- IP addresses to look-up.
- Returns:
- The hardware identification string.
 
- getIdentificationGets the information for this hardware identification.- Parameters:
- refresh- Flag for refresh required.
- ipAddresses- IP addresses to look-up.
- Returns:
- The hardware identification string.
 
- appendAppends the hardware information to a transaction.- Parameters:
- trans- The transaction.
- refresh- The refresh flag.
 
- setSets the hardware information to a VS field.- Parameters:
- field- The VS component (VSTable or VSField).
- refresh- The refresh flag.
 
- setSets the hardware information into a VS table. This method is typically used for network adapters or IP addresses. The first column of the table will contain the information. The entire operation is done in a single- VSWorkUnit.- Parameters:
- table- The VS table to set.
- refresh- The refresh flag.
 
- fromGets the hardware identification from the "index" value.- Returns:
- The HardwareIdentification matching.
- Throws:
- NotFoundException- If HardwareIdentification is not found.
 
- getDefaultHWIDIndexesThe default hardware indexed IDs used for new installations.- Returns:
- A clone of the indexes.The default ones are: - ComputerInfo,
- ProcessorInfo,
- OperatingSystem,
- AllMacAddresses, and
- DiskSerials.