Hi All,
If writing a logic to run certain tasks only if user is on primary publisher, in Java looking to identify if user is on a primary publish instance.
I see that AEM Communities Publisher Configuration has "isPrimaryPublisher" from which this can be obtained. Any suggestion of achieving this in best way?
The pid of the config seem to point to an impl class so not sure if @Reference would work.
Using AEM 6.2 SP1 FP3 cfp14
Thanks
Shubham
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Please check below if helps:
Views
Replies
Total Likes
Hi,
Please check below if helps:
Views
Replies
Total Likes
Yup took a look at that, was wondering more if some one has already tried this.
Will update in case I get a chance to try and get the value for isPrimaryPublisher.
Thanks
Views
Replies
Total Likes
Nice response Arun!
Views
Replies
Total Likes
Thanks Arun,
Just to add a bit more, I was able to achieve this using below in a tag class.
PublisherConfiguration pc = sling.getService(PublisherConfiguration.class);
Similarly for a servlet or a service impl class it seems we can use @Reference for the class PublisherConfiguration
Thanks again,
Shubham
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies