Class MorpheusUtils

java.lang.Object
com.morpheusdata.core.util.MorpheusUtils

public class MorpheusUtils extends Object
  • Constructor Details

    • MorpheusUtils

      public MorpheusUtils()
  • Method Details

    • parseDate

      @Deprecated public static Date parseDate(Object date)
      Deprecated.
      This method is now in DateUtility
      Parameters:
      date - the date to parse as a String or Object
      Returns:
      the parsed Date
    • compareVersions

      public static Integer compareVersions(String a, String b)
      Compares two software version strings in the form of 'x.x.x'
      Parameters:
      a - - Version comparing
      b - - Version comparing to
      Returns:
      - -1 if a < b, 0 if a == b, 1 if a > b
    • getZoneId

      public static Long getZoneId(Map opts)
    • getResourcePoolId

      public static Long getResourcePoolId(Map opts)
    • getSiteId

      public static Long getSiteId(Map opts)
    • getPlanId

      public static Long getPlanId(Map opts)
    • getFieldId

      public static Long getFieldId(Map data, String fieldName)
    • parseBooleanConfig

      public static Boolean parseBooleanConfig(Object val)
      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

      public static Long parseLongConfig(Object val)
      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

      public static Boolean isNumber(Object obj)
    • getJson

      public static Map getJson(Object val)