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

How to execute java code at the end of Space creation in plugin?

Matías Acosta February 20, 2015

Hello, I have a plugin that creates a space with some pages.

The thing is I want to modify some pages as part of the plugin, but if I use an EventListener for SpaceCreate when the event is captured the Space is not fully created, it doesn't have ot's children pages yet. So I want to execute my jave code to modify pages once the Space is saved.

Is there an event corresponding to a Space fully created and saved?  If not, how can I tell my plugin to execute this java code just at the end (after the cretion of the space)?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Alex Medved _ConfiForms_
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 20, 2015

I think the space is actually created and the event is sent at a correct time - as the space is actually created.

Adding pages to the space has nothing to do with space create event.

Do you own the plugin which creates a space with pages? Can you modify it's code? Can send some custom event which you then can capture elsewhere

Or another option is to listen to pagecreated events to understand when all the pages get created

Matías Acosta February 25, 2015

Thank you! Yes the code is mine so the sending a new event option is a good idea, I'll probably try it in the future. Meanwhile, I solved it capturing the SpaceUpdate Event.

TAGS
AUG Leaders

Atlassian Community Events