Class AbstractExecutorIntegrationModule
- java.lang.Object
-
- be.business.connector.common.module.AbstractIntegrationModule
-
- be.business.connector.recipe.executor.AbstractExecutorIntegrationModule
-
- Direct Known Subclasses:
AbstractExecutorIntegrationModuleV4
public abstract class AbstractExecutorIntegrationModule extends AbstractIntegrationModule
The Class AbstractExecutorIntegrationModule.
-
-
Field Summary
-
Fields inherited from class be.business.connector.common.module.AbstractIntegrationModule
dataUnsealer, EHEALTH_SUCCESS_CODE_100, EHEALTH_SUCCESS_CODE_200, EHEALTH_SUCCESS_CODE_300, EHEALTH_SUCCESS_CODE_400, EHEALTH_SUCCESS_CODE_500
-
-
Constructor Summary
Constructors Constructor Description AbstractExecutorIntegrationModule()Instantiates a new abstract executor integration module.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckResponseStatus(be.fgov.ehealth.commons.protocol.v2.StatusResponseType statusType)voidcheckStatus(be.fgov.ehealth.commons.protocol.v1.ResponseType responseType)Check status.voidcheckStatus(ResponseType responseType)Check status.protected GetPrescriptionForExecutorResultcreateGetPrescriptionForExecutorResult(GetPrescriptionForExecutorResultSealed getPrescriptionForExecutorResultSealed)Creates the get prescription for executor result.protected be.fgov.ehealth.commons.core.v1.IdentifierTypecreateIdentifierType(String id, String type)Creates the identifier type.protected List<ListNotificationsItem>createListNotificationItems(byte[] sealedExecutorResponse)Creates the list notification items.protected KmehrHelpergetKmehrHelper()Gets the kmehr helper.static Map<String,GetPrescriptionForExecutorResult>getPrescriptionCache()Gets the prescription cache.protected byte[]getSealedCreateFeedbackParam(byte[] feedbackText, be.fgov.ehealth.etee.crypto.encrypt.EncryptionToken etkRecipient, String rid, String prescriberId, String mandateHolderId, MandateHolderType mandateHolderType)Gets the sealed create feedback param.byte[]getSealedData(GetPrescriptionStatusParam getPrescriptionStatusParam)Gets the sealed data.byte[]getSealedGetPrescriptionForExecutorParam(String rid)Gets the sealed get prescription for executor param.protected byte[]getSealedGetPrescriptionForExecutorParam(String rid, String patientId, String madateHolderId, MandateHolderType mandateHolderType, boolean alreadyDelivered)Gets the sealed get prescription for executor param.byte[]getSealedListNotificationsParam(boolean readFlag, String mandateHoldeId, MandateHolderType mandateHolderType)Gets the sealed list notifications param.byte[]getSealedMarkAsArchivedParam(String rid, String mandateHolderId, MandateHolderType mandateHolderType)Gets the sealed mark as archived param.byte[]getSealedMarkAsDeliveredParam(String rid, String mandateHolderId, MandateHolderType mandateHolderType)Gets the sealed mark as delivered param.byte[]getSealedMarkAsUnDeliveredParam(String rid, String mandateHolderId, MandateHolderType mandateHolderType)Gets the sealed data.protected byte[]getSealedRevokePrescriptionParam(String rid, String reason, String mandateHolderId, MandateHolderType mandateHolderType)Gets the sealed revoke prescription param.protected CalendarreadLastDateToDisk()Read last date to disk.protected <T> byte[]sealForRecipe(T data, Class<T> type)Seal for recipe.protected voidwriteLastDateToDisk(ListReservationsParam listReservationsParam, Calendar lastSyncDate)Write last date to disk.protected voidwriteReservationsOnDisk(ListReservationsParam listReservationsParam, ListReservationsResult listReservationsResult, Calendar lastSyncDate)Write reservations on disk.-
Methods inherited from class be.business.connector.common.module.AbstractIntegrationModule
buildDefaultPage, extractExpirationDateFromKmehr, extractReferenceSourceVersionFromKmehr, getArchivedFilePath, getArchivedPrescription, getCurrentXMLGregorianCalendar, getEncryptionUtils, getEtkHelper, getId, getJaxContextCentralizer, getKeyFromKgss, getKeyFromKgss, getOldDataSealer, getOldDataUnsealer, getPropertyHandler, getSymmKey, init, initEncryption, sealRequest, setDataUnsealer, setOldDataSealer, setOldDataUnsealer, unsealForUnknown, unsealNotif, unsealNotiffeed, unsealNotifOld, unsealPrescriptionForUnknown, unsealRequest, unsealWithSymKey, unsealWithSymKey
-
-
-
-
Constructor Detail
-
AbstractExecutorIntegrationModule
public AbstractExecutorIntegrationModule()
Instantiates a new abstract executor integration module.- Throws:
IntegrationModuleException- the integration module exception
-
-
Method Detail
-
getPrescriptionCache
public static Map<String,GetPrescriptionForExecutorResult> getPrescriptionCache()
Gets the prescription cache.- Returns:
- the prescription cache
-
getKmehrHelper
protected KmehrHelper getKmehrHelper()
Gets the kmehr helper.- Returns:
- the kmehr helper
-
getSealedRevokePrescriptionParam
protected byte[] getSealedRevokePrescriptionParam(String rid, String reason, String mandateHolderId, MandateHolderType mandateHolderType)
Gets the sealed revoke prescription param.- Parameters:
rid- the ridreason- the reasonmandateHolderId- the mandateHolderIdmandateHolderType- the mandateHolderType- Returns:
- the sealed revoke prescription param
- Throws:
IntegrationModuleException- the integration module exception
-
getSealedMarkAsArchivedParam
public byte[] getSealedMarkAsArchivedParam(String rid, String mandateHolderId, MandateHolderType mandateHolderType)
Gets the sealed mark as archived param.- Parameters:
rid- the ridmandateHolderId- the mandateHolderIdmandateHolderType- the mandateHolderType- Returns:
- the sealed mark as archived param
- Throws:
IntegrationModuleException- the integration module exception
-
getSealedMarkAsDeliveredParam
public byte[] getSealedMarkAsDeliveredParam(String rid, String mandateHolderId, MandateHolderType mandateHolderType)
Gets the sealed mark as delivered param.- Parameters:
rid- the ridmandateHolderId- the mandateHolderIdmandateHolderType- the mandateHolderType- Returns:
- the sealed mark as delivered param
- Throws:
IntegrationModuleException- the integration module exception
-
getSealedMarkAsUnDeliveredParam
public byte[] getSealedMarkAsUnDeliveredParam(String rid, String mandateHolderId, MandateHolderType mandateHolderType)
Gets the sealed data.- Parameters:
rid- the ridmandateHolderId- the mandateHolderIdmandateHolderType- the mandateHolderType- Returns:
- the sealed mark as undelivered param
- Throws:
IntegrationModuleException- the integration module exception
-
getSealedGetPrescriptionForExecutorParam
public byte[] getSealedGetPrescriptionForExecutorParam(String rid)
Gets the sealed get prescription for executor param.- Parameters:
rid- the rid- Returns:
- the sealed get prescription for executor param
- Throws:
IntegrationModuleException- the integration module exception
-
getSealedGetPrescriptionForExecutorParam
protected byte[] getSealedGetPrescriptionForExecutorParam(String rid, String patientId, String madateHolderId, MandateHolderType mandateHolderType, boolean alreadyDelivered)
Gets the sealed get prescription for executor param.- Parameters:
rid- the ridpatientId- the patient id- Returns:
- the sealed get prescription for executor param
- Throws:
IntegrationModuleException- the integration module exception
-
getSealedCreateFeedbackParam
protected byte[] getSealedCreateFeedbackParam(byte[] feedbackText, be.fgov.ehealth.etee.crypto.encrypt.EncryptionToken etkRecipient, String rid, String prescriberId, String mandateHolderId, MandateHolderType mandateHolderType) throws ExceptionGets the sealed create feedback param.- Parameters:
feedbackText- the feedback textetkRecipient- the etk recipientrid- the ridprescriberId- the prescriber id- Returns:
- the sealed create feedback param
- Throws:
Exception- the exception
-
getSealedListNotificationsParam
public byte[] getSealedListNotificationsParam(boolean readFlag, String mandateHoldeId, MandateHolderType mandateHolderType)Gets the sealed list notifications param.- Parameters:
readFlag- the read flag- Returns:
- the sealed list notifications param
- Throws:
IntegrationModuleException- the integration module exception
-
getSealedData
public byte[] getSealedData(GetPrescriptionStatusParam getPrescriptionStatusParam)
Gets the sealed data.- Parameters:
getPrescriptionStatusParam- the get prescription status param- Returns:
- the sealed data
- Throws:
IntegrationModuleException- the integration module exception
-
sealForRecipe
protected <T> byte[] sealForRecipe(T data, Class<T> type)Seal for recipe.- Type Parameters:
T- the generic type- Parameters:
data- the datatype- the type- Returns:
- the byte[]
- Throws:
IntegrationModuleException- the integration module exception
-
createGetPrescriptionForExecutorResult
protected GetPrescriptionForExecutorResult createGetPrescriptionForExecutorResult(GetPrescriptionForExecutorResultSealed getPrescriptionForExecutorResultSealed)
Creates the get prescription for executor result.- Parameters:
getPrescriptionForExecutorResultSealed- the sealed executor response- Returns:
- the gets the prescription for executor result
- Throws:
IntegrationModuleException- the integration module exception
-
createListNotificationItems
protected List<ListNotificationsItem> createListNotificationItems(byte[] sealedExecutorResponse)
Creates the list notification items.- Parameters:
sealedExecutorResponse- the sealed executor response- Returns:
- the list
- Throws:
IntegrationModuleException- the integration module exception
-
checkStatus
public void checkStatus(be.fgov.ehealth.commons.protocol.v1.ResponseType responseType)
Check status.- Parameters:
responseType- the response- Throws:
IntegrationModuleException- the integration module exception
-
checkResponseStatus
protected void checkResponseStatus(be.fgov.ehealth.commons.protocol.v2.StatusResponseType statusType)
-
checkStatus
public void checkStatus(ResponseType responseType)
Check status.- Parameters:
responseType- the response- Throws:
IntegrationModuleException- the integration module exception
-
createIdentifierType
protected be.fgov.ehealth.commons.core.v1.IdentifierType createIdentifierType(String id, String type)
Creates the identifier type.- Parameters:
id- the idtype- the type- Returns:
- the identifier type
-
writeReservationsOnDisk
protected void writeReservationsOnDisk(ListReservationsParam listReservationsParam, ListReservationsResult listReservationsResult, Calendar lastSyncDate)
Write reservations on disk.- Parameters:
listReservationsParam- the datalistReservationsResult- the unsealed resultlastSyncDate- the last sync date- Throws:
IntegrationModuleException- the integration module exception
-
writeLastDateToDisk
protected void writeLastDateToDisk(ListReservationsParam listReservationsParam, Calendar lastSyncDate)
Write last date to disk.- Parameters:
listReservationsParam- the datalastSyncDate- the last sync date- Throws:
IntegrationModuleException- the integration module exception
-
readLastDateToDisk
protected Calendar readLastDateToDisk()
Read last date to disk.- Returns:
- the calendar
- Throws:
IntegrationModuleException- the integration module exception
-
-