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.portal.theme;
016    
017    import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
018    import com.liferay.portal.model.PortletDecorator;
019    
020    /**
021     * @author Eduardo Garcia
022     */
023    public class PortletDecoratorFactoryUtil {
024    
025            public static PortletDecorator getDefaultPortletDecorator() {
026                    return getPortletDecoratorFactory().getDefaultPortletDecorator();
027            }
028    
029            public static String getDefaultPortletDecoratorCssClass() {
030                    return getPortletDecoratorFactory().
031                            getDefaultPortletDecoratorCssClass();
032            }
033    
034            public static String getDefaultPortletDecoratorId() {
035                    return getPortletDecoratorFactory().getDefaultPortletDecoratorId();
036            }
037    
038            public static PortletDecorator getPortletDecorator() {
039                    return getPortletDecoratorFactory().getPortletDecorator();
040            }
041    
042            public static PortletDecorator getPortletDecorator(
043                    String portletDecoratorId) {
044    
045                    return getPortletDecoratorFactory().getPortletDecorator(
046                            portletDecoratorId);
047            }
048    
049            public static PortletDecorator getPortletDecorator(
050                    String portletDecoratorId, String name, String cssClass) {
051    
052                    return getPortletDecoratorFactory().getPortletDecorator(
053                            portletDecoratorId, name, cssClass);
054            }
055    
056            public static PortletDecoratorFactory getPortletDecoratorFactory() {
057                    PortalRuntimePermission.checkGetBeanProperty(
058                            PortletDecoratorFactoryUtil.class);
059    
060                    return _portletDecoratorFactory;
061            }
062    
063            public void setPortletDecoratorFactory(
064                    PortletDecoratorFactory portletDecoratorFactory) {
065    
066                    PortalRuntimePermission.checkSetBeanProperty(getClass());
067    
068                    _portletDecoratorFactory = portletDecoratorFactory;
069            }
070    
071            private static PortletDecoratorFactory _portletDecoratorFactory;
072    
073    }