留言板

Creating a new portal instance programmatically

Pepe Perez,修改在9 年前。

Creating a new portal instance programmatically

New Member 帖子: 14 加入日期: 12-9-18 最近的帖子
Hi,

When I create a new portal instance via the class CompanyLocalServiceUtil (method "addCompany"), should I call also the method "initCompany" of the class PortalInstances? I've seen that the admin portlet invokes it after creating a new instance, but in my case I'm doing it from a startup event in a hook, and apparently I don't have access to the servlet context, am I wrong?

Thank you in advance,

Best regards.
thumbnail
David H Nebinger,修改在9 年前。

RE: Creating a new portal instance programmatically

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
I would grab one of the zoe projects from marketplace. I believe they create a new company when started to create pages, etc, but not affect the portal they are being deployed into.
Pepe Perez,修改在9 年前。

RE: Creating a new portal instance programmatically

New Member 帖子: 14 加入日期: 12-9-18 最近的帖子
Ok, I'll take a look at it.

Thank you very much David.

Cheers.
thumbnail
Orin Fink,修改在9 年前。

RE: Creating a new portal instance programmatically

Junior Member 帖子: 65 加入日期: 10-3-25 最近的帖子
It looks like they are using the resources importer portlet to create the pages etc. However, I don't see that they are creating a new Portal Instance as the post is looking to achieve. Can you confirm that the zoe themes are actually doing this?