Package java.util

Examples of java.util.ResourceBundle.containsKey()


                bundle = getBundle(bundleId, locale, false);
            } else {
                bundle = getBundle(loggerName, locale, true);
            }
        }
        String msgPattern = (bundle == null || !bundle.containsKey(messagePattern)) ?
            messagePattern : bundle.getString(messagePattern);
        return format(msgPattern, args);
    }

    /**
 
View Full Code Here


    catch (MissingResourceException e) {
      // ErraiService is optional!
      return;
    }

    if (erraiServiceConfig.containsKey(ERRAI_CDI_STANDALONE)) {
      boolean standalone = "true".equals(erraiServiceConfig.getString(ERRAI_CDI_STANDALONE).trim());

      if (standalone) {
        log.info("errai cdi running in standalone mode.");
      }
View Full Code Here

        log.info("errai cdi running as regular extension.");
      }
    }

    final String dispatchImplKey = "errai.dispatcher_implementation";
    if (erraiServiceConfig.containsKey(dispatchImplKey)) {
      if (AsyncDispatcher.class.getName().equals(erraiServiceConfig.getString(dispatchImplKey))) {
        throw new ErraiBootstrapFailure("Cannot start Errai CDI. You have have configured the service to use the " +
                  AsyncDispatcher.class.getName()
            + " dispatcher implementation. Due to limitations of Weld, you must use the " +
                  SimpleDispatcher.class.getName() + " in order to use this module.");
View Full Code Here

    static String getMessageId(LogRecord lr) {
        String msg = lr.getMessage();
        if (msg != null && !msg.isEmpty()) {
          ResourceBundle rb = lr.getResourceBundle();
          if (rb != null) {       
            if (rb.containsKey(msg)) {
              String msgBody = lr.getResourceBundle().getString(msg);
              if (!msgBody.isEmpty()) {
                return msg;
              }
            }
View Full Code Here

  private static String getString(final String bundleName, final Locale locale, final String key)
  {
    try {
      final ResourceBundle bundle = getResourceBundle(bundleName, locale);
      if (bundle.containsKey(key) == true) {
        return bundle.getString(key);
      }
    } catch (final Exception ex) {
      log.warn("Resource key '" + key + "' not found for locale '" + locale + "'");
    }
View Full Code Here

    catch (MissingResourceException e) {
      // ErraiService is optional!
      return;
    }

    if (erraiServiceConfig.containsKey(ERRAI_CDI_STANDALONE)) {
      boolean standalone = "true".equals(erraiServiceConfig.getString(ERRAI_CDI_STANDALONE).trim());

      if (standalone) {
        log.info("errai cdi running in standalone mode.");
      }
View Full Code Here

        log.info("errai cdi running as regular extension.");
      }
    }

    final String dispatchImplKey = "errai.dispatcher_implementation";
    if (erraiServiceConfig.containsKey(dispatchImplKey)) {
      if (AsyncDispatcher.class.getName().equals(erraiServiceConfig.getString(dispatchImplKey))) {
        throw new ErraiBootstrapFailure("Cannot start Errai CDI. You have have configured the service to use the " +
                AsyncDispatcher.class.getName()
                + " dispatcher implementation. Due to limitations of Weld, you must use the " +
                SimpleDispatcher.class.getName() + " in order to use this module.");
View Full Code Here


    try {
      log.info("configuring Errai CDI");
      ResourceBundle erraiServiceConfig = getBundle("ErraiService");
      if (erraiServiceConfig.containsKey(ERRAI_CDI_STANDALONE)) {
        standalone = "true".equals(erraiServiceConfig.getString(ERRAI_CDI_STANDALONE).trim());

        if (standalone) {
          log.info("Errai CDI running in standalone mode.");
        }
View Full Code Here

          log.info("Errai CDI running in add-on mode.");
        }
      }

      final String dispatchImplKey = "errai.dispatcher_implementation";
      if (erraiServiceConfig.containsKey(dispatchImplKey)) {
        if (AsyncDispatcher.class.getName().equals(erraiServiceConfig.getString(dispatchImplKey))) {
          throw new ErraiBootstrapFailure("Cannot start Errai CDI. You have have configured the service to use the " +
                  AsyncDispatcher.class.getName() + " dispatcher implementation. Due to limitations of Weld, you must use the " +
                  SimpleDispatcher.class.getName() + " in order to use this module.");
        }
View Full Code Here

   
    if(resourceBundle != null)
    {
      try
      {
        if(resourceBundle.containsKey(key)) 
          value = resourceBundle.getString(key);
        else
          value = getLocalizedSystemString(locale, key, true);
      }
      catch (MissingResourceException e)
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.