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.servlet.taglib.ui;
016    
017    import com.liferay.portal.kernel.language.LanguageUtil;
018    import com.liferay.portal.kernel.servlet.taglib.ui.BaseJSPFormNavigatorEntry;
019    import com.liferay.portal.kernel.spring.osgi.OSGiBeanProperties;
020    
021    import java.util.Locale;
022    
023    /**
024     * @author Sergio Gonz??lez
025     */
026    @OSGiBeanProperties
027    public class DeprecatedFormNavigatorEntry
028            extends BaseJSPFormNavigatorEntry<Object> {
029    
030            public DeprecatedFormNavigatorEntry(
031                    String key, String label, String categoryKey, String formNavigatorId,
032                    String jspPath) {
033    
034                    _key = key;
035                    _label = label;
036                    _categoryKey = categoryKey;
037                    _formNavigatorId = formNavigatorId;
038                    _jspPath = jspPath;
039            }
040    
041            @Override
042            public String getCategoryKey() {
043                    return _categoryKey;
044            }
045    
046            @Override
047            public String getFormNavigatorId() {
048                    return _formNavigatorId;
049            }
050    
051            @Override
052            public String getKey() {
053                    return _key;
054            }
055    
056            @Override
057            public String getLabel(Locale locale) {
058                    return LanguageUtil.get(locale, _label);
059            }
060    
061            @Override
062            protected String getJspPath() {
063                    return _jspPath;
064            }
065    
066            private final String _categoryKey;
067            private final String _formNavigatorId;
068            private final String _jspPath;
069            private final String _key;
070            private final String _label;
071    
072    }