ingo@100: /* ingo@100: * Copyright (c) 2010 by Intevation GmbH ingo@100: * ingo@100: * This program is free software under the LGPL (>=v2.1) ingo@100: * Read the file LGPL.txt coming with the software for details ingo@100: * or visit http://www.gnu.org/licenses/ if it does not exist. ingo@100: */ ingo@100: sascha@48: package de.intevation.artifacts; sascha@48: sascha@49: import java.util.Locale; sascha@49: sascha@48: /** sascha@48: * Interface to inject meta data like languages to CallContexts. sascha@48: * sascha@77: * @author Sascha L. Teichmann sascha@48: */ sascha@48: public interface CallMeta sascha@48: { sascha@78: /** sascha@78: * Returns a list of the languages the calling client is willing to accept. sascha@78: * @return the list. sascha@78: */ sascha@48: PreferredLocale [] getLanguages(); sascha@49: sascha@78: /** sascha@78: * Intersects the list of preferred client languages with a server sascha@78: * given list and returns the one which is best fitting. sascha@78: * @param locales The list of languages the server provides. sascha@78: * @return The best fitting language. sascha@78: */ sascha@49: Locale getPreferredLocale(Locale [] locales); sascha@48: } sascha@78: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :