@Component public class WebCmsMenuImporter extends AbstractWebCmsDataImporter<WebCmsMenu,WebCmsMenu>
WebCmsMenus from a yml fileLOG| Constructor and Description |
|---|
WebCmsMenuImporter() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
applyDataValues(Map<String,Object> values,
WebCmsMenu dto)
Apply the data values to the dto object.
|
protected WebCmsMenu |
createDto(WebCmsDataEntry data,
WebCmsMenu existing,
WebCmsDataAction action,
Map<String,Object> dataValues)
Create a DTO object for either a new instance or an existing instance.
|
protected void |
deleteInstance(WebCmsMenu instance,
WebCmsDataEntry data)
Perform the delete action on existing instance.
|
protected WebCmsMenu |
retrieveExistingInstance(WebCmsDataEntry data)
Get the existing object that this data represents.
|
protected void |
saveDto(WebCmsMenu dto,
WebCmsDataAction action,
WebCmsDataEntry data)
Save an updated or created instance.
|
boolean |
supports(WebCmsDataEntry data) |
protected void |
validate(WebCmsMenu itemToBeSaved,
org.springframework.validation.Errors errors)
Perform some custom validation on the item to be saved.
|
addForceUpdateProperty, importData, prepareForSaving, resolveAction, retrieveDomainForDataEntry, setPropertyDataImportService, validateForSavingpublic boolean supports(WebCmsDataEntry data)
protected WebCmsMenu retrieveExistingInstance(WebCmsDataEntry data)
AbstractWebCmsDataImporternull..retrieveExistingInstance in class AbstractWebCmsDataImporter<WebCmsMenu,WebCmsMenu>data - entrynullprotected WebCmsMenu createDto(WebCmsDataEntry data, WebCmsMenu 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<WebCmsMenu,WebCmsMenu>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 boolean applyDataValues(Map<String,Object> values, WebCmsMenu dto)
AbstractWebCmsDataImporterfalse no values have been applied to the DTO and actual updating
might get skipped.applyDataValues in class AbstractWebCmsDataImporter<WebCmsMenu,WebCmsMenu>values - to apply (key/value pairs)dto - to set the values onprotected void deleteInstance(WebCmsMenu instance, WebCmsDataEntry data)
AbstractWebCmsDataImporterdeleteInstance in class AbstractWebCmsDataImporter<WebCmsMenu,WebCmsMenu>instance - to deletedata - entry that is being importedprotected void saveDto(WebCmsMenu dto, WebCmsDataAction action, WebCmsDataEntry data)
AbstractWebCmsDataImportersaveDto in class AbstractWebCmsDataImporter<WebCmsMenu,WebCmsMenu>dto - that should be savedaction - type of save action (create, update or replace)data - entry that is being importedprotected void validate(WebCmsMenu itemToBeSaved, org.springframework.validation.Errors errors)
AbstractWebCmsDataImportervalidate in class AbstractWebCmsDataImporter<WebCmsMenu,WebCmsMenu>itemToBeSaved - item to be savederrors - collection to add validation errors toCopyright © 2020. All rights reserved.