001    /**
002     * Copyright (c) 2000-2012 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.blogs.template;
016    
017    import com.liferay.portal.kernel.language.LanguageUtil;
018    import com.liferay.portal.kernel.portletdisplaytemplate.BasePortletDisplayTemplateHandler;
019    import com.liferay.portal.kernel.util.PropsKeys;
020    import com.liferay.portal.kernel.util.StringPool;
021    import com.liferay.portal.util.PortalUtil;
022    import com.liferay.portal.util.PortletKeys;
023    import com.liferay.portlet.blogs.model.BlogsEntry;
024    
025    import java.util.Locale;
026    
027    /**
028     * @author Juan Fernández
029     */
030    public class BlogsPortletDisplayTemplateHandler
031            extends BasePortletDisplayTemplateHandler {
032    
033            public String getClassName() {
034                    return BlogsEntry.class.getName();
035            }
036    
037            public String getName(Locale locale) {
038                    String portletTitle = PortalUtil.getPortletTitle(
039                            PortletKeys.BLOGS, locale);
040    
041                    return portletTitle.concat(StringPool.SPACE).concat(
042                            LanguageUtil.get(locale, "template"));
043            }
044    
045            public String getResourceName() {
046                    return "com.liferay.portlet.blogs";
047            }
048    
049            @Override
050            protected String getTemplatesHelpKey() {
051                    return PropsKeys.BLOGS_DISPLAY_TEMPLATES_HELP;
052            }
053    
054    }