Class Ecf4Helper
java.lang.Object
edu.suffolk.litlab.efsp.truefiling.Ecf4Helper
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringOne of the ways that you can communicate over ECF. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringamountToString(AmountType amt) static StringamountToString(AmountType amt) static Optional<Ecf4Helper.Error> checkError(ErrorType error) Returns the error type on errors from the ECF side of the API.static List<Ecf4Helper.Error> checkErrors(List<ErrorType> errors) static Base64BinaryconvertBase64(byte[] rawContent) static BooleanconvertBool(boolean bool) Niem's Boolean type: either true or false.static CourtTypeconvertCourtType(String courtId) static DateTypeconvertDate(LocalDate date) Creates a date from a java date.static DecimalconvertDecimal(int val) Convert an int to a BigDecimal to an XML Decimalstatic DecimalconvertDecimal(BigDecimal deci) static IDTypeconvertEcfId(String idStr) static IdentificationTypestatic IdentificationTypestatic InstructionIDTypeconvertInstructionId(String idStr) static PaidDateTypeconvertPaidDate(LocalDate date) Creates a date from a java date.static DateconvertSimpleDate(LocalDate date) static StringconvertString(String str) Converts a Java string to NIEM's XML String.static TextTypeconvertText(String str) Converts a Java string to NIEM "Text", a wrapper around the NIEM String.static AnyURIconvertUri(String uri) Converts a Java string to a URI.getNonEmptyText(TextType text) static <T> voidobjectToXmlFile(T toXml, Class<T> toXmlClazz, File outfile) Converts any XML annotated object (from CXF) to a file.static <T> StringobjectToXmlStr(T toXml, Class<T> toXmlClazz) Converts any XML annotated object (from CXF) to a string.static <T> StringobjectToXmlStrOrError(T toXml, Class<T> toXmlClazz) Converts any XML annotated object (from CXF) to a string.static LocalDatestatic <T extends QueryMessageType>
Tstatic voidsetupReplys(CaseFilingType reply, String locationId) static longstatic CountryCodeTypestrToCountryCode(String country) Turn a given string into a country type.
-
Field Details
-
MDE_PROFILE_CODE
One of the ways that you can communicate over ECF. For more information, see https://docs.oasis-open.org/legalxml-courtfiling/specs/ecf/v4.01/ecf-v4.01-spec/errata02/os/ecf-v4.01-spec-errata02-os-complete.html#_Toc425241629- See Also:
-
-
Constructor Details
-
Ecf4Helper
public Ecf4Helper()
-
-
Method Details
-
convertDate
Creates a date from a java date. Doesn't have time associated with it. -
convertPaidDate
Creates a date from a java date. Doesn't have time associated with it. -
convertSimpleDate
-
parseDate
-
convertBool
Niem's Boolean type: either true or false. -
getNonEmptyText
-
convertText
Converts a Java string to NIEM "Text", a wrapper around the NIEM String."A data type for a character string"
-
convertString
Converts a Java string to NIEM's XML String. "A datatype for character strings in XML." Practically, just a xsd:string with the extra SimpleObjectAttributeGroup attributes. -
sizeMeasureAsBytes
- Parameters:
type- will always be in bytes, but this is for backup.
-
convertId
-
convertEcfId
-
convertInstructionId
-
convertId
-
convertDecimal
-
convertDecimal
Convert an int to a BigDecimal to an XML DecimalWeird conversion, but the multiplier on optional services is a Decimal for some reason? "I need 2.3 copies of this sent to my office", lmao.
- Parameters:
val-- Returns:
-
convertUri
Converts a Java string to a URI. -
convertBase64
-
convertCourtType
-
amountToString
-
amountToString
-
objectToXmlStrOrError
Converts any XML annotated object (from CXF) to a string. Useful for debugging. Doesn't throw, but does return the string of the exception instead.- Type Parameters:
T- the type of object being passed in- Parameters:
toXml- The object to do things with- Returns:
- the XML string to do what you want with
-
objectToXmlStr
public static <T> String objectToXmlStr(T toXml, Class<T> toXmlClazz) throws jakarta.xml.bind.JAXBException Converts any XML annotated object (from CXF) to a string. Useful for testing. Will throw an exception if there's a JAXB error.- Type Parameters:
T- the type of object being passed in- Parameters:
toXml- The object to do things with- Returns:
- the XML string to do what you want with
- Throws:
jakarta.xml.bind.JAXBException
-
objectToXmlFile
public static <T> void objectToXmlFile(T toXml, Class<T> toXmlClazz, File outfile) throws jakarta.xml.bind.JAXBException Converts any XML annotated object (from CXF) to a file. Useful for testing larger XML objects that are unwieldly to print. Will throw an exception if there's a JAXB error.- Type Parameters:
T- the type of object being passed in- Parameters:
toXml- The object to do things with- Throws:
jakarta.xml.bind.JAXBException
-
strToCountryCode
Turn a given string into a country type. -
prep
-
checkError
Returns the error type on errors from the ECF side of the API. They work the same as the Tyler ones. -
checkErrors
-
setupReplys
-