Package com.persequor.extension.epc
Interface IEpcExpander
public interface IEpcExpander
Extension of this type will be invoked when searching by EPCs which can come in different formats.
Example: 010987654321888921XYZ123
could expand to:
(01)09876543218889(21)XYZ123
and urn:epc:id:sgtin:987654.0321888.XYZ123
Since these extensions are invoked on every query, they must be very fast - ideally they do not make any database lookups, API calls, or other IO heavy work since this would dramatically slow down querying in Saga. If the expansion does rely on data in a database, consider caching it in memory such that only few queries will be slow, and the overall performance is maintained.
The number of times an expander is invoked depends on the EpcExpanderMode
- so this method should
be deterministic, also considering that other expanders may produce new EPCs to consider.
-
Method Summary
-
Method Details
-
expandEpc
Invoked on an EPC to be searched for, must return all the new EPCs which can be derived from theinputEpc
- Parameters:
inputEpc
- an EPC to be expanded- Returns:
- any alternative formats of the EPCs in the input list, null will be treated as empty list.
-