List of usage examples for com.liferay.portal.kernel.model LayoutSetBranchConstants MASTER_BRANCH_NAME
String MASTER_BRANCH_NAME
To view the source code for com.liferay.portal.kernel.model LayoutSetBranchConstants MASTER_BRANCH_NAME.
Click Source Link
From source file:com.liferay.staging.test.StagingImplTest.java
License:Open Source License
protected void enableLocalStaging(boolean branching) throws Exception { ServiceContext serviceContext = ServiceContextTestUtil.getServiceContext(_group.getGroupId()); Map<String, Serializable> attributes = serviceContext.getAttributes(); attributes.putAll(ExportImportConfigurationParameterMapFactory.buildParameterMap()); if (branching) { serviceContext.setSignedIn(true); }// w w w . j a v a 2s .c om ServiceContextThreadLocal.pushServiceContext(serviceContext); enableLocalStaging(branching, serviceContext); ServiceContextThreadLocal.popServiceContext(); if (!branching) { return; } UnicodeProperties typeSettingsProperties = _group.getTypeSettingsProperties(); Assert.assertTrue(GetterUtil.getBoolean(typeSettingsProperties.getProperty("branchingPrivate"))); Assert.assertTrue(GetterUtil.getBoolean(typeSettingsProperties.getProperty("branchingPublic"))); Group stagingGroup = _group.getStagingGroup(); LayoutSetBranch layoutSetBranch = LayoutSetBranchLocalServiceUtil.fetchLayoutSetBranch( stagingGroup.getGroupId(), false, LayoutSetBranchConstants.MASTER_BRANCH_NAME); Assert.assertNotNull(layoutSetBranch); layoutSetBranch = LayoutSetBranchLocalServiceUtil.fetchLayoutSetBranch(stagingGroup.getGroupId(), true, LayoutSetBranchConstants.MASTER_BRANCH_NAME); Assert.assertNotNull(layoutSetBranch); }