Class SubmissionFormat

java.lang.Object
com.avoka.fc.core.util.SubmissionFormat

public class SubmissionFormat extends Object
Provides a formatter populating submission information into a pattern string. Currently the following pattern elements are supported:
 [day], [month], [year]: replaced with the numerical (unpadded) day, month and year components of the submission time
 [id]: replaced with the submission OID
 [submitKey]: replaced with the submit key
 [receiptNumber]: replaced with the receipt number
 [trackingCode]: replaced with the tracking code
 
Since:
4.1.0
  • Field Details

    • pattern

      protected String pattern
  • Constructor Details

    • SubmissionFormat

      public SubmissionFormat(String pattern)
      Create a new instance based on the given pattern string.
      Parameters:
      pattern - the pattern string
  • Method Details

    • format

      public String format(Submission submission)
      Return the formatted string based on the pattern and the given submission.
      Parameters:
      submission - the submission (required)
      Returns:
      the formatted string