public class SLAUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPLYTO_CALENDAR |
static java.lang.String |
APPLYTO_ORG |
static java.lang.String |
APPLYTO_SHIFT |
static java.lang.String |
CALC_CALENDAR |
static java.lang.String |
CALC_ORG |
static java.lang.String |
CALC_SHIFT |
static java.lang.String |
FIELDNAME_UOM |
static java.lang.String |
FIELDNAME_VALUE |
static java.lang.String |
MAXVARS_SINGLESLA |
static java.lang.String |
MAXVARS_USERANGING |
static java.lang.String |
OWNERID |
static java.lang.String |
OWNERTABLE |
static java.lang.String |
SLARECORDS_CONTACTDATE |
static java.lang.String |
SLARECORDS_RESOLUTIONDATE |
static java.lang.String |
SLARECORDS_RESPONSEDATE |
Constructor and Description |
---|
SLAUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
buildExcludingWhere(java.lang.String keyField,
java.lang.String checkField,
MboSetRemote set)
Build a where clause the exclude the mbos that are already in the mboset
|
static int |
compareCommitment(MboRemote commitment1,
MboRemote commitment2,
Translate translate)
compare 2 commitment based on their stringent, returns:
1: if commitment1 is more stringent than commitment2 -1: if commitment1 is less stringent than commitment2 0: if the 2 commitments are of the same stringenncy This version only support response, resolution and contact types so only time compare is performed. |
static java.lang.String |
getContractStatusToExclude(Mbo mbo)
This returns a list of contract status that are synonym to CAN or CLOSE.
|
static java.lang.String |
getContractStatusToInclude(Mbo mbo)
This returns a list of contract status that are synonym to APPR.
|
static java.lang.String |
getInPhrase(java.lang.String fieldName,
java.lang.String in)
Create the SQL in phrase in the where clause.
|
static java.lang.String |
getSLARecordsTargetFieldName(MboRemote commitment,
Translate translate)
Helper method to get the SLARECORDS target field name for a commitmment
|
static java.lang.String |
getSuperType(Mbo mbo)
Get the super type of a mbo
|
static java.lang.String |
getTargetFieldName(java.lang.String targetMboType,
MboRemote commitment,
Translate translate)
Helper function to get the target field name for a commitmment
|
static java.lang.String |
getUniqueKeyFieldName(Mbo mbo)
Returns the unique key field name for the given mbo
|
static java.lang.String |
getUniqueKeyFieldName(MboSetInfo mboSetInfo)
Returns the unique key field name given the mbo set info.
|
static boolean |
isNull(java.lang.String str)
Is a string null or empty
|
static boolean |
mboEq(MboRemote mbo1,
MboRemote mbo2)
Helper function that test if 2 mbo objects are equal to each other
By equal it means they of of the same object type and key values are the same.
|
static boolean |
singleSLA(Mbo mbo)
Read maxvars to decide if singlesla is to apply
|
static void |
throwValidationException(MboValue mboValue)
Throws the generic validation exception
|
static boolean |
useRanking(Mbo mbo)
Read maxvars to decide if useranking is to apply
|
public static final java.lang.String MAXVARS_SINGLESLA
public static final java.lang.String MAXVARS_USERANGING
public static final java.lang.String SLARECORDS_RESPONSEDATE
public static final java.lang.String SLARECORDS_RESOLUTIONDATE
public static final java.lang.String SLARECORDS_CONTACTDATE
public static final java.lang.String APPLYTO_ORG
public static final java.lang.String APPLYTO_CALENDAR
public static final java.lang.String APPLYTO_SHIFT
public static final java.lang.String CALC_ORG
public static final java.lang.String CALC_CALENDAR
public static final java.lang.String CALC_SHIFT
public static final java.lang.String OWNERTABLE
public static final java.lang.String OWNERID
public static final java.lang.String FIELDNAME_VALUE
public static final java.lang.String FIELDNAME_UOM
public static java.lang.String getUniqueKeyFieldName(Mbo mbo)
public static java.lang.String getUniqueKeyFieldName(MboSetInfo mboSetInfo)
public static java.lang.String getSuperType(Mbo mbo)
public static boolean singleSLA(Mbo mbo) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public static boolean useRanking(Mbo mbo) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public static java.lang.String buildExcludingWhere(java.lang.String keyField, java.lang.String checkField, MboSetRemote set) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public static boolean mboEq(MboRemote mbo1, MboRemote mbo2) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public static boolean isNull(java.lang.String str)
public static java.lang.String getContractStatusToExclude(Mbo mbo) throws MXException
MXException
public static java.lang.String getContractStatusToInclude(Mbo mbo) throws MXException
MXException
public static void throwValidationException(MboValue mboValue) throws MXException
mboValue
- MXException
public static java.lang.String getInPhrase(java.lang.String fieldName, java.lang.String in)
fieldName
- in
- public static int compareCommitment(MboRemote commitment1, MboRemote commitment2, Translate translate) throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public static java.lang.String getTargetFieldName(java.lang.String targetMboType, MboRemote commitment, Translate translate) throws java.rmi.RemoteException, MXException
targetMboType
- commitment
- java.rmi.RemoteException
MXException
public static java.lang.String getSLARecordsTargetFieldName(MboRemote commitment, Translate translate) throws java.rmi.RemoteException, MXException
targetMboType
- commitment
- java.rmi.RemoteException
MXException