KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > j2biz > blogunity > i18n > I18NStatusFactory


1 /*
2  * $Id: I18NStatusFactory.java,v 1.3 2004/12/28 18:00:47 michelson Exp $
3  *
4  * Copyright (c) 2004 j2biz Group, http://www.j2biz.com Koeln / Duesseldorf ,
5  * Germany
6  *
7  * @author Max Kalina
8  *
9  *
10  * This program is free software; you can redistribute it and/or modify it under
11  * the terms of the GNU General Public License as published by the Free Software
12  * Foundation; either version 2 of the License, or (at your option) any later
13  * version.
14  *
15  * This program is distributed in the hope that it will be useful, but WITHOUT
16  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License along with
21  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
22  * Place, Suite 330, Boston, MA 02111-1307 USA
23  *
24  */

25
26 package com.j2biz.blogunity.i18n;
27
28 public class I18NStatusFactory {
29
30     public static I18NStatus create(String JavaDoc i18nKey) {
31         return new I18NStatusImpl(i18nKey);
32     }
33
34     public static I18NStatus create(String JavaDoc i18nKey, Throwable JavaDoc t) {
35         return new I18NStatusImpl(i18nKey, t);
36     }
37
38     public static I18NStatus create(String JavaDoc i18nKey, String JavaDoc[] parameters) {
39         return new I18NStatusImpl(i18nKey, parameters);
40     }
41
42     public static I18NStatus create(String JavaDoc i18nKey, String JavaDoc[] parameters, Throwable JavaDoc t) {
43         return new I18NStatusImpl(i18nKey, parameters, t);
44     }
45
46     public static I18NStatus create(String JavaDoc i18nKey, String JavaDoc parameter) {
47         return new I18NStatusImpl(i18nKey, new String JavaDoc[]{parameter});
48     }
49
50     public static I18NStatus create(String JavaDoc i18nKey, String JavaDoc parameter, Throwable JavaDoc t) {
51         return new I18NStatusImpl(i18nKey, new String JavaDoc[]{parameter}, t);
52     }
53
54     public static I18NStatus createUnknown() {
55         return create(I18N.ERRORS.UNKNOWN);
56     }
57
58     public static I18NStatus createUnknown(Throwable JavaDoc t) {
59         return create(I18N.ERRORS.UNKNOWN, t);
60     }
61
62 }
Popular Tags