Class AmazonKMSSubmissionDataStorageService
- java.lang.Object
-
- com.avoka.fc.core.service.BaseService
-
- com.avoka.fc.core.service.CayenneService
-
- com.avoka.fc.core.service.storage.AmazonKMSSubmissionDataStorageService
-
- All Implemented Interfaces:
IServiceDefinitionAware
,ISubmissionDataStorageService
@Deprecated public class AmazonKMSSubmissionDataStorageService extends CayenneService implements ISubmissionDataStorageService, IServiceDefinitionAware
Deprecated.Provides an AWS KMS Database Submission Data Storage Service class. This class will use a KMS provided data key to encrypt submission data with using AES-256 CBC cypher.- Since:
- 4.3.0
-
-
Constructor Summary
Constructors Constructor Description AmazonKMSSubmissionDataStorageService()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected byte[]
compressData(byte[] data)
Deprecated.Compress the given data using ZLIP compression.protected byte[]
decodeData(Submission submission, byte[] data, String encoding)
Deprecated.Decode the data for the given submission with the encoding type.protected byte[]
decompressData(byte[] data)
Deprecated.Decompress the given data using ZLIP.String
decryptText(Submission submission, String cypherText)
Deprecated.Decrypt a submission related string that was created using encryptTextboolean
deleteAttachmentData(FileUpload fileUpload)
Deprecated.Delete attachment data.boolean
deleteSubmissionData(Submission submission)
Deprecated.Delete the transaction data associated with this submission, if not already deleted.protected byte[]
encodeData(Submission submission, byte[] data, String encoding)
Deprecated.Encode the data for the given submission with the encoding type.String
encryptText(Submission submission, String plainText)
Deprecated.Encrypt a string related to a submission.byte[]
getAttachment(FileUpload fileUpload)
Deprecated.Gets the attachment file data.String
getAttachmentsEncoding()
Deprecated.Gets the attachments encoding.protected byte[]
getKeystoreData(Submission submission)
Deprecated.Return the keystore data for the submission.String
getKmsKeyId()
Deprecated.Return the AWS KMS Master Key Id.String
getKmsMasterKeyId()
Deprecated.String
getReceiptPdfEncoding()
Deprecated.Gets the receipt pdf encoding.ServiceDefinition
getServiceDefinition()
Deprecated.Return the service definition for the service.protected ServiceDefinition
getServiceDefintionForThreadDataContext(ServiceDefinition serviceDefinition)
Deprecated.Return a ServiceDefinition instance for the current Thread DataContext.byte[]
getSignatureReceipt(Submission submission)
Deprecated.Gets the signature receipt data.byte[]
getSubmissionHistoryXml(SubmissionHistory history)
Deprecated.Gets the submission history xml data.String
getSubmissionHistoryXmlEncoding()
Deprecated.Gets the submission history xml encoding.byte[]
getSubmissionReceipt(Submission submission)
Deprecated.Gets the submission receipt data.byte[]
getSubmissionXml(Submission submission)
Deprecated.Gets the submission xml data.String
getSubmissionXmlEncoding()
Deprecated.Gets the submission xml encoding.boolean
hasExternalizeStorage()
Deprecated.Return true if the submission data storage service uses external storage (non TM database) of submission data.boolean
initializeCryptoDataKey(Submission submission)
Deprecated.Returns false as we don't want to change behaviour of this class.protected <T extends BaseEntity>
TrefetchEntity(T entity)
Deprecated.Refetch the given entity if associted with a different data context.void
setAttachmentsEncoding(String storageEncoding)
Deprecated.Sets the attachments encoding.void
setKmsKeyId(String kmsMasterKeyId)
Deprecated.Set the AWS KMS Master Key Id.void
setKmsMasterKeyId(String kmsMasterKeyId)
Deprecated.Set the KMS Master Key ID.void
setReceiptPdfEncoding(String storageEncoding)
Deprecated.Sets the receipt pdf encoding.void
setServiceDefinition(ServiceDefinition serviceDefinition)
Deprecated.Set the service definition for the service.void
setSubmissionHistoryXmlEncoding(String storageEncoding)
Deprecated.Sets the submission history xml encoding.void
setSubmissionXmlEncoding(String storageEncoding)
Deprecated.Sets the submission xml encoding.void
storeAttachment(Submission submission, FileUpload fileUpload, byte[] fileData)
Deprecated.Store the submission attachment file data.void
storeSignatureReceipt(Submission submission, byte[] receiptData)
Deprecated.Store submission signature receipt data.void
storeSubmissionAndHistoryXml(Submission submission, SubmissionHistory history, byte[] xmlData)
Deprecated.Store submission form xml data against the submission and submission history objects.void
storeSubmissionHistoryXml(SubmissionHistory history, byte[] xmlData)
Deprecated.Store submission history xml data.void
storeSubmissionReceipt(Submission submission, byte[] receiptData)
Deprecated.Store submission receipt data.void
storeSubmissionXml(Submission submission, byte[] xmlData)
Deprecated.Store submission form xml data.-
Methods inherited from class com.avoka.fc.core.service.CayenneService
commitChanges, deleteObject, deleteObjects, findObject, getDataContext, getDataDomain, getObjectForPK, getObjectStore, newObject, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, refetchObject, registerNewObject, rollbackChanges, toMap, toMap
-
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
-
-
-
Method Detail
-
getKmsMasterKeyId
public String getKmsMasterKeyId()
Deprecated.- Returns:
- the KMS Master Key ID
-
setKmsMasterKeyId
public void setKmsMasterKeyId(String kmsMasterKeyId)
Deprecated.Set the KMS Master Key ID.- Parameters:
kmsMasterKeyId
- the kmsMasterKeyId to set
-
hasExternalizeStorage
public boolean hasExternalizeStorage()
Deprecated.Description copied from interface:ISubmissionDataStorageService
Return true if the submission data storage service uses external storage (non TM database) of submission data. If this method returns true then the methodISubmissionDataStorageService.deleteSubmissionData(Submission)
should be called by the @linkIDataRetentionManagementService
when purging submission data.- Specified by:
hasExternalizeStorage
in interfaceISubmissionDataStorageService
- Returns:
- false
- See Also:
ISubmissionDataStorageService.hasExternalizeStorage()
-
initializeCryptoDataKey
public boolean initializeCryptoDataKey(Submission submission)
Deprecated.Returns false as we don't want to change behaviour of this class. if there are concurrency issues using KMS the workaround is to use AwsSubmissionDataStorageService with the KMS encryptor NOT this class. This is called on Render to avoid a race condition TMR-2171 with multi simultaneous Dynamic Data Calls.- Specified by:
initializeCryptoDataKey
in interfaceISubmissionDataStorageService
- Parameters:
submission
- the submission to which the data key will be created- Returns:
- true as the submission data storage has stored a crypto key
- Since:
- 18.5.9
-
encryptText
public String encryptText(Submission submission, String plainText)
Deprecated.Encrypt a string related to a submission.- Specified by:
encryptText
in interfaceISubmissionDataStorageService
- Parameters:
submission
- the submission which the string relates to (required)plainText
- the plain text string to be encrypted- Returns:
- the encrypted string - note that this will generally be longer than the original
- Since:
- 4.3.0
- See Also:
ISubmissionDataStorageService.encryptText(Submission, String)
-
decryptText
public String decryptText(Submission submission, String cypherText)
Deprecated.Decrypt a submission related string that was created using encryptText- Specified by:
decryptText
in interfaceISubmissionDataStorageService
- Parameters:
submission
- the submission which the string relates to (required)cypherText
- the encrypted string- Returns:
- the plain text string
- Since:
- 4.3.0
- See Also:
ISubmissionDataStorageService.decryptText(Submission, String)
-
storeSubmissionReceipt
public void storeSubmissionReceipt(Submission submission, byte[] receiptData)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Store submission receipt data.- Specified by:
storeSubmissionReceipt
in interfaceISubmissionDataStorageService
- Parameters:
submission
- the submissionreceiptData
- the signature receipt data- See Also:
ISubmissionDataStorageService.storeSignatureReceipt(Submission, byte[])
-
storeSignatureReceipt
public void storeSignatureReceipt(Submission submission, byte[] receiptData)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Store submission signature receipt data.- Specified by:
storeSignatureReceipt
in interfaceISubmissionDataStorageService
- Parameters:
submission
- the submissionreceiptData
- the signature receipt data- See Also:
ISubmissionDataStorageService.storeSignatureReceipt(Submission, byte[])
-
storeSubmissionXml
public void storeSubmissionXml(Submission submission, byte[] xmlData)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Store submission form xml data.- Specified by:
storeSubmissionXml
in interfaceISubmissionDataStorageService
- Parameters:
submission
- the submissionxmlData
- the xml data- See Also:
ISubmissionDataStorageService.storeSubmissionXml(Submission, byte[])
-
storeSubmissionAndHistoryXml
public void storeSubmissionAndHistoryXml(Submission submission, SubmissionHistory history, byte[] xmlData)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Store submission form xml data against the submission and submission history objects.- Specified by:
storeSubmissionAndHistoryXml
in interfaceISubmissionDataStorageService
- Parameters:
submission
- the submissionhistory
- the submission historyxmlData
- the xml data- See Also:
ISubmissionDataStorageService.storeSubmissionAndHistoryXml(Submission, SubmissionHistory, byte[])
-
storeSubmissionHistoryXml
public void storeSubmissionHistoryXml(SubmissionHistory history, byte[] xmlData)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Store submission history xml data.- Specified by:
storeSubmissionHistoryXml
in interfaceISubmissionDataStorageService
- Parameters:
history
- the historyxmlData
- the xml data- See Also:
ISubmissionDataStorageService.storeSubmissionHistoryXml(SubmissionHistory, byte[])
-
storeAttachment
public void storeAttachment(Submission submission, FileUpload fileUpload, byte[] fileData)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Store the submission attachment file data.- Specified by:
storeAttachment
in interfaceISubmissionDataStorageService
- Parameters:
submission
- the associated submissionfileUpload
- the file uploadfileData
- the file data- See Also:
ISubmissionDataStorageService.storeAttachment(Submission, FileUpload, byte[])
-
getSubmissionReceipt
public byte[] getSubmissionReceipt(Submission submission)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Gets the submission receipt data.- Specified by:
getSubmissionReceipt
in interfaceISubmissionDataStorageService
- Parameters:
submission
- the submission- Returns:
- the submission receipt
- See Also:
ISubmissionDataStorageService.getSubmissionReceipt(Submission)
-
getSignatureReceipt
public byte[] getSignatureReceipt(Submission submission)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Gets the signature receipt data.- Specified by:
getSignatureReceipt
in interfaceISubmissionDataStorageService
- Parameters:
submission
- the submission- Returns:
- the signature receipt
- See Also:
ISubmissionDataStorageService.getSignatureReceipt(Submission)
-
getSubmissionXml
public byte[] getSubmissionXml(Submission submission)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Gets the submission xml data.- Specified by:
getSubmissionXml
in interfaceISubmissionDataStorageService
- Parameters:
submission
- the submission- Returns:
- the submission xml
- See Also:
ISubmissionDataStorageService.getSubmissionXml(Submission)
-
getSubmissionHistoryXml
public byte[] getSubmissionHistoryXml(SubmissionHistory history)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Gets the submission history xml data.- Specified by:
getSubmissionHistoryXml
in interfaceISubmissionDataStorageService
- Parameters:
history
- the history- Returns:
- the submission history xml
- See Also:
ISubmissionDataStorageService.getSubmissionHistoryXml(SubmissionHistory)
-
getAttachment
public byte[] getAttachment(FileUpload fileUpload)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Gets the attachment file data.- Specified by:
getAttachment
in interfaceISubmissionDataStorageService
- Parameters:
fileUpload
- the file upload- Returns:
- the attachment
- See Also:
ISubmissionDataStorageService.getAttachment(FileUpload)
-
deleteSubmissionData
public boolean deleteSubmissionData(Submission submission)
Deprecated.Delete the transaction data associated with this submission, if not already deleted. Note submission delivery status must be [ Completed | Undeliverable | Not Required ]. Delete submission data, attachment data, submission history data and return true if successful.- Specified by:
deleteSubmissionData
in interfaceISubmissionDataStorageService
- Parameters:
submission
- the submission to delete the data of (required)- Returns:
- true if successful, or false if the data was already deleted or is in the wrong delivery status
- See Also:
ISubmissionDataStorageService.deleteSubmissionData(Submission)
-
deleteAttachmentData
public boolean deleteAttachmentData(FileUpload fileUpload)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Delete attachment data.- Specified by:
deleteAttachmentData
in interfaceISubmissionDataStorageService
- Parameters:
fileUpload
- the file upload- Returns:
- true, if successful
- See Also:
ISubmissionDataStorageService.deleteAttachmentData(FileUpload)
-
getKmsKeyId
public String getKmsKeyId()
Deprecated.Return the AWS KMS Master Key Id.- Returns:
- the AWS KMS Master Key Id.
-
setKmsKeyId
public void setKmsKeyId(String kmsMasterKeyId)
Deprecated.Set the AWS KMS Master Key Id.- Parameters:
kmsMasterKeyId
- the AWS KMS MasterKey Id to set
-
getSubmissionXmlEncoding
public String getSubmissionXmlEncoding()
Deprecated.Description copied from interface:ISubmissionDataStorageService
Gets the submission xml encoding.- Specified by:
getSubmissionXmlEncoding
in interfaceISubmissionDataStorageService
- Returns:
- the submission xml encoding
- See Also:
ISubmissionDataStorageService.getSubmissionXmlEncoding()
-
setSubmissionXmlEncoding
public void setSubmissionXmlEncoding(String storageEncoding)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Sets the submission xml encoding.- Specified by:
setSubmissionXmlEncoding
in interfaceISubmissionDataStorageService
- Parameters:
storageEncoding
- the new submission xml encoding- See Also:
ISubmissionDataStorageService.setSubmissionXmlEncoding(String)
-
getSubmissionHistoryXmlEncoding
public String getSubmissionHistoryXmlEncoding()
Deprecated.Description copied from interface:ISubmissionDataStorageService
Gets the submission history xml encoding.- Specified by:
getSubmissionHistoryXmlEncoding
in interfaceISubmissionDataStorageService
- Returns:
- the submission xml encoding
- See Also:
ISubmissionDataStorageService.getSubmissionXmlEncoding()
-
setSubmissionHistoryXmlEncoding
public void setSubmissionHistoryXmlEncoding(String storageEncoding)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Sets the submission history xml encoding.- Specified by:
setSubmissionHistoryXmlEncoding
in interfaceISubmissionDataStorageService
- Parameters:
storageEncoding
- the new submission history xml encoding- See Also:
ISubmissionDataStorageService.setSubmissionHistoryXmlEncoding(String)
-
getReceiptPdfEncoding
public String getReceiptPdfEncoding()
Deprecated.Description copied from interface:ISubmissionDataStorageService
Gets the receipt pdf encoding.- Specified by:
getReceiptPdfEncoding
in interfaceISubmissionDataStorageService
- Returns:
- the receipt pdf encoding
- See Also:
ISubmissionDataStorageService.getReceiptPdfEncoding()
-
setReceiptPdfEncoding
public void setReceiptPdfEncoding(String storageEncoding)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Sets the receipt pdf encoding.- Specified by:
setReceiptPdfEncoding
in interfaceISubmissionDataStorageService
- Parameters:
storageEncoding
- the new receipt pdf encoding- See Also:
ISubmissionDataStorageService.setReceiptPdfEncoding(String)
-
getAttachmentsEncoding
public String getAttachmentsEncoding()
Deprecated.Description copied from interface:ISubmissionDataStorageService
Gets the attachments encoding.- Specified by:
getAttachmentsEncoding
in interfaceISubmissionDataStorageService
- Returns:
- the attachments encoding
- See Also:
ISubmissionDataStorageService.getAttachmentsEncoding()
-
setAttachmentsEncoding
public void setAttachmentsEncoding(String storageEncoding)
Deprecated.Description copied from interface:ISubmissionDataStorageService
Sets the attachments encoding.- Specified by:
setAttachmentsEncoding
in interfaceISubmissionDataStorageService
- Parameters:
storageEncoding
- the new attachments encoding- See Also:
ISubmissionDataStorageService.setAttachmentsEncoding(String)
-
getServiceDefinition
public ServiceDefinition getServiceDefinition()
Deprecated.Description copied from interface:IServiceDefinitionAware
Return the service definition for the service.- Specified by:
getServiceDefinition
in interfaceIServiceDefinitionAware
- Returns:
- the service definition for the service.
- See Also:
IServiceDefinitionAware.getServiceDefinition()
-
setServiceDefinition
public void setServiceDefinition(ServiceDefinition serviceDefinition)
Deprecated.Description copied from interface:IServiceDefinitionAware
Set the service definition for the service.- Specified by:
setServiceDefinition
in interfaceIServiceDefinitionAware
- Parameters:
serviceDefinition
- the service definition for the service.- See Also:
IServiceDefinitionAware.setServiceDefinition(ServiceDefinition)
-
getKeystoreData
protected byte[] getKeystoreData(Submission submission)
Deprecated.Return the keystore data for the submission.- Parameters:
submission
- the submission object (required)- Returns:
- the keystore data for the submission
-
encodeData
protected byte[] encodeData(Submission submission, byte[] data, String encoding)
Deprecated.Encode the data for the given submission with the encoding type.- Parameters:
submission
- the submission record (required)data
- the data to encode (required)encoding
- the encoding mode- Returns:
- the encode data
- Since:
- 4.3.2
-
decodeData
protected byte[] decodeData(Submission submission, byte[] data, String encoding)
Deprecated.Decode the data for the given submission with the encoding type.- Parameters:
submission
- the submission record (required)data
- the data to encode (required)encoding
- the encoding mode- Returns:
- the encode data
- Since:
- 4.3.2
-
compressData
protected byte[] compressData(byte[] data)
Deprecated.Compress the given data using ZLIP compression.- Parameters:
data
- the data to compress- Returns:
- the compressed data
-
decompressData
protected byte[] decompressData(byte[] data)
Deprecated.Decompress the given data using ZLIP.- Parameters:
data
- the data to compress- Returns:
- the decompress data
-
refetchEntity
protected <T extends BaseEntity> T refetchEntity(T entity)
Deprecated.Refetch the given entity if associted with a different data context.- Overrides:
refetchEntity
in classCayenneService
- Parameters:
entity
- to check- Returns:
- the refetched entity if associted with a different data context.
-
getServiceDefintionForThreadDataContext
protected ServiceDefinition getServiceDefintionForThreadDataContext(ServiceDefinition serviceDefinition)
Deprecated.Return a ServiceDefinition instance for the current Thread DataContext. Please note the service definition may be cached and belong to a different DataContext.- Parameters:
serviceDefinition
- the service definition to load.- Returns:
- Service Definition instance for the current Thread DataContext
-
-