Example usage for com.liferay.portal.kernel.model LayoutSetStagingHandler getLayoutSet

List of usage examples for com.liferay.portal.kernel.model LayoutSetStagingHandler getLayoutSet

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.model LayoutSetStagingHandler getLayoutSet.

Prototype

public LayoutSet getLayoutSet() 

Source Link

Usage

From source file:com.liferay.exportimport.staging.LayoutStagingImpl.java

License:Open Source License

@Override
public LayoutSet mergeLayoutSetRevisionIntoLayoutSet(LayoutSet layoutSet) {
    LayoutSetStagingHandler layoutSetStagingHandler = getLayoutSetStagingHandler(layoutSet);

    if (layoutSetStagingHandler == null) {
        return (LayoutSet) layoutSet.clone();
    }//  w w  w .  j a v a 2 s .  c  o  m

    layoutSet = layoutSetStagingHandler.getLayoutSet();
    layoutSet = (LayoutSet) layoutSet.clone();

    LayoutSetBranch layoutSetBranch = layoutSetStagingHandler.getLayoutSetBranch();

    layoutSet.setLogoId(layoutSetBranch.getLogoId());
    layoutSet.setThemeId(layoutSetBranch.getThemeId());
    layoutSet.setColorSchemeId(layoutSetBranch.getColorSchemeId());
    layoutSet.setCss(layoutSetBranch.getCss());
    layoutSet.setSettings(layoutSetBranch.getSettings());
    layoutSet.setLayoutSetPrototypeUuid(layoutSetBranch.getLayoutSetPrototypeUuid());
    layoutSet.setLayoutSetPrototypeLinkEnabled(layoutSetBranch.isLayoutSetPrototypeLinkEnabled());

    return layoutSet;
}