001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.exportimport.staging;
016    
017    import com.liferay.portal.kernel.util.ProxyFactory;
018    import com.liferay.portal.model.Group;
019    import com.liferay.portal.model.Layout;
020    import com.liferay.portal.model.LayoutRevision;
021    import com.liferay.portal.model.LayoutSet;
022    import com.liferay.portal.model.LayoutSetBranch;
023    import com.liferay.portal.model.LayoutSetStagingHandler;
024    import com.liferay.portal.model.LayoutStagingHandler;
025    
026    /**
027     * @author Raymond Aug??
028     */
029    public class LayoutStagingUtil {
030    
031            public static LayoutRevision getLayoutRevision(Layout layout) {
032                    return _layoutStaging.getLayoutRevision(layout);
033            }
034    
035            public static LayoutSetBranch getLayoutSetBranch(LayoutSet layoutSet) {
036                    return _layoutStaging.getLayoutSetBranch(layoutSet);
037            }
038    
039            public static LayoutSetStagingHandler getLayoutSetStagingHandler(
040                    LayoutSet layoutSet) {
041    
042                    return _layoutStaging.getLayoutSetStagingHandler(layoutSet);
043            }
044    
045            public static LayoutStagingHandler getLayoutStagingHandler(Layout layout) {
046                    return _layoutStaging.getLayoutStagingHandler(layout);
047            }
048    
049            public static boolean isBranchingLayout(Layout layout) {
050                    return _layoutStaging.isBranchingLayout(layout);
051            }
052    
053            public static boolean isBranchingLayoutSet(
054                    Group group, boolean privateLayout) {
055    
056                    return _layoutStaging.isBranchingLayoutSet(group, privateLayout);
057            }
058    
059            private static final LayoutStaging _layoutStaging =
060                    ProxyFactory.newServiceTrackedInstance(LayoutStaging.class);
061    
062    }