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.util.StringPool;
018    import com.liferay.portal.model.PortletDecorator;
019    import com.liferay.portal.model.impl.PortletDecoratorImpl;
020    import com.liferay.portal.util.PropsValues;
021    
022    /**
023     * @author Eduardo Garcia
024     */
025    public class PortletDecoratorFactoryImpl implements PortletDecoratorFactory {
026    
027            @Override
028            public PortletDecorator getDefaultPortletDecorator() {
029                    return new PortletDecoratorImpl(
030                            getDefaultPortletDecoratorId(), StringPool.BLANK,
031                            getDefaultPortletDecoratorCssClass());
032            }
033    
034            @Override
035            public String getDefaultPortletDecoratorCssClass() {
036                    return PropsValues.DEFAULT_PORTLET_DECORATOR_CSS_CLASS;
037            }
038    
039            @Override
040            public String getDefaultPortletDecoratorId() {
041                    return PropsValues.DEFAULT_PORTLET_DECORATOR_ID;
042            }
043    
044            @Override
045            public PortletDecorator getPortletDecorator() {
046                    return new PortletDecoratorImpl();
047            }
048    
049            @Override
050            public PortletDecorator getPortletDecorator(String portletDecoratorId) {
051                    return new PortletDecoratorImpl(portletDecoratorId);
052            }
053    
054            @Override
055            public PortletDecorator getPortletDecorator(
056                    String portletDecoratorId, String name, String cssClass) {
057    
058                    return new PortletDecoratorImpl(portletDecoratorId, name, cssClass);
059            }
060    
061    }