Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

share page. any events fired ?

David Voňka February 13, 2012

I would like to create a report about how people use the 'share page' functionality. The rest api is coded in a bundled plugin. I do not seem to have access to the source code. Is that right ? If it is, could someone tell me, whether sharing a page fires some event which I could catch and work with ?

Thank you,

David Vonka

Semanta.cz

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2012

After looking at the source code of Confluence and the Share Page plugin, I don't think there are any events fired when sharing a page. Maybe you could write a servlet filter that filters the corresponding REST API request and create a log entry somewhere, but I'm not sure if this would work.

David Voňka February 13, 2012

thanks. Am I right that an owner of the 10$ licence has no access to the source code of the plugin ?

Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2012

I'm not sure whether anyone has access to the source code of the plugin. But if you want to know which action the plugin is calling, you could use the REST API Browser or try to unpack the plugin JAR file.

1 vote
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 14, 2012

As of version 1.13 of the Share Page plugin, you can listen for the com.atlassian.confluence.plugins.sharepage.api.ShareContentEvent to be notified whenever a user shares a page. You'll need to write an Event Listener module in a Confluence plugin to receive notifications for this event.

I don't think 1.13 is actually shipped with any version of Confluence just yet, but you should be able to install it (or a later version) from here: https://maven.atlassian.com/content/repositories/atlassian-contrib/com/atlassian/confluence/plugins/share-page/

The source code for the plugin is here: https://labs.atlassian.com/svn/CONFSP but you might not be able to access it (not sure of the permissions).

Sven
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 8, 2012

Shouldn't this source-code be available either generally or at least for paying customers?

Looks like I have to create a "custom version" as we do not want that "autowatch" is automatically enabled on the users receiving the share-mail...

Thanks,

Sven

0 votes
David Voňka March 8, 2012

I do not have access to the svn repository mentioned by Joseph. The atlassian policy on this is somewhat unclear to me. I have the core code, but the bundled plugins are not available.

Well, I dont want to complain too much, I'm thankful for the source code I do have, it is very helpful.

Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 11, 2012

Hi David - Sorry you can't access the source code. the Share Page plugin was originally a 20% project by an individual developer, so the source code is currently hosted on one of our internal-only JIRA Studio instances.

At the very least, the source code is published alongside the plugin jar in our maven repository - eg. https://maven.atlassian.com/content/repositories/atlassian-contrib/com/atlassian/confluence/plugins/share-page/1.20/share-page-1.20-sources.jar

You can use the mvn dependency:sources command to retrieve this into your local repo.

I'll see if we can get the share page project moved off to an external instance, but the published source jar should be all you need in the meantime. :-)

TAGS
AUG Leaders

Atlassian Community Events