Hi,
Did not follow the discussion in depth, but maybe you are interested in
adding an EventListener on either DocumentCreatingEvent [1] (before) or
DocumentCreatedEvent [2] (after).
Other, more specialized, events exist as well, such as
XObjectAdded/Updated/DeletedEvent [7][8][9] that allows you to catch a user
profile page that was just created (example usage [6]). This way you`re
avoiding to do extra work in checking the type of the created page, like
you would have to do with DocumentCreatedEvent.
The event listener [3] can be built and added either as a java component
[4], a wiki component [5] or with a custom groovy script that does things
manually.
Hope this helps,
Eduard
----------
[1]
1) I am not cutting any post. I use Nabble.
http://xwiki.475771.n2.nabble.com/Re-API-Scripting-create-
user-and-attach-some-files-to-its-profile-td7601934.html
2) I think my example shows perfectly what you want to accomplish. You want
to attach an PDF to something which does not yet exist.
Don't be scorned, I am just putting things in perspective. Unless there's
an
API which allows you to attach items to pages during the creation of the
page. Otherwise the procedure will have to be (1) check if a user profile
exists, if "yes" then attach file, if "no" then first create the
user
profile and then attach the file.
--
View this message in context:
http://xwiki.475771.n2.nabble.
com/Re-API-Scripting-create-user-and-attach-some-files-to-
its-profile-tp7601934p7602032.html
Sent from the XWiki- Users mailing list archive at
Nabble.com.