1 9 package org.jboss.portal.portlet.plugins.language; 10 11 import java.util.ArrayList ; 12 import java.util.List ; 13 import java.util.ListResourceBundle ; 14 15 import org.apache.log4j.Logger; 16 import org.jboss.portal.portlet.PortletConstants; 17 import org.jboss.portal.portlet.metadata.LanguagesMetaData; 18 19 25 public class InfoBundle extends ListResourceBundle 26 { 27 28 private static final Logger log = Logger.getLogger(InfoBundle.class); 29 30 private final Object [][] content; 31 32 public InfoBundle(LanguagesMetaData.InfoMetaData metaData) 33 { 34 log.debug("Creates the parent bundle"); 35 36 List list = new ArrayList (3); 38 list.add(new Object []{PortletConstants.PORTLET_TITLE, metaData.getTitle()}); 39 40 if (metaData.getShortTitle() != null) 42 { 43 list.add(new Object []{PortletConstants.PORTLET_SHORT_TITLE, metaData.getShortTitle()}); 44 } 45 46 if (metaData.getKeywords() != null) 48 { 49 list.add(new Object []{PortletConstants.PORTLET_KEYWORDS, metaData.getKeywords()}); 50 } 51 52 content = (Object [][])list.toArray(new Object [list.size()][]); 54 } 55 56 protected Object [][] getContents() 57 { 58 return content; 59 } 60 } 61 | Popular Tags |