Example usage for com.liferay.portal.kernel.service LayoutLocalServiceUtil updateLookAndFeel

List of usage examples for com.liferay.portal.kernel.service LayoutLocalServiceUtil updateLookAndFeel

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.service LayoutLocalServiceUtil updateLookAndFeel.

Prototype

public static com.liferay.portal.kernel.model.Layout updateLookAndFeel(long groupId, boolean privateLayout,
        long layoutId, String themeId, String colorSchemeId, String css)
        throws com.liferay.portal.kernel.exception.PortalException 

Source Link

Document

Updates the look and feel of the layout.

Usage

From source file:com.liferay.layout.service.test.LayoutServiceTest.java

License:Open Source License

@Test
public void testUpdateLayoutLookAndFeel() throws Exception {
    Layout layout = LayoutTestUtil.addLayout(_group);

    long userId = layout.getUserId();

    layout = LayoutLocalServiceUtil.updateLookAndFeel(_group.getGroupId(), false, layout.getLayoutId(),
            "test_WAR_testtheme", "01", StringPool.BLANK);

    LayoutTypePortlet layoutTypePortlet = (LayoutTypePortlet) layout.getLayoutType();

    layoutTypePortlet.setLayoutTemplateId(userId, "1_column", false);

    layout = LayoutLocalServiceUtil.updateLayout(layout);
}

From source file:eu.gerhards.liferay.services.angular.service.impl.AngularLayoutServiceImpl.java

License:Open Source License

@Override
public Layout updateLookAndFeel(long groupId, boolean privateLayout, long layoutId, String themeId,
        String colorSchemeId, String css) throws PortalException {
    _log.info("Updating look and feel of layout with id " + layoutId + " within group with id " + groupId);

    PortalPermissionUtil.check(getPermissionChecker(), AngularActionKeys.UPDATE_LAYOUT);

    _log.debug("    ... updating ...");

    com.liferay.portal.kernel.model.Layout layout = LayoutLocalServiceUtil.updateLookAndFeel(groupId,
            privateLayout, layoutId, themeId, colorSchemeId, css);

    return layout;
}