01: /*
02: * BEGIN_HEADER - DO NOT EDIT
03: *
04: * The contents of this file are subject to the terms
05: * of the Common Development and Distribution License
06: * (the "License"). You may not use this file except
07: * in compliance with the License.
08: *
09: * You can obtain a copy of the license at
10: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
11: * See the License for the specific language governing
12: * permissions and limitations under the License.
13: *
14: * When distributing Covered Code, include this CDDL
15: * HEADER in each file and include the License file at
16: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
17: * If applicable add the following below this CDDL HEADER,
18: * with the fields enclosed by brackets "[]" replaced with
19: * your own identifying information: Portions Copyright
20: * [year] [name of copyright owner]
21: */
22:
23: /*
24: * @(#)StringTranslator.java
25: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
26: *
27: * END_HEADER - DO NOT EDIT
28: */
29: package com.sun.jbi;
30:
31: /**
32: * This is the interface to the String Translator, which provides services
33: * for internationalization of messages to all services running inside the
34: * JBI environment.
35: *
36: * @author Sun Microsystems, Inc.
37: */
38: public interface StringTranslator {
39: /**
40: * Get a localized string using the specified resource key.
41: * @param key the key to the localized string in the resource bundle.
42: * @return the localized string.
43: */
44: String getString(String key);
45:
46: /**
47: * Get a localized string using the specified resource key. Handle one
48: * message insert.
49: * @param key the key to the localized string in the resource bundle.
50: * @param insert1 the message insert.
51: * @return the localized string formatted with the message insert.
52: */
53: String getString(String key, Object insert1);
54:
55: /**
56: * Get a localized string using the specified resource key. Handle two
57: * message inserts.
58: * @param key the key to the localized string in the resource bundle.
59: * @param insert1 the first message insert.
60: * @param insert2 the second message insert.
61: * @return the localized string formatted with the message inserts.
62: */
63: String getString(String key, Object insert1, Object insert2);
64:
65: /**
66: * Get a localized string using the specified resource key. Handle three
67: * message inserts.
68: * @param key the key to the localized string in the resource bundle.
69: * @param insert1 the first message insert.
70: * @param insert2 the second message insert.
71: * @param insert3 the third message insert.
72: * @return the localized string formatted with the message inserts.
73: */
74: String getString(String key, Object insert1, Object insert2,
75: Object insert3);
76:
77: /**
78: * Get a localized string using the specified resource key. Handle four
79: * message inserts.
80: * @param key the key to the localized string in the resource bundle.
81: * @param insert1 the first message insert.
82: * @param insert2 the second message insert.
83: * @param insert3 the third message insert.
84: * @param insert4 the fourth message insert.
85: * @return the localized string formatted with the message inserts.
86: */
87: String getString(String key, Object insert1, Object insert2,
88: Object insert3, Object insert4);
89:
90: /**
91: * Get a localized string using the specified resource key. Handle any
92: * number of message inserts.
93: * @param key the key to the localized string in the resource bundle.
94: * @param inserts the array of message inserts.
95: * @return the localized string formatted with the message inserts.
96: */
97: String getString(String key, Object[] inserts);
98:
99: }
|