Class Ecfv5XmlHelper

java.lang.Object
edu.suffolk.litlab.efspserver.services.Ecfv5XmlHelper

public class Ecfv5XmlHelper extends Object
  • Constructor Details

    • Ecfv5XmlHelper

      public Ecfv5XmlHelper()
  • Method Details

    • objectToXmlStrOrError

      public static <T> String objectToXmlStrOrError(T toXml, Class<T> toXmlClazz)
    • objectToXmlStr

      public static <T> String objectToXmlStr(T toXml, Class<T> toXmlClazz) throws jakarta.xml.bind.JAXBException
      Throws:
      jakarta.xml.bind.JAXBException
    • convertProxyDate

      public static DateTime convertProxyDate(LocalDateTime date)
    • convertDate

      public static DateType convertDate(LocalDate date)
    • convertDateTime

      public static DateType convertDateTime(Instant inst, int fracSecondPrecision)
      Always returns datetimes that are UTC and with no milliseconds.
    • amountToString

      public static String amountToString(AmountType amt)
    • convertCourtReserveDate

      public static DateType convertCourtReserveDate(OffsetDateTime date, int fracSecondPrecision)
      Tyler requires that you "[respond] back with the same time stamp that the response provides to you" This is difficult given that we send that timestamp to DA and get it back, as a timestamp object that represents the same time, but might not be formatted the exact same.

      We make an assumption here that all DA timestamps given to us from the Court look like: "2022-03-25T15:00:00.0Z"

      Parameters:
      date - The timestamp that we are trying to select, might be of arbitrary sub-second precision
      fracSecondPrecision - : only takes 0, 1, 2, 3, uses that many decimal places in the seconds
      Returns:
      a DateType that has _only_ the tenths decimal place, so it serializes like "2022-03-25T15:00:00.0Z"
    • convertBool

      public static Boolean convertBool(boolean value)
    • convertCourtType

      public static CourtType convertCourtType(String courtId)
    • convertId

      public static IdentificationType convertId(String idStr)
    • convertId

      public static IdentificationType convertId(String idStr, String category)
    • convertString

      public static String convertString(String str)
    • convertText

      public static TextType convertText(String str)
    • convertNormalized

      public static NormalizedString convertNormalized(String str)