List of usage examples for com.liferay.portal.kernel.service LayoutLocalServiceUtil deleteLayout
@Deprecated public static void deleteLayout(com.liferay.portal.kernel.model.Layout layout, boolean updateLayoutSet, ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
From source file:com.liferay.exportimport.test.LayoutSetPrototypePropagationTest.java
License:Open Source License
protected void doTestLayoutPropagation(boolean linkEnabled) throws Exception { setLinkEnabled(linkEnabled);/*from w ww . ja v a 2s . com*/ Layout layout = LayoutTestUtil.addLayout(_layoutSetPrototypeGroup, true); Assert.assertEquals(_initialPrototypeLayoutCount, getGroupLayoutCount()); propagateChanges(group); if (linkEnabled) { Assert.assertEquals(_initialPrototypeLayoutCount + 1, getGroupLayoutCount()); } else { Assert.assertEquals(_initialPrototypeLayoutCount, getGroupLayoutCount()); } LayoutLocalServiceUtil.deleteLayout(layout, true, ServiceContextTestUtil.getServiceContext()); if (linkEnabled) { Assert.assertEquals(_initialPrototypeLayoutCount + 1, getGroupLayoutCount()); } else { Assert.assertEquals(_initialPrototypeLayoutCount, getGroupLayoutCount()); } propagateChanges(group); Assert.assertEquals(_initialPrototypeLayoutCount, getGroupLayoutCount()); }
From source file:com.liferay.exportimport.test.util.lar.BaseExportImportTestCase.java
License:Open Source License
@Before public void setUp() throws Exception { group = GroupTestUtil.addGroup();/* w ww . j a v a 2 s . c om*/ importedGroup = GroupTestUtil.addGroup(); layout = LayoutTestUtil.addLayout(group); // Delete and readd to ensure a different layout ID (not ID or UUID). // See LPS-32132. LayoutLocalServiceUtil.deleteLayout(layout, true, new ServiceContext()); layout = LayoutTestUtil.addLayout(group); }