001/* 002 * This library is part of OpenCms - 003 * the Open Source Content Management System 004 * 005 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com) 006 * 007 * This library is free software; you can redistribute it and/or 008 * modify it under the terms of the GNU Lesser General Public 009 * License as published by the Free Software Foundation; either 010 * version 2.1 of the License, or (at your option) any later version. 011 * 012 * This library is distributed in the hope that it will be useful, 013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 015 * Lesser General Public License for more details. 016 * 017 * For further information about Alkacon Software, please see the 018 * company website: http://www.alkacon.com 019 * 020 * For further information about OpenCms, please see the 021 * project website: http://www.opencms.org 022 * 023 * You should have received a copy of the GNU Lesser General Public 024 * License along with this library; if not, write to the Free Software 025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 026 */ 027 028package org.opencms.jsp.util; 029 030import java.util.Locale; 031 032/** 033 * Common interface for accessing formatter / resource type infos in JSPs. 034 */ 035public interface I_CmsFormatterInfo { 036 037 /** 038 * Gets the description in the given locale. 039 * 040 * @param l the locale to use 041 * @return the description 042 */ 043 String description(Locale l); 044 045 /** 046 * Gets the description in the current locale. 047 * 048 * @return the locale to use 049 */ 050 String getDescription(); 051 052 /** 053 * Returns the localization key for the description if one was used, and null otherwise. 054 * 055 * @return the localization key 056 */ 057 String getDescriptionKey(); 058 059 /** 060 * Gets the raw description, without resolving any macros. 061 * 062 * @return the raw description 063 */ 064 String getDescriptionRaw(); 065 066 /** 067 * Checks if this is active. 068 * 069 * @return true if this is active 070 */ 071 boolean getIsActive(); 072 073 /** 074 * Checks if this wraps a (non-function) formatter. 075 * 076 * @return true if this wraps a normal formatter 077 */ 078 boolean getIsFormatter(); 079 080 /** 081 * Checks if this wraps a dynamic function. 082 * 083 * @return true if this wraps a dynamic function 084 */ 085 boolean getIsFunction(); 086 087 /** 088 * Checks if this wraps a resource type. 089 * 090 * @return true if this is a resource type 091 */ 092 boolean getIsResourceType(); 093 094 /** 095 * Gets the name. 096 * 097 * @return the name 098 */ 099 String getName(); 100 101 /** 102 * Gets the nice name for the current locale. 103 * 104 * @return the nice name for the current locale 105 */ 106 String getNiceName(); 107 108 /** 109 * Gets the localization key for the nice name, if one was used, or null otherwise. 110 * 111 * @return the localization key 112 */ 113 String getNiceNameKey(); 114 115 /** 116 * Gets the raw nice name, without resolving any macros. 117 * 118 * @return the raw nice name 119 */ 120 String getNiceNameRaw(); 121 122 /** 123 * Gets the nice name in the given locale. 124 * 125 * @param l the locale to use 126 * @return the nice name for the locale 127 */ 128 String niceName(Locale l); 129 130}