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.language;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import java.util.Locale;
020    import java.util.ResourceBundle;
021    
022    import javax.servlet.http.HttpServletRequest;
023    
024    /**
025     * @author Brian Wing Shun Chan
026     */
027    @ProviderType
028    public interface UnicodeLanguage {
029    
030            public String format(
031                    HttpServletRequest request, String pattern, LanguageWrapper argument);
032    
033            public String format(
034                    HttpServletRequest request, String pattern, LanguageWrapper argument,
035                    boolean translateArguments);
036    
037            public String format(
038                    HttpServletRequest request, String pattern,
039                    LanguageWrapper[] arguments);
040    
041            public String format(
042                    HttpServletRequest request, String pattern, LanguageWrapper[] arguments,
043                    boolean translateArguments);
044    
045            public String format(
046                    HttpServletRequest request, String pattern, Object argument);
047    
048            public String format(
049                    HttpServletRequest request, String pattern, Object argument,
050                    boolean translateArguments);
051    
052            public String format(
053                    HttpServletRequest request, String pattern, Object[] arguments);
054    
055            public String format(
056                    HttpServletRequest request, String pattern, Object[] arguments,
057                    boolean translateArguments);
058    
059            public String format(Locale locale, String pattern, Object argument);
060    
061            public String format(
062                    Locale locale, String pattern, Object argument,
063                    boolean translateArguments);
064    
065            public String format(Locale locale, String pattern, Object[] arguments);
066    
067            public String format(
068                    Locale locale, String pattern, Object[] arguments,
069                    boolean translateArguments);
070    
071            public String format(
072                    ResourceBundle resourceBundle, String pattern, Object argument);
073    
074            public String format(
075                    ResourceBundle resourceBundlee, String pattern, Object argument,
076                    boolean translateArguments);
077    
078            public String format(
079                    ResourceBundle resourceBundle, String pattern, Object[] arguments);
080    
081            public String format(
082                    ResourceBundle resourceBundle, String pattern, Object[] arguments,
083                    boolean translateArguments);
084    
085            public String get(HttpServletRequest request, String key);
086    
087            public String get(
088                    HttpServletRequest request, String key, String defaultValue);
089    
090            public String get(Locale locale, String key);
091    
092            public String get(Locale locale, String key, String defaultValue);
093    
094            public String get(ResourceBundle resourceBundle, String key);
095    
096            public String get(
097                    ResourceBundle resourceBundle, String key, String defaultValue);
098    
099            public String getTimeDescription(
100                    HttpServletRequest request, long milliseconds);
101    
102            public String getTimeDescription(
103                    HttpServletRequest request, Long milliseconds);
104    
105    }