Examples of ResourceBundleFactory


Examples of org.apache.pluto.driver.container.ResourceBundleFactory

        super.setUp();
        validDD = null;
    }

    public void testGetBundleAllSpecified() {
        ResourceBundleFactory factory = new ResourceBundleFactory(validDD, validDD.getPortletInfo());
        ResourceBundle bundle = factory.getResourceBundle(Locale.getDefault());

        Assert.assertEquals("Bundle Title", bundle.getString("javax.portlet.title"));
        Assert.assertEquals("Bundle Short Title", bundle.getString("javax.portlet.short-title"));
        Assert.assertEquals("Bundle Keywords", bundle.getString("javax.portlet.keywords"));
    }
View Full Code Here

Examples of org.apache.pluto.driver.container.ResourceBundleFactory

        Assert.assertEquals("Bundle Keywords", bundle.getString("javax.portlet.keywords"));
    }

    public void testGetResourceBundleNoBundle() {
        validDD.setResourceBundle(null);
        ResourceBundleFactory factory = new ResourceBundleFactory(validDD, validDD.getPortletInfo());
        ResourceBundle bundle = factory.getResourceBundle(Locale.getDefault());

        Assert.assertEquals("Info Title", bundle.getString("javax.portlet.title"));
        Assert.assertEquals("Info Short Title", bundle.getString("javax.portlet.short-title"));
        Assert.assertEquals("Info Keywords", bundle.getString("javax.portlet.keywords"));
    }
View Full Code Here

Examples of org.apache.pluto.driver.container.ResourceBundleFactory

        Assert.assertEquals("Info Short Title", bundle.getString("javax.portlet.short-title"));
        Assert.assertEquals("Info Keywords", bundle.getString("javax.portlet.keywords"));
    }

    public void testGetResourceBundleNoInfo() {
        ResourceBundleFactory factory = new ResourceBundleFactory(validDD, validDD.getPortletInfo());
        ResourceBundle bundle = factory.getResourceBundle(Locale.getDefault());

        Assert.assertEquals("Bundle Title", bundle.getString("javax.portlet.title"));
        Assert.assertEquals("Bundle Short Title", bundle.getString("javax.portlet.short-title"));
        Assert.assertEquals("Bundle Keywords", bundle.getString("javax.portlet.keywords"));
    }
View Full Code Here

Examples of org.apache.pluto.driver.container.ResourceBundleFactory

    public void testGetResourceBundleNoBundleNullValues() {
        validDD.setResourceBundle(null);
        validDD.getPortletInfo().setTitle(null);
        validDD.getPortletInfo().setShortTitle(null);
        validDD.getPortletInfo().setKeywords(null);
        ResourceBundleFactory factory = new ResourceBundleFactory(validDD, validDD.getPortletInfo());
        ResourceBundle bundle = factory.getResourceBundle(Locale.getDefault());

        try {
            Assert.assertEquals(null, bundle.getString("javax.portlet.title"));
            fail("Exception should have been thrown.");
        }
View Full Code Here

Examples of org.gatein.common.i18n.ResourceBundleFactory

   public ResourceBundleManager getBundleManager()
   {
      if (applicationBundleMgr == null)
      {
         String baseName = ((PortletApplication20MetaData)metaData).getResourceBundle();
         ResourceBundleFactory rbf = new SimpleResourceBundleFactory(webApp.getClassLoader(), baseName);
         applicationBundleMgr = new ResourceBundleManager(null, rbf);
      }
      return applicationBundleMgr;
   }
View Full Code Here

Examples of org.gatein.common.i18n.ResourceBundleFactory

   public ResourceBundleManager getBundleManager(PortletMetaData portletMD)
   {
      ResourceBundleManager bundleMgr = portletBundleMgrs.get(portletMD.getPortletName());
      if (bundleMgr == null)
      {
         ResourceBundleFactory rbf = null;
         String rbfName = metaData.getResourceBundleFactoryName();
         if (rbfName != null)
         {
            try
            {
View Full Code Here

Examples of org.gatein.common.i18n.ResourceBundleFactory

   public ResourceBundleManager getBundleManager()
   {
      if (applicationBundleMgr == null)
      {
         String baseName = ((PortletApplication20MetaData)metaData).getResourceBundle();
         ResourceBundleFactory rbf = new SimpleResourceBundleFactory(webApp.getClassLoader(), baseName);
         applicationBundleMgr = new ResourceBundleManager(null, rbf);
      }
      return applicationBundleMgr;
   }
View Full Code Here

Examples of org.gatein.common.i18n.ResourceBundleFactory

   public ResourceBundleManager getBundleManager(PortletMetaData portletMD)
   {
      ResourceBundleManager bundleMgr = portletBundleMgrs.get(portletMD.getPortletName());
      if (bundleMgr == null)
      {
         ResourceBundleFactory rbf = null;
         String rbfName = metaData.getResourceBundleFactoryName();
         if (rbfName != null)
         {
            try
            {
View Full Code Here

Examples of org.gatein.common.i18n.ResourceBundleFactory

   public ResourceBundleManager getBundleManager()
   {
      if (applicationBundleMgr == null)
      {
         String baseName = ((PortletApplication20MetaData)metaData).getResourceBundle();
         ResourceBundleFactory rbf = new SimpleResourceBundleFactory(webApp.getClassLoader(), baseName);
         applicationBundleMgr = new ResourceBundleManager(null, rbf);
      }
      return applicationBundleMgr;
   }
View Full Code Here

Examples of org.gatein.common.i18n.ResourceBundleFactory

   public ResourceBundleManager getBundleManager(PortletMetaData portletMD)
   {
      ResourceBundleManager bundleMgr = portletBundleMgrs.get(portletMD.getPortletName());
      if (bundleMgr == null)
      {
         ResourceBundleFactory rbf = null;
         String rbfName = metaData.getResourceBundleFactoryName();
         if (rbfName != null)
         {
            try
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.