public class KPIUtil
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
KPIUtil.Status
Used to track the status of a KPI.
|
static class |
KPIUtil.Trend
Used to track the trend for a KPI.
|
| Constructor and Description |
|---|
KPIUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Date |
calendarEndDate(java.lang.String range,
java.util.Date startDate,
java.util.Date endDate)
Adds a number of days, months, years etc based on range of the KPIHistory Sets
|
static java.lang.String |
formatDouble(double dNumber,
java.util.Locale userLocale)
Returns a number to diaply formatted for grouping, and decimal seperator If Number trails with .00, returns the
mantissa part only
|
static KPIUtil.Status |
getKPIStatus(double kpivalue,
double cautionmin,
double cautionmax) |
static long |
getKPIUniqueId(java.lang.String kpiName,
UserInfo ui)
Returns long unqiue id for a KPI based on its KPI name
|
static java.util.Date |
makeDateFromDBDate(java.util.Date d)
Returns a gregorian calendar date Sets
|
static java.lang.String |
replaceSingleQuotes(java.lang.String oldString)
Replaces single quotes with two single quotes.
|
static java.lang.String |
replaceString(java.lang.String str,
java.lang.String pattern,
java.lang.String replacement)
Deprecated.
use
String#replace(String, String) |
static void |
validateCustomRange(java.util.Date startDate,
java.util.Date endDate,
java.lang.String customRange)
Validates that their is suffient period of time in between a given start date and end date
|
public static java.lang.String formatDouble(double dNumber,
java.util.Locale userLocale)
dNumber - Number to format as a doublepublic static java.util.Date calendarEndDate(java.lang.String range,
java.util.Date startDate,
java.util.Date endDate)
range - public static java.util.Date makeDateFromDBDate(java.util.Date d)
d - public static void validateCustomRange(java.util.Date startDate,
java.util.Date endDate,
java.lang.String customRange)
throws MXException,
java.rmi.RemoteException
startDate - endDate - customRange - MXExceptionjava.rmi.RemoteExceptionpublic static long getKPIUniqueId(java.lang.String kpiName,
UserInfo ui)
throws MXException,
java.rmi.RemoteException
kpiName - Name if the KPIMXExceptionjava.rmi.RemoteExceptionpublic static java.lang.String replaceSingleQuotes(java.lang.String oldString)
public static java.lang.String replaceString(java.lang.String str,
java.lang.String pattern,
java.lang.String replacement)
String#replace(String, String)str - String to searchpattern - string to replacereplacement - string to replace patter withpublic static KPIUtil.Status getKPIStatus(double kpivalue, double cautionmin, double cautionmax)