Class AbstractSubmissionDataStorageService
- java.lang.Object
-
- com.avoka.fc.core.service.BaseService
-
- com.avoka.fc.core.service.CayenneService
-
- com.avoka.fc.core.service.storage.AbstractSubmissionDataStorageService
-
- All Implemented Interfaces:
IServiceDefinitionAware
,ISubmissionDataStorageService
- Direct Known Subclasses:
AmazonS3SubmissionDataStorageService
,DatabaseSubmissionDataStorageService
,HybridCloudSubmissionDataStorageService
public abstract class AbstractSubmissionDataStorageService extends CayenneService implements ISubmissionDataStorageService, IServiceDefinitionAware
Provides an abstract submission data storage service class.- Since:
- 4.2.0
-
-
Constructor Summary
Constructors Constructor Description AbstractSubmissionDataStorageService()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected byte[]
decodeData(Submission submission, byte[] data, String encoding)
Decode the data for the given submission with the encoding type.String
decryptText(Submission submission, String cypherText)
Decrypt a submission related string that was created using encryptTextprotected byte[]
encodeData(Submission submission, byte[] data, String encoding)
Encode the data for the given submission with the encoding type.String
encryptText(Submission submission, String plainText)
Encrypt a string related to a submissionString
getAttachmentsEncoding()
Gets the attachments encoding.protected ISubmissionDataEncryptor
getDataEncryptor()
protected ErrorLogService
getErrorLogService()
String
getReceiptPdfEncoding()
Gets the receipt pdf encoding.ServiceDefinition
getServiceDefinition()
Return the service definition for the service.String
getSubmissionHistoryXmlEncoding()
Gets the submission history xml encoding.String
getSubmissionXmlEncoding()
Gets the submission xml encoding.boolean
hasExternalizeStorage()
Deprecated.protected <T extends BaseEntity>
TrefetchEntity(T entity)
Refetch the given entity if associted with a different data context.void
setAttachmentsEncoding(String storageEncoding)
Sets the attachments encoding.protected void
setDataEncryptor(ISubmissionDataEncryptor dataEncryptor)
Set the submission data encryptor.void
setReceiptPdfEncoding(String storageEncoding)
Sets the receipt pdf encoding.void
setServiceDefinition(ServiceDefinition serviceDefinition)
Set the service definition for the service.void
setSubmissionHistoryXmlEncoding(String storageEncoding)
Sets the submission history xml encoding.void
setSubmissionXmlEncoding(String storageEncoding)
Sets the submission xml encoding.-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.avoka.fc.core.service.ISubmissionDataStorageService
deleteAttachmentData, deleteSubmissionData, getAttachment, getSignatureReceipt, getSubmissionHistoryXml, getSubmissionReceipt, getSubmissionXml, initializeCryptoDataKey, storeAttachment, storeSignatureReceipt, storeSubmissionAndHistoryXml, storeSubmissionHistoryXml, storeSubmissionReceipt, storeSubmissionXml
-
-
-
-
Method Detail
-
getSubmissionXmlEncoding
public String getSubmissionXmlEncoding()
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)
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()
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)
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()
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)
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()
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)
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()
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)
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)
-
encryptText
public String encryptText(Submission submission, String plainText)
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)
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)
-
hasExternalizeStorage
@Deprecated 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:
- true
- Since:
- 4.2.0
- See Also:
ISubmissionDataStorageService.hasExternalizeStorage()
-
getDataEncryptor
protected ISubmissionDataEncryptor getDataEncryptor()
- Returns:
- the submission data encryptor
-
setDataEncryptor
protected void setDataEncryptor(ISubmissionDataEncryptor dataEncryptor)
Set the submission data encryptor.- Parameters:
dataEncryptor
- the submission data encryptor (required)
-
encodeData
protected byte[] encodeData(Submission submission, byte[] data, String encoding)
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)
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
-
refetchEntity
protected <T extends BaseEntity> T refetchEntity(T entity)
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.
-
getErrorLogService
protected ErrorLogService getErrorLogService()
- Returns:
- the error log service
- Since:
- 4.3.4
-
-