Examples of ResourceBundleFactory


Examples of org.jboss.portal.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.jboss.portal.common.i18n.ResourceBundleFactory

   {
      ResourceBundleManager bundleMgr = portletBundleMgrs.get(portletMD.getPortletName());
      if (bundleMgr == null)
      {
         String baseName = portletMD.getResourceBundle();
         ResourceBundleFactory rbf = new SimpleResourceBundleFactory(webApp.getClassLoader(), baseName);
         bundleMgr = new ResourceBundleManager(null, rbf);
         portletBundleMgrs.put(portletMD.getPortletName(), bundleMgr);
      }
      return bundleMgr;
   }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ResourceBundleFactory

  public static ResourceBundleFactory getResourceBundleFactory(final AbstractReportDefinition reportDefinition)
  {
    AbstractReportDefinition e = reportDefinition;
    while (e != null)
    {
      final ResourceBundleFactory base = e.getResourceBundleFactory();
      if (base != null)
      {
        return base;
      }
      final Section parentSection = e.getParentSection();
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ResourceBundleFactory

   *
   * @return the calendar.
   */
  protected Calendar getCalendar()
  {
    final ResourceBundleFactory rf = getResourceBundleFactory();
    return Calendar.getInstance(rf.getLocale());
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ResourceBundleFactory

      if (resourceId == null)
      {
        return null;
      }

      final ResourceBundleFactory resourceBundleFactory =
          runtime.getResourceBundleFactory();
      final ResourceBundle bundle =
          resourceBundleFactory.getResourceBundle(resourceId);
      if (bundle != null)
      {
        return bundle.getObject(svalue);
      }
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ResourceBundleFactory

      return null;
    }

    try
    {
      final ResourceBundleFactory resourceBundleFactory =
          runtime.getResourceBundleFactory();
      final ResourceBundle bundle =
          resourceBundleFactory.getResourceBundle(resourceId);

      // update the format string, if neccessary ...
      if (ObjectUtilities.equal(formatKey, appliedFormatKey) == false)
      {
        final String newFormatString = bundle.getString(formatKey);
        messageFormatSupport.setFormatString(newFormatString);
        appliedFormatKey = formatKey;
      }

      messageFormatSupport.setLocale(resourceBundleFactory.getLocale());
      return messageFormatSupport.performFormat(runtime.getDataRow());
    }
    catch (Exception e)
    {
      ResourceMessageFormatFilter.logger.info("Failed to format the value for resource-id " + resourceId, e);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ResourceBundleFactory

  {
    if (runtime == null)
    {
      return null;
    }
    final ResourceBundleFactory resourceBundleFactory =
        runtime.getResourceBundleFactory();
    final Locale newLocale = resourceBundleFactory.getLocale();
    if (ObjectUtilities.equal(newLocale, locale) == false)
    {
      messageFormatSupport.setLocale(resourceBundleFactory.getLocale());
      locale = newLocale;
    }
    return messageFormatSupport.performFormat(runtime.getDataRow());
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ResourceBundleFactory

   *
   * @return the formatted message.
   */
  public Object getValue()
  {
    final ResourceBundleFactory resourceBundleFactory = getResourceBundleFactory();
    final ResourceBundle bundle;
    if (resourceIdentifier == null)
    {
      bundle = ExpressionUtilities.getDefaultResourceBundle(this);
    }
    else
    {
      bundle = resourceBundleFactory.getResourceBundle(resourceIdentifier);
    }

    final String newFormatString = bundle.getString(formatKey);
    messageFormatSupport.setFormatString(newFormatString);
    messageFormatSupport.setLocale(resourceBundleFactory.getLocale());
    return messageFormatSupport.performFormat(getDataRow());
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ResourceBundleFactory

    if (fields.isEmpty())
    {
      return getPattern();
    }

    final ResourceBundleFactory factory = getResourceBundleFactory();
    if (messageFormat == null || ObjectUtilities.equal(locale, factory.getLocale()) == false)
    {
      messageFormat = new FastMessageFormat(getPattern(), factory.getLocale());
      this.locale = factory.getLocale();
    }

    try
    {
      if (oldFieldValues == null || oldFieldValues.length != fields.size())
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.ResourceBundleFactory

      return element.getAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.NULL_VALUE);
    }

    try
    {
      final ResourceBundleFactory resourceBundleFactory = runtime.getResourceBundleFactory();
      final ResourceBundle bundle = resourceBundleFactory.getResourceBundle(resourceId);
      if (bundle != null)
      {
        return bundle.getString(resourceKey);
      }
    }
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.