Package com.morpheusdata.core.util
Class MorpheusUtils
java.lang.Object
com.morpheusdata.core.util.MorpheusUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegercompareVersions(String a, String b) Compares two software version strings in the form of 'x.x.x'static LonggetFieldId(Map data, String fieldName) static Mapstatic Longstatic LonggetResourcePoolId(Map opts) static Longstatic Longstatic Booleanstatic BooleanparseBooleanConfig(Object val) This utility method is used to compare an object to various forms of boolean truth.static DateDeprecated.static LongparseLongConfig(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
-