Package com.avoka.fc.core.util
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
-
-
Constructor Summary
Constructors Constructor Description SubmissionFormat(String pattern)
Create a new instance based on the given pattern string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
format(Submission submission)
Return the formatted string based on the pattern and the given submission.
-
-
-
Field Detail
-
pattern
protected String pattern
-
-
Constructor Detail
-
SubmissionFormat
public SubmissionFormat(String pattern)
Create a new instance based on the given pattern string.- Parameters:
pattern
- the pattern string
-
-
Method Detail
-
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
-
-