Hi,
These properties are automatically created and managed by JCR. In general, most nodes will automatically add or update these properties when there are changes to the node[1]. Since these are protected properties, it is not recommended to update them programmatically. If you need to track an updateInformationDate
based on business requirements, the best approach is to create a custom property and update it as needed. However, if you still wish to update these properties directly, the following approach should work:
Node node = session.getNode(path)
node.setProperty("jcr:lastModified", Calendar.getInstance());
node.setProperty("jcr:lastModifiedBy", "esteban");
session.save();
You can learn more here:
[1] https://developer.adobe.com/experience-manager/reference-materials/spec/jcr/2.0/3_Repository_Model.h...
https://stackoverflow.com/questions/74526184/lastmodified-and-lastmodifiedby-fields-in-aem-nodes
Hope this helps
Esteban Bustamante