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

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

Introduction

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

Prototype

public LayoutSetBranch getLayoutSetBranch() 

Source Link

Usage

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

License:Open Source License

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

    if (layoutSetStagingHandler == null) {
        return null;
    }//from w  ww .java2s .  com

    return layoutSetStagingHandler.getLayoutSetBranch();
}

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();
    }//  www  .  j av  a2 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;
}