Extension Point: System Information
Basics
Parameter | Value |
---|---|
Extension Point Key | SYSTEM_INFORMATION |
Extension Point Name | System Information |
Extension Interface | SystemInformation |
Supports Multiple Extensions? | Yes |
Selector Type | None |
Available Since | 1.0.0 |
Use Cases
Extensions implementing this Extension Point can return information about the running system for visibility by business users in the Commerce Manager "about" dialog.
Methods
getName
The getName
method is invoked whenever the Commerce Manager "about" dialog is opened. The result will be displayed as the name/key of the value being returned.
getSimpleValue
The getSimpleValue
method is invoked whenever the Commerce Manager "about" dialog is opened. The result will be displayed as the system information value.
Extension Sample
@Extension
@XPFAssignment(extensionPoint = XPFExtensionPointEnum.SYSTEM_INFORMATION, priority = 100)
public class UptimeInfoImpl extends XPFExtensionPointImpl implements SystemInformation {
private static final int MICROSECONDS_PER_SECOND = 1000;
private static final int SECONDS_PER_MINUTE = 60;
@Override
public String getName() {
return "Uptime (Minutes)";
}
@Override
public String getSimpleValue() {
RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean();
return String.valueOf(runtimeMXBean.getUptime() / MICROSECONDS_PER_SECOND / SECONDS_PER_MINUTE);
}
}