where liferay site will store in which table details will fetch?

白昼怎懂夜的黑 提交于 2019-12-25 00:47:04

问题


if we create site,organisation where it will store.i mean in which default table it will store.`Programmatically create organization site from site template

Create organization site

Organization organization = OrganizationLocalServiceUtil.addOrganization(creatorUserId, 0, name, createSite);

Fetch site templates

List<LayoutSetPrototype> layoutSetPrototypes =
LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypes(organization.getCompanyId());
LayoutSetPrototype customSiteTemplate = null;
// find CustomSiteTemplate
for (LayoutSetPrototype layoutSetPrototype : layoutSetPrototypes) {
    if (layoutSetPrototype.getName(Locale.ENGLISH)) .equalsIgnoreCase("CustomSiteTemplate") {
        customSiteTemplate = layoutSetPrototype;
        break;
    }
}

Assign site template(CustomSiteTemplate) pages to organization site.

if (customerSiteTemplate != null && organization != null) {
    LayoutSet layoutSet =
    LayoutSetLocalServiceUtil.getLayoutSet(organization.getGroupId(), true);
    layoutSet.setLayoutSetPrototypeLinkEnabled(true);
    layoutSet.setLayoutSetPrototypeUuid(customerSiteTemplate.getUuid());
    LayoutSetLocalServiceUtil.updateLayoutSet(layoutSet);
    // Merge Site template pages to organization site.
    SitesUtil.mergeLayoutSetPrototypeLayouts(organization.getGroup(),layoutSet);
}

`


回答1:


A non-answer to this question (albeit it's the only correct answer as well) is: You do not want to look at the database. Period. It's Liferay's database, and if you make any changes to it, you'll most likely wreak havoc - been there, done that.

A lengthy and more complete argument can be found here, trust me: We've seen quite a lot of problems caused by people who assumed they knew Liferay's database. Save yourself this hassle and resist from checking it out.



来源:https://stackoverflow.com/questions/45912516/where-liferay-site-will-store-in-which-table-details-will-fetch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!