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.kernel.servlet.taglib.ui; 016 017 import java.util.Locale; 018 019 /** 020 * Provides an interface defining categories that will be used by a specific 021 * <code>liferay-ui:form-navigator</code> tag instance to render a new category. 022 * Form navigator categories includes form navigator entries, defined by {@link 023 * FormNavigatorEntry} implementations. 024 * 025 * <p> 026 * Implementations must be registered in the OSGi Registry. The order of the 027 * form navigator categories is determined by the service ranking. 028 * </p> 029 * 030 * @author Sergio Gonz??lez 031 */ 032 public interface FormNavigatorCategory { 033 034 /** 035 * Returns the form navigator ID where the form navigator category will be 036 * included. This ID must match the ID attribute of the 037 * <code>liferay-ui:form-navigator</code> tag where this form navigator 038 * category is to be included. 039 * 040 * @return the form navigator ID where the form navigator category will be 041 * included 042 */ 043 public String getFormNavigatorId(); 044 045 /** 046 * Returns the key for the form navigator category. This key needs to be 047 * unique in the scope of a form navigator ID. 048 * 049 * <p> 050 * This key will be referred by the form navigator entries to be added to 051 * this form navigator category. 052 * </p> 053 * 054 * @return the key of the form navigator category 055 */ 056 public String getKey(); 057 058 /** 059 * Defines the label that will be displayed in the user interface when the 060 * form navigator category is included in the form navigator. 061 * 062 * @param locale the locale that the label should be retrieved for 063 * @return the label of the form navigator category 064 */ 065 public String getLabel(Locale locale); 066 067 }