001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.staging;
016    
017    import com.liferay.portal.model.Group;
018    import com.liferay.portal.model.Layout;
019    import com.liferay.portal.model.LayoutRevision;
020    import com.liferay.portal.model.LayoutStagingHandler;
021    
022    /**
023     * @author Raymond Augé
024     */
025    public class LayoutStagingUtil {
026    
027            public static LayoutRevision getLayoutRevision(Layout layout) {
028                    return getLayoutStaging().getLayoutRevision(layout);
029            }
030    
031            public static LayoutStaging getLayoutStaging() {
032                    return _layoutStaging;
033            }
034    
035            public static LayoutStagingHandler getLayoutStagingHandler(Layout layout) {
036                    return getLayoutStaging().getLayoutStagingHandler(layout);
037            }
038    
039            public static boolean isBranchingLayout(Layout layout) {
040                    return getLayoutStaging().isBranchingLayout(layout);
041            }
042    
043            public static boolean isBranchingLayoutSet(
044                    Group group, boolean privateLayout) {
045    
046                    return getLayoutStaging().isBranchingLayoutSet(group, privateLayout);
047            }
048    
049            public void setLayoutStaging(LayoutStaging layoutStaging) {
050                    _layoutStaging = layoutStaging;
051            }
052    
053            private static LayoutStaging _layoutStaging;
054    
055    }