Olaf Kock Il y a 8 années Caveat: Use Startup Actions wisely, mainly for constructive work, never for destructive work, because they will run again on next startup. In case you need something running truly once and never again, it's safer to implement an Upgrade Action. Liferay will take care of it never to run a second time. For Startup Actions you'll have to pay attention yourself. Creating an Expando Field is no problem - you automatically won't create them again. But if you reset your portal to a baseline (potentially deleting existing content), you rather want that to be done once and never again when someone deploys the plugin again. Fun fact: The ancient SevenCogs implementation was first implemented as Startup Action. As it could be quite destructive, it was quickly migrated into an Upgrade Action Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Lauri Hiltunen Olaf Kock Il y a 8 années Thank you for your input, Olaf, you're correct! Creating expando fields with the start up action is a good feature because it enables you to easily update and also add new expando fields (or roles for instance) when necessary. With upgrade actions you have to make sure it runs again (or create a new one) if something more is added. Though maybe I'll write something about the upgrade action in the near future as well. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Boris Gligorijević Olaf Kock Il y a 7 années Hi Olaf,Do you know a solution for DXP? How does one create start-up hook within OSGI? Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Renáta Kovács Boris Gligorijević Il y a 7 années Hooks are deprecated in DXP. https://github.com/liferay/liferay-blade-samples (look for: "Extension point description:" and "application.startup.events") Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Alexander Schmacks Renáta Kovács Il y a 5 années Where does it say that these events ( startup action discussed here) are deprecated? Both search terms don't yield helpful insights for me... On the other hand Portal Properties documentation for 7.1 here https://docs.liferay.com/ce/portal/7.1-latest/propertiesdoc/portal.properties.html#Startup%20Events still refers to class SimpleAction (though in wrong, old 'struts' package). And class SimpleAction on Github https://github.com/liferay/liferay-portal/blob/master/portal-kernel/src/com/liferay/portal/kernel/events/SimpleAction.java has no deprecation marker (and sadly no documentation at all, as so many other classes... But that's another topic). Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Olaf Kock Alexander Schmacks Il y a 5 années Hm - I didn't get the earlier discussion. But I believe that LifecycleAction is the new kid on the block - with various possible key-properties https://github.com/liferay/liferay-blade-samples/blob/7.1/liferay-workspace/extensions/lifecycle-login-preaction/src/main/java/com/liferay/blade/samples/lifecycle/loginpreaction/LoginPreAction.java Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Lauri Hiltunen Olaf Kock Il y a 8 années Thank you for your input, Olaf, you're correct! Creating expando fields with the start up action is a good feature because it enables you to easily update and also add new expando fields (or roles for instance) when necessary. With upgrade actions you have to make sure it runs again (or create a new one) if something more is added. Though maybe I'll write something about the upgrade action in the near future as well. Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Boris Gligorijević Olaf Kock Il y a 7 années Hi Olaf,Do you know a solution for DXP? How does one create start-up hook within OSGI? Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Renáta Kovács Boris Gligorijević Il y a 7 années Hooks are deprecated in DXP. https://github.com/liferay/liferay-blade-samples (look for: "Extension point description:" and "application.startup.events") Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Alexander Schmacks Renáta Kovács Il y a 5 années Where does it say that these events ( startup action discussed here) are deprecated? Both search terms don't yield helpful insights for me... On the other hand Portal Properties documentation for 7.1 here https://docs.liferay.com/ce/portal/7.1-latest/propertiesdoc/portal.properties.html#Startup%20Events still refers to class SimpleAction (though in wrong, old 'struts' package). And class SimpleAction on Github https://github.com/liferay/liferay-portal/blob/master/portal-kernel/src/com/liferay/portal/kernel/events/SimpleAction.java has no deprecation marker (and sadly no documentation at all, as so many other classes... But that's another topic). Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Olaf Kock Alexander Schmacks Il y a 5 années Hm - I didn't get the earlier discussion. But I believe that LifecycleAction is the new kid on the block - with various possible key-properties https://github.com/liferay/liferay-blade-samples/blob/7.1/liferay-workspace/extensions/lifecycle-login-preaction/src/main/java/com/liferay/blade/samples/lifecycle/loginpreaction/LoginPreAction.java Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Renáta Kovács Boris Gligorijević Il y a 7 années Hooks are deprecated in DXP. https://github.com/liferay/liferay-blade-samples (look for: "Extension point description:" and "application.startup.events") Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Alexander Schmacks Renáta Kovács Il y a 5 années Where does it say that these events ( startup action discussed here) are deprecated? Both search terms don't yield helpful insights for me... On the other hand Portal Properties documentation for 7.1 here https://docs.liferay.com/ce/portal/7.1-latest/propertiesdoc/portal.properties.html#Startup%20Events still refers to class SimpleAction (though in wrong, old 'struts' package). And class SimpleAction on Github https://github.com/liferay/liferay-portal/blob/master/portal-kernel/src/com/liferay/portal/kernel/events/SimpleAction.java has no deprecation marker (and sadly no documentation at all, as so many other classes... But that's another topic). Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Olaf Kock Alexander Schmacks Il y a 5 années Hm - I didn't get the earlier discussion. But I believe that LifecycleAction is the new kid on the block - with various possible key-properties https://github.com/liferay/liferay-blade-samples/blob/7.1/liferay-workspace/extensions/lifecycle-login-preaction/src/main/java/com/liferay/blade/samples/lifecycle/loginpreaction/LoginPreAction.java Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Alexander Schmacks Renáta Kovács Il y a 5 années Where does it say that these events ( startup action discussed here) are deprecated? Both search terms don't yield helpful insights for me... On the other hand Portal Properties documentation for 7.1 here https://docs.liferay.com/ce/portal/7.1-latest/propertiesdoc/portal.properties.html#Startup%20Events still refers to class SimpleAction (though in wrong, old 'struts' package). And class SimpleAction on Github https://github.com/liferay/liferay-portal/blob/master/portal-kernel/src/com/liferay/portal/kernel/events/SimpleAction.java has no deprecation marker (and sadly no documentation at all, as so many other classes... But that's another topic). Veuillez vous identifier pour voter. Répondre en tant que ... Annuler Olaf Kock Alexander Schmacks Il y a 5 années Hm - I didn't get the earlier discussion. But I believe that LifecycleAction is the new kid on the block - with various possible key-properties https://github.com/liferay/liferay-blade-samples/blob/7.1/liferay-workspace/extensions/lifecycle-login-preaction/src/main/java/com/liferay/blade/samples/lifecycle/loginpreaction/LoginPreAction.java Veuillez vous identifier pour voter. Répondre en tant que ... Annuler
Olaf Kock Alexander Schmacks Il y a 5 années Hm - I didn't get the earlier discussion. But I believe that LifecycleAction is the new kid on the block - with various possible key-properties https://github.com/liferay/liferay-blade-samples/blob/7.1/liferay-workspace/extensions/lifecycle-login-preaction/src/main/java/com/liferay/blade/samples/lifecycle/loginpreaction/LoginPreAction.java Veuillez vous identifier pour voter. Répondre en tant que ... Annuler