/* * NOTE FOR DEVELOPERS: * * Never modify or reference this class directly. All methods that expect a layout set branch model instance should use the {@link LayoutSetBranch} interface instead. */ @Override public void persist() { if (this.isNew()) { LayoutSetBranchLocalServiceUtil.addLayoutSetBranch(this); } else { LayoutSetBranchLocalServiceUtil.updateLayoutSetBranch(this); } }
protected LayoutRevision getLayoutRevision() throws Exception { Layout layout = LayoutTestUtil.addLayout(_group, false); ServiceContext serviceContext = ServiceContextTestUtil.getServiceContext(); LayoutSetBranch layoutSetBranch = LayoutSetBranchLocalServiceUtil.addLayoutSetBranch( TestPropsValues.getUserId(), _group.getGroupId(), false, RandomTestUtil.randomString(), RandomTestUtil.randomString(), true, 0, serviceContext); LayoutBranch layoutBranch = LayoutBranchLocalServiceUtil.getMasterLayoutBranch( layoutSetBranch.getLayoutSetBranchId(), layout.getPlid()); return LayoutRevisionLocalServiceUtil.getLayoutRevision( layoutSetBranch.getLayoutSetBranchId(), layoutBranch.getLayoutBranchId(), layout.getPlid()); }