Class MultiSpeak

java.lang.Object
com.ecec.rweber.multispeak.MultiSpeak

public final class MultiSpeak extends Object
High level class with some static members and functions for navigating Multispeak calls
Author:
rweber
  • Field Details

    • SOAP_NAMESPACE

      public static final Namespace SOAP_NAMESPACE
  • Constructor Details

    • MultiSpeak

      public MultiSpeak()
  • Method Details

    • printXML

      public static String printXML(Element xml)
      This is a helper function for debugging purposes to print results
      Parameters:
      xml - the xml element to print
      Returns:
      the xml element as a string
    • fromMultispeakDate

      public static DateTime fromMultispeakDate(String d)
      helper method to convert returned xml datetime values to something more useable
      Parameters:
      d - the datetime string as an ISO date (returned by Multispeak calls)
      Returns:
      the parsed string as a DateTime object
    • toMultispeakDate

      public static String toMultispeakDate(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour)
      helper method to convert a given date to a useable ISO date for xml calls
      Parameters:
      year - the year, ex 2020
      monthOfYear - month of the year, 1-12
      dayOfMonth - day of the month 1-X
      hourOfDay - hour of the day 1-24
      minuteOfHour - minute of the hour 1-59
      Returns:
      the date as an ISO date string (suitable for Multispeak)
    • findExensionItem

      public static String findExensionItem(Element ext, String extName)
      Exensions to the Multispeak spec are passed in as <exensionItem> values within a list. This helper function takes the list and finds a given <extName> node within the list and returns the value
      Parameters:
      ext - the element containing the list of extensionItem nodes
      extName - the name of node to get the value from
      Returns:
      the extValue from the given node, null if it doesn't exist