So I have an Excel spreadsheet processor/importer where all existing pages are deleted and then it recreates the pages based on the spreadsheet info.
I'm creating new pages via
Page page = pageManager.create(getCorrectPath(main, fish), getValidName(fish), templatePath, fish.getName(), true);
and this creates new pages under /content/data/fishes.
There is a new need where I cannot delete the pages anymore. I need to update it in possibility it's an existing one.
example:
/content/data/fishes/greatwhale
jcr:contents
species:arachnid
on the spreadsheet, the species has been updated to fish.
I've looked at com.day.cq.wcm.api.PageManager and com.day.cq.wcm.api.Page
Reading these 2 pages, it seems to me there is no update/edit facility available. So I'm thinking the next option is to delete the page and then recreate it?
Or perhaps you have a better suggestion?
Thank you so much!