Class BaseNetChangeEDIOutboundGenerator
java.lang.Object
com.onenetwork.platform.integ.edi.BaseEDIOutboundGenerator
com.onenetwork.platform.integ.edi.BaseNetChangeEDIOutboundGenerator
- All Implemented Interfaces:
ModelOutboundGenerator
,NetChangeOutboundGenerator
public abstract class BaseNetChangeEDIOutboundGenerator extends BaseEDIOutboundGenerator implements NetChangeOutboundGenerator
Base class for Outbound Interfaces which generate EDI for NetChange-based outbound.
This supports only NetChange-based outbound generation.
The subclass needs to provide a no-args constructor which internally provides all params to this
class' constructor, and implement the following methods
BaseEDIOutboundGenerator.derivePartners(ModelOutboundProcessingContext)
- to identify the Partner to be used for EDIOutboundRouting of each transaction set.
getSqlDef(NetChangeOutboundProcessingContext)
- to retrieve the models for which the outbound EDI needs to be generated.
getModelTypeClass()
- to get the class name of the model type being used to generate the outbound-
Field Summary
Fields inherited from class com.onenetwork.platform.integ.edi.BaseEDIOutboundGenerator
ediFormat, ediTransactionSetNo, modelType, outboundQueueRef, TRANSACTION_CHUNK_SIZE
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseNetChangeEDIOutboundGenerator(com.onenetwork.platform.data.model.impl.ModelType modelType, java.lang.String ediTransactionSetNo, java.lang.String ediFormat)
-
Method Summary
Modifier and Type Method Description void
generate(NetChangeOutboundProcessingContext processingContext)
Combines functionality of both {@link #NetChangeOutboundGenerator.generate(com.onenetwork.platform.integ.msg.NetChangeOutboundProcessingContext)} and {@link #BaseEDIOutboundGenerator.generate(ModelOutboundProcessingContext)}protected java.util.List<Model>
getModelsForOutboundProcessing(NetChangeOutboundProcessingContext processingContext, java.util.List<java.lang.Long> sysIdsOfModels)
ModelDataService.readByIds in order to get all the modelsprotected abstract <T extends Model>
java.lang.Class<T>getModelTypeClass()
Method to get the class name of the model type being used to generate the outboundabstract SqlDef
getSqlDef(NetChangeOutboundProcessingContext processingContext)
SqlDef to retrieve the models for which the outbound EDI needs to be generated.protected java.util.List<java.lang.Long>
getSysIdsForOutboundGeneration(NetChangeOutboundProcessingContext processingContext)
Uses the SqlDef to get all the sysIds of the modelsvoid
populateCustomParams(SqlParams sqlParams, PlatformUserContext pltUserContext)
Override this method if you need to use additional SqlParams as part of retrieving the models to generate outbound.Methods inherited from class com.onenetwork.platform.integ.edi.BaseEDIOutboundGenerator
createAndSendEnvelope, derivePartners, generate, generateEDI, getEDIDelimitersFromPartnerConfig, getEDIEnvelopeInfoToBuildEnvelope, getEDIMessagingContext, getInterchangeInfoToBuildEnvelope, getOutboundMapper, partitionTransactionsPerEnvelope, send, send, send
-
Constructor Details
-
BaseNetChangeEDIOutboundGenerator
protected BaseNetChangeEDIOutboundGenerator(com.onenetwork.platform.data.model.impl.ModelType modelType, java.lang.String ediTransactionSetNo, java.lang.String ediFormat)
-
-
Method Details
-
getSqlDef
SqlDef to retrieve the models for which the outbound EDI needs to be generated. NOTE: SqlDef should have queries only to retrieve the sysIds and NOT the entire models. Separate calls to MDS.readById will be done to read the entire model. And Params must include $START_DATE$ and $END_DATE$ along with $VC_ID$- Parameters:
processingContext
-- Returns:
- SqlDef
-
getModelTypeClass
Method to get the class name of the model type being used to generate the outbound- Returns:
- class name of the model
-
generate
Combines functionality of both {@link #NetChangeOutboundGenerator.generate(com.onenetwork.platform.integ.msg.NetChangeOutboundProcessingContext)} and {@link #BaseEDIOutboundGenerator.generate(ModelOutboundProcessingContext)}- Specified by:
generate
in interfaceNetChangeOutboundGenerator
- Parameters:
processingContext
-NetChangeOutboundProcessingContext
context to generate outbound data
-
getModelsForOutboundProcessing
protected java.util.List<Model> getModelsForOutboundProcessing(NetChangeOutboundProcessingContext processingContext, java.util.List<java.lang.Long> sysIdsOfModels) throws java.lang.ExceptionModelDataService.readByIds in order to get all the models- Parameters:
processingContext
-- Returns:
- List
- Throws:
java.lang.Exception
-
getSysIdsForOutboundGeneration
protected java.util.List<java.lang.Long> getSysIdsForOutboundGeneration(NetChangeOutboundProcessingContext processingContext) throws java.lang.ExceptionUses the SqlDef to get all the sysIds of the models- Parameters:
processingContext
-- Returns:
- List
- Throws:
java.lang.Exception
-
populateCustomParams
Override this method if you need to use additional SqlParams as part of retrieving the models to generate outbound.- Parameters:
sqlParams
-pltUserContext
-
-