Package org.pentaho.reporting.engine.classic.core

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


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

      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

      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

  {
    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

   *
   * @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

    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

      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

   *
   * @return the formatted message.
   */
  public Object getValue()
  {
    final ResourceBundleFactory resourceBundleFactory = getResourceBundleFactory();
    messageFormatSupport.setFormatString(pattern);
    messageFormatSupport.setLocale(resourceBundleFactory.getLocale());

    final String result;
    if (isUrlEncodeValues())
    {
      final EncodeDataRow dataRow = new EncodeDataRow();
View Full Code Here

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

    final ResourceBundleFactory resourceBundleFactory = getResourceBundleFactory();
    final ResourceBundle bundle;
    if (resourceIdentifier == null)
    {
      bundle = ExpressionUtilities.getDefaultResourceBundle(this);
    }
    else
    {
      bundle = resourceBundleFactory.getResourceBundle(resourceIdentifier);
    }
    return bundle.getObject(String.valueOf(key));
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.ResourceBundleFactory

Copyright © 2018 www.massapicom. 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.