Mercurial > dive4elements > framework
comparison artifacts/src/main/java/org/dive4elements/artifacts/CallMeta.java @ 471:1a87cb24a446
Moved directories to org.dive4elements
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 10:50:31 +0200 |
parents | artifacts/src/main/java/de/intevation/artifacts/CallMeta.java@933bbc9fc11f |
children | 415df0fc4fa1 |
comparison
equal
deleted
inserted
replaced
470:19cb9729bd17 | 471:1a87cb24a446 |
---|---|
1 /* | |
2 * Copyright (c) 2010 by Intevation GmbH | |
3 * | |
4 * This program is free software under the LGPL (>=v2.1) | |
5 * Read the file LGPL.txt coming with the software for details | |
6 * or visit http://www.gnu.org/licenses/ if it does not exist. | |
7 */ | |
8 | |
9 package de.intevation.artifacts; | |
10 | |
11 import java.util.Locale; | |
12 | |
13 /** | |
14 * Interface to inject meta data like languages to CallContexts. | |
15 * | |
16 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> | |
17 */ | |
18 public interface CallMeta | |
19 { | |
20 /** | |
21 * Returns a list of the languages the calling client is willing to accept. | |
22 * @return the list. | |
23 */ | |
24 PreferredLocale [] getLanguages(); | |
25 | |
26 /** | |
27 * Intersects the list of preferred client languages with a server | |
28 * given list and returns the one which is best fitting. | |
29 * @param locales The list of languages the server provides. | |
30 * @return The best fitting language. | |
31 */ | |
32 Locale getPreferredLocale(Locale [] locales); | |
33 } | |
34 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |