Some time we are having requirement that we need to upload the web content with some back date. For example one of our news based portals we were required to have an option that, user can change the create date of web content at the time of uploading.
We are going to use the Service hook. We are going to hook
com.liferay.portlet.journal.service.JournalArticleLocalService
We will use the expando bridge to get the latest created date from the user.
Create 2 custom fields as shown in the snap shots. The field name could be createDate(Date) and changeCreateDate(Boolean).
Else you can change the name and update them in the portlet.properties file.
override.change.create.date.field.name = changeCreateDate
create.date.field.name = createDate
These 2 fields will decide whether to update the create date or not.