public enum HardwareIdentication extends Enum<HardwareIdentication>
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').
Enum Constant and Description |
---|
AllMacAddresses
The MAC addresses for all the network cards.
|
ComputerInfo
General information about the computer system.
|
DiskSerials
The disk(s) serial number.
|
HostAddressesIPv4
The IPv4 address of the server.
|
HostNames
The host name(s) without domain (not recommended).
|
HostNamesWithDomain
The host name with domain (not recommended).
|
IPv4MacAddresses
The MAC addresses for all the network cards with IPv4 address and a speed set.
|
IPv6MacAddresses
The MAC addresses for all the network cards with IPv6 address and a speed set.
|
MemoryInfo
Memory information.
|
OperatingSystem
General information about the operating system.
|
OperatingSystemWithVersion
General information about the operating system with version.
|
ProcessorInfo
Processor identification.
|
SystemEnvironment
The system environment.
|
Modifier and Type | Field and Description |
---|---|
static String |
defaultHWIDs
The default hardware identification used for new installations.
|
Modifier and Type | Method and Description |
---|---|
void |
append(Transaction trans,
boolean refresh)
Appends the hardware information to a transaction.
|
static HardwareIdentication |
from(int indexValue)
Gets the hardware identification from the "index" value.
|
static IntArrayList |
getDefaultHWIDIndexes()
The default hardware indexed IDs used for new installations.
|
String |
getIdentification()
Gets the information for this hardware identification.
|
String |
getIdentification(boolean refresh)
Gets the information for this hardware identification.
|
String |
getIdentification(boolean refresh,
String... ipAddresses)
Gets the information for this hardware identification.
|
String |
getIdentification(String... ipAddresses)
Gets the information for this hardware identification.
|
int |
getValue()
Gets the value for this identification as an integer.
|
boolean |
hasDNSLookUp()
Flag for long processing with DNS look-up.
|
boolean |
needsRefresh()
Returns if this information might need a refresh because it could change.
|
void |
set(VSField field,
boolean refresh)
Sets the hardware information to a VS field.
|
void |
set(VSTable table,
boolean refresh)
Sets the hardware information into a VS table.
|
static HardwareIdentication |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HardwareIdentication[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HardwareIdentication ComputerInfo
Manufacturer: Dell Inc. Model: XPS 8920 Serial: 75GDXJ2
public static final HardwareIdentication ProcessorInfo
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
public static final HardwareIdentication MemoryInfo
Total: 17076768768 Swap: 11274289152
public static final HardwareIdentication OperatingSystem
Family: Windows Manufacturer: Microsoft
public static final HardwareIdentication OperatingSystemWithVersion
Family: Windows Manufacturer: Microsoft Version: 10 build 15063
public static final HardwareIdentication AllMacAddresses
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.
public static final HardwareIdentication IPv4MacAddresses
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.
public static final HardwareIdentication IPv6MacAddresses
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.
public static final HardwareIdentication HostNamesWithDomain
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
public static final HardwareIdentication HostNames
WARNING: this requires a DNS look-up and MAY take time!
The format is an array of comma separated String's as:
name1,name2
public static final HardwareIdentication HostAddressesIPv4
The format is an array of comma separated String's as:
1.2.3.4,5.6.7.8
public static final HardwareIdentication DiskSerials
An example of an SSD and a hard disk, formatted as an array of comma separated String's as:
BF3A_0E00_030D_0800,Z4Z7KFE2
public static final HardwareIdentication SystemEnvironment
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
public static final String defaultHWIDs
The default ones are:
It's a comma separated string with the values of each hardware identification.
public static HardwareIdentication[] values()
for (HardwareIdentication c : HardwareIdentication.values()) System.out.println(c);
public static HardwareIdentication valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getValue()
public boolean needsRefresh()
public boolean hasDNSLookUp()
public String getIdentification()
public String getIdentification(boolean refresh)
refresh
- Flag for refresh required.public String getIdentification(String... ipAddresses)
ipAddresses
- IP addresses to look-up.public String getIdentification(boolean refresh, String... ipAddresses)
refresh
- Flag for refresh required.ipAddresses
- IP addresses to look-up.public void append(Transaction trans, boolean refresh)
trans
- The transaction.refresh
- The refresh flag.public void set(VSField field, boolean refresh)
field
- The VS component (VSTable or VSField).refresh
- The refresh flag.public void set(VSTable table, boolean refresh)
VSWorkUnit
.table
- The VS table to set.refresh
- The refresh flag.public static HardwareIdentication from(int indexValue)
NotFoundException
- If HardwareIdentification is not found.public static final IntArrayList getDefaultHWIDIndexes()
The default ones are:
iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.