Right way of removing Liferay's default Document Types

txapeldot ., modified 1 Year ago. Junior Member Posts: 91 Join Date: 1/15/15 Recent Posts

I'm facing a task consisting of preventing the Liferay's default Document Types from being created when starting the Portal. The situation is well explaind in this post, as well as the two possible solutions proposed.

Regarding the solutions proposed, I'd like to mention that in recent versions of Portal CE instances there is no track of the value 'com.liferay.portal.events.AddDefaultDataAction' for the property 'application.startup.events' within the file 'portal.properties'. In fact, the only properties that can be found within the 'Start Events' section of the 'portal.properties' are:

global.startup.events=com.liferay.portal.events.GlobalStartupAction,com.liferay.portal.events.CryptoStartupAction
application.startup.events=com.liferay.portal.events.AppStartupAction,com.liferay.portal.events.ChannelHubAppStartupAction

Therefore, and althouh I suspect the default Document Types are created within the class 'com.liferay.portal.events.GlobalStartupAction', it's no completely clear from me. Any clarification to this respect would be appreciated.

Moreover, in this post it's stated that there is the option to disable the creation of these default Document Types by unchecking the option 'Add Default Structures' through the Liferay's Control Panel. To this respect, the questions that arise to me are:
1) by unchecking the option ‘Add Default Structures’, do we prevent only just the default Document Types from being created, or, on the contrary, do we prevent other Liferay default “items” from being created?
2) is there is a way of preventing the default Document Tyes from being created by using a property to be set in 'portal-ext.properties' file?

If answer to question 2) is that there is no way, then, and since ext-plugins is something not recommended by Liferay, I wonder what is the best approach to accomplish the task of deleting the default Document Types.

Looking forward to reading some clarification.