Package pl.net.bluesoft.rnd.util.i18n.impl

Examples of pl.net.bluesoft.rnd.util.i18n.impl.PropertiesBasedI18NProvider


            ProcessToolRegistry registry = (ProcessToolRegistry) servletContext.getAttribute(ProcessToolRegistry.class.getName());

            final String providerId = "step-editor";
            if (!registry.hasI18NProvider(providerId)) {
                registry.registerI18NProvider(
                        new PropertiesBasedI18NProvider(new PropertyLoader() {
                            @Override
                            public InputStream loadProperty(String path) throws IOException {
                                return getClass().getClassLoader().getResourceAsStream(path);
                            }
                        }, providerId + "-messages"),
View Full Code Here


    final Bundle bundle = bundleHelper.getBundle();
    String[] properties = bundleHelper.getHeaderValues(I18N_PROPERTY);
    for (final String propertyFileName : properties) {
      String providerId = bundle.getBundleId() + File.separator + propertyFileName;
      if (eventType == Bundle.ACTIVE) {
        toolRegistry.registerI18NProvider(new PropertiesBasedI18NProvider(new PropertyLoader() {
          @Override
          public InputStream loadProperty(String path) throws IOException {
            return getBundleResourceStream(bundle, path);
          }
        }, propertyFileName), providerId);
View Full Code Here

              bundleHelper.getBundleResourceStream(basePath + "processtool-config.xml"),
              bundleHelper.getBundleResourceStream(basePath + "queues-config.xml"),
              bundleHelper.getBundleResourceStream(basePath + "processdefinition.png"),
              bundleHelper.getBundleResourceStream(basePath + "processdefinition-logo.png"));

          toolRegistry.registerI18NProvider(new PropertiesBasedI18NProvider(new PropertyLoader() {
            @Override
            public InputStream loadProperty(String path) throws IOException {
              return getBundleResourceStream(bundle, path);
            }
          }, "/" + processPackage.replace(".", SEPARATOR) + "/messages"), providerId);
View Full Code Here

                        bm.addStepClass(bundle.loadClass(className));
                    }
                }
                if (headerHelper.hasHeaderValues(I18N_PROPERTY)) {
                    for (String property : headerHelper.getHeaderValues(I18N_PROPERTY)) {
                        PropertiesBasedI18NProvider provider = new PropertiesBasedI18NProvider(new PropertyLoader() {
                            @Override
                            public InputStream loadProperty(String path) throws IOException {
                                return getBundleResourceStream(bundle, path);
                            }
                        }, property);
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.util.i18n.impl.PropertiesBasedI18NProvider

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.