@Component public class WebCmsDomainImporter extends AbstractWebCmsDataImporter<WebCmsDomain,WebCmsDomain>
WebCmsDomains from a yml fileLOG| Constructor and Description |
|---|
WebCmsDomainImporter() |
| Modifier and Type | Method and Description |
|---|---|
protected WebCmsDomain |
createDto(WebCmsDataEntry data,
WebCmsDomain existing,
WebCmsDataAction action,
Map<String,Object> dataValues)
Create a DTO object for either a new instance or an existing instance.
|
protected void |
deleteInstance(WebCmsDomain instance,
WebCmsDataEntry data)
Perform the delete action on existing instance.
|
protected WebCmsDomain |
retrieveExistingInstance(WebCmsDataEntry data)
Get the existing object that this data represents.
|
protected void |
saveDto(WebCmsDomain dto,
WebCmsDataAction action,
WebCmsDataEntry data)
Save an updated or created instance.
|
boolean |
supports(WebCmsDataEntry data) |
protected void |
validate(WebCmsDomain itemToBeSaved,
org.springframework.validation.Errors errors)
Perform some custom validation on the item to be saved.
|
addForceUpdateProperty, applyDataValues, importData, prepareForSaving, resolveAction, retrieveDomainForDataEntry, setPropertyDataImportService, validateForSavingpublic boolean supports(WebCmsDataEntry data)
protected WebCmsDomain retrieveExistingInstance(WebCmsDataEntry data)
AbstractWebCmsDataImporternull..retrieveExistingInstance in class AbstractWebCmsDataImporter<WebCmsDomain,WebCmsDomain>data - entrynullprotected WebCmsDomain createDto(WebCmsDataEntry data, WebCmsDomain existing, WebCmsDataAction action, Map<String,Object> dataValues)
AbstractWebCmsDataImporternull a new instance should be created.
Note that the DTO should not apply the data entry values yet, but the data entry
can be used to determine the initial type of instance that needs to be created.
If the DTO is null, the import will be skipped but properties will still be called.createDto in class AbstractWebCmsDataImporter<WebCmsDomain,WebCmsDomain>data - entryexisting - instance or null if a new instance should be createdaction - purpose for which the DTO should be created (create, delete or replace)dataValues - modifiable collection of the data values that will be applied afterwardsprotected void deleteInstance(WebCmsDomain instance, WebCmsDataEntry data)
AbstractWebCmsDataImporterdeleteInstance in class AbstractWebCmsDataImporter<WebCmsDomain,WebCmsDomain>instance - to deletedata - entry that is being importedprotected void saveDto(WebCmsDomain dto, WebCmsDataAction action, WebCmsDataEntry data)
AbstractWebCmsDataImportersaveDto in class AbstractWebCmsDataImporter<WebCmsDomain,WebCmsDomain>dto - that should be savedaction - type of save action (create, update or replace)data - entry that is being importedprotected void validate(WebCmsDomain itemToBeSaved, org.springframework.validation.Errors errors)
AbstractWebCmsDataImportervalidate in class AbstractWebCmsDataImporter<WebCmsDomain,WebCmsDomain>itemToBeSaved - item to be savederrors - collection to add validation errors toCopyright © 2020. All rights reserved.