Package com.morpheusdata.core.util
Class MorpheusUtils
java.lang.Object
com.morpheusdata.core.util.MorpheusUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Integer
compareVersions
(String a, String b) Compares two software version strings in the form of 'x.x.x'static Long
getFieldId
(Map data, String fieldName) static Map
static Long
static Long
getResourcePoolId
(Map opts) static Long
static Long
static Boolean
static Boolean
parseBooleanConfig
(Object val) This utility method is used to compare an object to various forms of boolean truth.static Date
Deprecated.static Long
parseLongConfig
(Object val) This is a convenience utility method to get a long value from form inputs.
-
Constructor Details
-
MorpheusUtils
public MorpheusUtils()
-
-
Method Details
-
parseDate
Deprecated.This method is now inDateUtility
- Parameters:
date
- the date to parse as a String or Object- Returns:
- the parsed Date
-
compareVersions
Compares two software version strings in the form of 'x.x.x'- Parameters:
a
- - Version comparingb
- - Version comparing to- Returns:
- - -1 if a < b, 0 if a == b, 1 if a > b
-
getZoneId
-
getResourcePoolId
-
getSiteId
-
getPlanId
-
getFieldId
-
parseBooleanConfig
This utility method is used to compare an object to various forms of boolean truth. Values usually come from submitted web forms and have different values for boolean truth- Parameters:
val
-- Returns:
-
parseLongConfig
This is a convenience utility method to get a long value from form inputs. It checks for null and verifies the value is a number before parsing into a Long- Parameters:
val
- assumed long value from input- Returns:
- the value converted to a Long
-
isNumber
-
getJson
-