001
014
015 package com.liferay.portal.service.impl;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.model.LayoutRevision;
020 import com.liferay.portal.model.LayoutSetBranch;
021 import com.liferay.portal.security.permission.ActionKeys;
022 import com.liferay.portal.service.ServiceContext;
023 import com.liferay.portal.service.base.LayoutRevisionServiceBaseImpl;
024 import com.liferay.portal.service.permission.GroupPermissionUtil;
025
026
030 public class LayoutRevisionServiceImpl extends LayoutRevisionServiceBaseImpl {
031
032 public LayoutRevision addLayoutRevision(
033 long userId, long layoutSetBranchId, long layoutBranchId,
034 long parentLayoutRevisionId, boolean head, long plid,
035 long portletPreferencesPlid, boolean privateLayout, String name,
036 String title, String description, String keywords, String robots,
037 String typeSettings, boolean iconImage, long iconImageId,
038 String themeId, String colorSchemeId, String wapThemeId,
039 String wapColorSchemeId, String css, ServiceContext serviceContext)
040 throws PortalException, SystemException {
041
042 LayoutSetBranch layoutSetBranch =
043 layoutSetBranchPersistence.findByPrimaryKey(layoutSetBranchId);
044
045 GroupPermissionUtil.check(
046 getPermissionChecker(), layoutSetBranch.getGroupId(),
047 ActionKeys.ADD_LAYOUT_BRANCH);
048
049 return layoutRevisionLocalService.addLayoutRevision(
050 userId, layoutSetBranchId, layoutBranchId, parentLayoutRevisionId,
051 head, plid, portletPreferencesPlid, privateLayout, name, title,
052 description, keywords, robots, typeSettings, iconImage, iconImageId,
053 themeId, colorSchemeId, wapThemeId, wapColorSchemeId, css,
054 serviceContext);
055 }
056
057 }