Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

Publish / unpublish History

Avatar

Level 2

Hi

 

Is there any way of checking if a page was unpublished before it was published?
Want to check when (Date) it got published and when (Date) it got unpublished and User who published & unpublished

Thanks in Advance !!!

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi @Sigkumar ,

You can use ReplicationStatus to get the deactivated/unpublished status of the page:

 

ReplicationStatus status = page.adaptTo(ReplicationStatus.class);
boolean deactivatedStatus = status.isDeactivated();

 You can also check the activated/published status below:

boolean activatedStatus = status.isActivated();

Hope this could help you

Thanks

Shiv 

View solution in original post

3 Replies

Avatar

Correct answer by
Level 5

Hi @Sigkumar ,

You can use ReplicationStatus to get the deactivated/unpublished status of the page:

 

ReplicationStatus status = page.adaptTo(ReplicationStatus.class);
boolean deactivatedStatus = status.isDeactivated();

 You can also check the activated/published status below:

boolean activatedStatus = status.isActivated();

Hope this could help you

Thanks

Shiv