-
1. Re: How to check whether a page is published?
CQDarren Apr 17, 2013 5:08 AM (in response to Veena_07)Hi Veena,
Not sure if this helps and where you want to print too, but you could deploy a bundle that implements the EventHandler class and listen for your required events.. I.e you can get the ReplicationAction using ReplicationAction.fromEvent(yourevent) and check if it matches the event of interest.
hope it helps..
Darren.
-
2. Re: How to check whether a page is published?
dcollie Apr 17, 2013 5:40 AM (in response to CQDarren)One approach might be to check the audit log at /var/audit/com.day.cq.replication if on the author, nodes have the cq:Type of Activate/Deactivate.
(I have some sample code for starters here: http://www.eyelock.net/blog/archives/533)
This won't help if you purge your Audit Logs.
-
3. Re: How to check whether a page is published?
Veena_07 Apr 18, 2013 12:34 AM (in response to dcollie)Does any property in the CRX for the page give me exact status if the page is in published state or not?
Thanks
Veena
-
4. Re: How to check whether a page is published?
CQDarren Apr 18, 2013 8:19 AM (in response to Veena_07)Hi Veena
You need to activate a page and look in the CRX. You can then establish if there is anything in there that is useful for your requirement.
I activated a page and you can see some properties are set (such as cq:lastReplicationAction).
-
5. Re: How to check whether a page is published?
Ameeth Palla Apr 18, 2013 5:03 PM (in response to CQDarren)Hi Veena,
On the Publish server you can run the below query to see what Pages where activated during the dateTime range you need. Change the xs:dateTime values based on the date range that you need.
====
/jcr:root/content//*[@jcr:created >= xs:dateTime('2013-04-09T00:00:00.000+02:00') and @jcr:created<= xs:dateTime('2013-04-11T00:00:00.000+02:00') and jcr:primaryType='cq:PageContent']
====
Please note the filter - jcr:rimaryType='cq:PageContent' - in the query. Use this if you only want to check for the pages that got activated. You can remove this filter if you want to check for all content (like images, etc) that got activated.
The results of this query should give you a list of everything that is currently residing on the Publish within a date range when they were activated.
Hope this helps.
Thanks
Ameeth
-
6. Re: How to check whether a page is published?
Jörg Hoh Apr 20, 2013 11:49 AM (in response to Ameeth Palla)Hey guys, why are you dealing with the implementation details of the replication module?
The regular way to gather this information is:
Page page = ...
ReplicationStatus status = page.adaptTo(ReplicationStatus.class)
Jörg
-
7. Re: How to check whether a page is published?
Yogesh Upadhyay Apr 20, 2013 12:26 PM (in response to Jörg Hoh)You can use this example
http://www.wemblog.com/2011/10/how-to-find-all-pages-modified-or.html
Yogesh



