01: /* Copyright 2005 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05: package org.jasig.portal.channels.adminnav;
06:
07: import java.util.Locale;
08:
09: /**
10: * Provides a callback mechanism for the admin nav channel to aquire a
11: * localized version of a lable for a registered link exposed in its interface.
12: *
13: * @author mboyd@sungardsct.com
14: *
15: */
16: public interface ILabelResolver {
17: /**
18: * Returns the localized label for the given label identifier and locale
19: * or null if one is not found.
20: *
21: * @param labelId
22: * @param locale
23: * @return String localized label
24: */
25: public String getLabel(String labelId, Locale locale);
26:
27: /**
28: * Returns any information in String form that would assist in identifying
29: * how the implementing resolver were configured. This method is typically
30: * called when no label was available for a given labelId as part of
31: * providing a label that provides troubleshooting semantics. Typically,
32: * such a label will consist of the following concatenated information:
33: * <pre>
34: * "???" +
35: * <resolver class name> +
36: * "{" + <resolver external form> + "}" +
37: * "[" + <labelId> + "]"
38: * </pre>
39: * The external form and wrapping braces are only included if this method
40: * returns a non-null, non-empty String.
41: *
42: * @return String reslver configuration
43: */
44: public String getExternalForm();
45: }
|