org.hardtokenmgmt.admin.model
Class AnalyzeHelper
java.lang.Object
org.hardtokenmgmt.admin.model.AnalyzeHelper
public class AnalyzeHelper
- extends java.lang.Object
Contains help methods used when analyzing the status
of the server.
- Version:
- $Id$
- Author:
- Philip Vendil 22 feb 2009
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnalyzeHelper
public AnalyzeHelper()
getThresholdSetting
public static java.lang.String getThresholdSetting(IStatusAnalyzer statusAnalyser,
boolean globalsetting)
- Method that determines the property name
for the given object in the global.settings, alternatively
administrator settings.
- Parameters:
statusAnalyser - the object to fetch threshold setting forglobalsetting - if the setting should be fetched from the global.properties
or the administrator settings.
- Returns:
- the property key or null if no property key is valid for
given object.
getThresholdAsInt
public static int getThresholdAsInt(IStatusAnalyzer statusAnalyser,
java.lang.String threshold)
calcUsedInPercent
public static int calcUsedInPercent(long totalspace,
long freespace)
isThresholdValueBoolean
public static boolean isThresholdValueBoolean(IStatusAnalyzer statusAnalyser,
java.lang.String thresholdValue)
getHostnames
public static java.lang.String[] getHostnames(OverallStatus overallStatus)
- Parses all the hostnames from a overall status object.
- Parameters:
overallStatus - the overall statuses
- Returns:
- all hostnames extracted from the overall status object.