List of usage examples for com.liferay.portal.kernel.service LayoutSetPrototypeLocalServiceUtil getLayoutSetPrototypeByUuidAndCompanyId
public static com.liferay.portal.kernel.model.LayoutSetPrototype getLayoutSetPrototypeByUuidAndCompanyId( String uuid, long companyId) throws com.liferay.portal.kernel.exception.PortalException
From source file:com.liferay.layout.set.prototype.exportimport.test.LayoutSetPrototypeExportImportTest.java
License:Open Source License
protected void exportImportLayoutSetPrototype(boolean layoutPrototype) throws Exception { // Exclude default site templates LayoutSetPrototypeLocalServiceUtil.deleteLayoutSetPrototypes(); LayoutSetPrototype exportedLayoutSetPrototype = LayoutTestUtil .addLayoutSetPrototype(RandomTestUtil.randomString()); Group exportedLayoutSetPrototypeGroup = exportedLayoutSetPrototype.getGroup(); if (layoutPrototype) { LayoutPrototype exportedLayoutPrototype = LayoutTestUtil .addLayoutPrototype(RandomTestUtil.randomString()); LayoutTestUtil.addLayout(exportedLayoutSetPrototypeGroup, true, exportedLayoutPrototype, true); } else {//from w ww .j a v a 2 s . c o m LayoutTestUtil.addLayout(exportedLayoutSetPrototypeGroup, true); } exportImportPortlet(LayoutSetPrototypePortletKeys.LAYOUT_SET_PROTOTYPE); LayoutSetPrototype importedLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil .getLayoutSetPrototypeByUuidAndCompanyId(exportedLayoutSetPrototype.getUuid(), exportedLayoutSetPrototype.getCompanyId()); Group importedLayoutSetPrototypeGroup = importedLayoutSetPrototype.getGroup(); Assert.assertEquals(exportedLayoutSetPrototypeGroup.getPrivateLayoutsPageCount(), importedLayoutSetPrototypeGroup.getPrivateLayoutsPageCount()); }