Search in sources :

Example 1 with MODIFIED_TIME

use of com.enonic.xp.content.ContentPropertyNames.MODIFIED_TIME in project xp by enonic.

the class ReprocessContentCommand method revertModifiedTime.

private Content revertModifiedTime(final Content content, final Instant modifiedTime) {
    final UpdateNodeParams update = UpdateNodeParams.create().id(NodeId.from(content.getId())).editor((node) -> node.data.getRoot().setInstant(MODIFIED_TIME, modifiedTime)).build();
    this.nodeService.update(update);
    return this.getContent(content.getId());
}
Also used : PartDescriptorService(com.enonic.xp.region.PartDescriptorService) Media(com.enonic.xp.content.Media) UpdateMediaParams(com.enonic.xp.content.UpdateMediaParams) Content(com.enonic.xp.content.Content) Attachment(com.enonic.xp.attachment.Attachment) LayoutDescriptorService(com.enonic.xp.region.LayoutDescriptorService) Instant(java.time.Instant) NodeId(com.enonic.xp.node.NodeId) UpdateNodeParams(com.enonic.xp.node.UpdateNodeParams) ContentId(com.enonic.xp.content.ContentId) PageDescriptorService(com.enonic.xp.page.PageDescriptorService) ReprocessContentParams(com.enonic.xp.content.ReprocessContentParams) MediaInfoService(com.enonic.xp.media.MediaInfoService) ContentDataSerializer(com.enonic.xp.core.impl.content.serializer.ContentDataSerializer) MODIFIED_TIME(com.enonic.xp.content.ContentPropertyNames.MODIFIED_TIME) ByteSource(com.google.common.io.ByteSource) UpdateNodeParams(com.enonic.xp.node.UpdateNodeParams)

Aggregations

Attachment (com.enonic.xp.attachment.Attachment)1 Content (com.enonic.xp.content.Content)1 ContentId (com.enonic.xp.content.ContentId)1 MODIFIED_TIME (com.enonic.xp.content.ContentPropertyNames.MODIFIED_TIME)1 Media (com.enonic.xp.content.Media)1 ReprocessContentParams (com.enonic.xp.content.ReprocessContentParams)1 UpdateMediaParams (com.enonic.xp.content.UpdateMediaParams)1 ContentDataSerializer (com.enonic.xp.core.impl.content.serializer.ContentDataSerializer)1 MediaInfoService (com.enonic.xp.media.MediaInfoService)1 NodeId (com.enonic.xp.node.NodeId)1 UpdateNodeParams (com.enonic.xp.node.UpdateNodeParams)1 PageDescriptorService (com.enonic.xp.page.PageDescriptorService)1 LayoutDescriptorService (com.enonic.xp.region.LayoutDescriptorService)1 PartDescriptorService (com.enonic.xp.region.PartDescriptorService)1 ByteSource (com.google.common.io.ByteSource)1 Instant (java.time.Instant)1