KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > wsrp > utils > Utils


1 /*
2  * Copyright 2001-2003 The eXo platform SARL All rights reserved.
3  * Please look at license.txt in info directory for more license detail.
4  *
5  * Created on 17 janv. 2004
6  */

7 package org.exoplatform.services.wsrp.utils;
8
9 import org.exoplatform.services.wsrp.type.LocalizedString;
10 import org.exoplatform.services.wsrp.type.NamedString;
11
12 /**
13  * @author Mestrallet Benjamin
14  * benjmestrallet@users.sourceforge.net
15  */

16 public class Utils {
17
18   public static LocalizedString getLocalizedString(String JavaDoc value, String JavaDoc lang, String JavaDoc rn) {
19     LocalizedString tmp = new LocalizedString();
20     tmp.setValue(value);
21     tmp.setLang(lang);
22     tmp.setResourceName(rn);
23     return tmp;
24   }
25
26   public static LocalizedString getLocalizedString(String JavaDoc value, String JavaDoc lang) {
27     LocalizedString tmp = new LocalizedString();
28     tmp.setValue(value);
29     tmp.setLang(lang);
30     return tmp;
31   }
32
33   public static NamedString getNamesString(String JavaDoc name, String JavaDoc value){
34     NamedString tmp = new NamedString();
35     tmp.setName(name);
36     tmp.setValue(value);
37     return tmp;
38   }
39
40 }
41
Popular Tags