Examples of ResourceBundleFactory


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

          {
            sformat.setDateFormatSymbols(new DateFormatSymbols(locale));
          }
          else
          {
            final ResourceBundleFactory factory = getResourceBundleFactory();
            sformat.setDateFormatSymbols(new DateFormatSymbols(factory.getLocale()));
          }
          format = sformat;
          dateFormat = sformat;
          lastLocale = localeUsed;
        }
View Full Code Here

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

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

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

    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

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

            { "format" , "$(date,date,yyyy-MM-dd'T'HH:mm:ss,SSSZZZ)" }
        };
      }
    };

    ResourceBundleFactory f = Mockito.mock(ResourceBundleFactory.class);
    Mockito.when(f.getLocale()).thenReturn(Locale.US);
    Mockito.when(f.getTimeZone()).thenReturn(TimeZone.getTimeZone("PST"));
    Mockito.when(f.getResourceBundle("test")).thenReturn(b);

    ProcessingContext pc = Mockito.mock(ProcessingContext.class);
    Mockito.when(pc.getResourceBundleFactory()).thenReturn(f);

    DataRow r = Mockito.mock(DataRow.class);
View Full Code Here

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

    if (raw == null)
    {
      return null;
    }
    final String text = String.valueOf(raw);
    final ResourceBundleFactory rf = getResourceBundleFactory();
    if (rf == null)
    {
      return text.toLowerCase();
    }
    else
    {
      return text.toLowerCase(rf.getLocale());
    }
  }
View Full Code Here

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

    if (raw == null)
    {
      return null;
    }
    final String text = String.valueOf(raw);
    final ResourceBundleFactory rf = getResourceBundleFactory();
    if (rf == null)
    {
      return text.toUpperCase();
    }
    else
    {
      return text.toUpperCase(rf.getLocale());
    }
  }
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

      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

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

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

    else
    {
      messageFormatFilter.setNullString(null);
    }

    final ResourceBundleFactory resourceBundleFactory = runtime.getResourceBundleFactory();
    final Locale newLocale = resourceBundleFactory.getLocale();
    if (ObjectUtilities.equal(newLocale, messageFormatFilter.getLocale()) == false)
    {
      messageFormatFilter.setLocale(newLocale);
    }
   
    final TimeZone newTimeZone = resourceBundleFactory.getTimeZone();
    if (ObjectUtilities.equal(newTimeZone, messageFormatFilter.getTimeZone()) == false)
    {
      messageFormatFilter.setTimeZone(newTimeZone);
    }
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.