KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > portletcontainer > pci > model > Util


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 package org.exoplatform.services.portletcontainer.pci.model;
6
7 import java.util.List JavaDoc;
8
9 /**
10  * Jul 11, 2004
11  * @author: Tuan Nguyen
12  * @email: tuan08@users.sourceforge.net
13  * @version: $Id: Util.java,v 1.1 2004/07/13 02:31:13 tuan08 Exp $
14  */

15 public class Util {
16   
17     static public String JavaDoc getDescription(String JavaDoc lang, List JavaDoc descriptions) {
18         if (lang == null) return null;
19         lang = lang.toLowerCase();
20         for (int i = 0; i < descriptions.size(); i++) {
21             Description desc = (Description) descriptions.get(i);
22             String JavaDoc listLang = desc.getLang();
23             if (listLang != null) {
24                 if (lang.equals(desc.getLang().toLowerCase())) {
25                     return desc.getDescription() ;
26                 }
27             }
28         }
29         return null;
30     }
31 }
32
Popular Tags