You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by pl...@apache.org on 2016/09/06 17:18:41 UTC
[45/50] [abbrv] incubator-tamaya-sandbox git commit: Modulularized UI
module, added multi file based i18n, using config mechanisms.
Modulularized UI module, added multi file based i18n, using config mechanisms.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/commit/a83105bc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/tree/a83105bc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/diff/a83105bc
Branch: refs/heads/master
Commit: a83105bc151ba836c7b43fb6d1073ad1ab3a3224
Parents: 043a255
Author: anatole <an...@apache.org>
Authored: Sat Apr 16 08:25:46 2016 +0200
Committer: anatole <an...@apache.org>
Committed: Tue Apr 19 13:53:44 2016 +0200
----------------------------------------------------------------------
.../java/org/apache/tamaya/ui/ViewProvider.java | 66 +++++++
.../ConfigurationBasedMessageProvider.java | 174 +++++++++++++++++++
.../ui/internal/ConfiguredMessageProvider.java | 61 +++++++
.../internal/ResourceBundleMessageProvider.java | 91 ++++++++++
.../tamaya/ui/internal/URLPropertySource.java | 60 +++++++
.../tamaya/ui/services/MessageProvider.java | 43 +++++
.../apache/tamaya/ui/services/UserService.java | 30 ++++
.../services/org.apache.tamaya.ui.ViewProvider | 21 +++
...rg.apache.tamaya.ui.services.MessageProvider | 19 ++
ui/src/main/resources/ui/lang/tamaya.properties | 28 +++
10 files changed, 593 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a83105bc/ui/src/main/java/org/apache/tamaya/ui/ViewProvider.java
----------------------------------------------------------------------
diff --git a/ui/src/main/java/org/apache/tamaya/ui/ViewProvider.java b/ui/src/main/java/org/apache/tamaya/ui/ViewProvider.java
new file mode 100644
index 0000000..35990ab
--- /dev/null
+++ b/ui/src/main/java/org/apache/tamaya/ui/ViewProvider.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.ui;
+
+import com.vaadin.navigator.View;
+
+/**
+ * Interface to register Tamaya UI parts. For priorization also use the @Priority annotations.
+ */
+public interface ViewProvider {
+
+ /**
+ * View lifecycle options that determine when a view is created and how long an instance is used.
+ */
+ enum ViewLifecycle {
+ /** Creates a new view instance whenever the view is showed. */
+ CREATE,
+ /** Loads the view on first access. */
+ LAZY,
+ /** Eagerly preloads the view. */
+ EAGER
+ }
+
+ /**
+ * Get the view lifecycle model.
+ * @return the lifecycle model, not null.
+ */
+ ViewLifecycle getLifecycle();
+
+ /**
+ * Get the url pattern where this view should be accessible.
+ * @return the url pattern, not null.
+ */
+ String getUrlPattern();
+
+ /**
+ * Get the name to be displayed for this view. This value will also be used to lookup a name from the {@code /ui/lang/tamaya}
+ * bundle. If not found the value returned will be used for display.
+ *
+ * @return the name to be displayed, or its resource bundle key, not null.
+ */
+ String getDisplayName();
+
+ /**
+ * Method that is called to create a new view instance.
+ * @see #getLifecycle()
+ * @return a new view instance, not null.
+ */
+ View createView();
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a83105bc/ui/src/main/java/org/apache/tamaya/ui/internal/ConfigurationBasedMessageProvider.java
----------------------------------------------------------------------
diff --git a/ui/src/main/java/org/apache/tamaya/ui/internal/ConfigurationBasedMessageProvider.java b/ui/src/main/java/org/apache/tamaya/ui/internal/ConfigurationBasedMessageProvider.java
new file mode 100644
index 0000000..99521c4
--- /dev/null
+++ b/ui/src/main/java/org/apache/tamaya/ui/internal/ConfigurationBasedMessageProvider.java
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.ui.internal;
+
+import org.apache.tamaya.ConfigurationProvider;
+import org.apache.tamaya.spi.ConfigurationContext;
+import org.apache.tamaya.spi.ConfigurationContextBuilder;
+import org.apache.tamaya.spisupport.BasePropertySource;
+import org.apache.tamaya.spisupport.DefaultConfiguration;
+import org.apache.tamaya.ui.services.MessageProvider;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Component resolving messages for being shown in the UI, based on the ResourceBundle mechanisms.
+ * The baseName used can optionally be configured by setting {@code tamaya.ui.baseName} either as system property,
+ * environment property or Tamaya configuration. Be aware that the JDK resource bundle mechanism only reads
+ * the first property file on the classpath (or a corresponding class file implementing ResourceBundle).
+ */
+public final class ConfigurationBasedMessageProvider implements MessageProvider{
+
+ /**
+ * The property name for configuring the resource bundle's base name either as
+ * system property, environment property or configuration entry.
+ */
+ private static final String TAMAYA_UI_BASE_NAME = "tamaya.ui.baseName";
+
+ private final String baseName = evaluateBaseName();
+
+ private Map<String, Map<String,String>> propertiesCache = new ConcurrentHashMap<>();
+
+
+ /**
+ * Private singleton constructor.
+ */
+ public ConfigurationBasedMessageProvider(){
+
+ }
+
+ /**
+ * Get a message using the defaul locale.
+ * @param key the message key, not null.
+ * @return the resolved message, or the bundle ID, never null.
+ */
+ public String getMessage(String key){
+ return getMessage(key, Locale.getDefault());
+ }
+
+ /**
+ * Get a message.
+ * @param key the message key, not null.
+ * @param locale the target locale, or null, for the default locale.
+ * @return the resolved message, or the key, never null.
+ */
+ public String getMessage(String key, Locale locale){
+ List<String> bundleIds = evaluateBundleIds(locale);
+ for(String bundleID:bundleIds){
+ Map<String,String> entries = this.propertiesCache.get(bundleID);
+ if(entries==null){
+ entries = loadEntries(bundleID);
+ }
+ String value = entries.get(key);
+ if(value!=null){
+ return value;
+ }
+ }
+ return null;
+ }
+
+ private Map<String, String> loadEntries(String bundleID) {
+ ConfigurationContextBuilder ctxBuilder = ConfigurationProvider.getConfigurationContextBuilder();
+ for(String format:new String[]{"xml", "properties"}) {
+ try {
+ Enumeration<URL> urls = getClass().getClassLoader().getResources(bundleID+"."+format);
+ while(urls.hasMoreElements()){
+ URL url = urls.nextElement();
+ ctxBuilder.addPropertySources(new URLPropertySource(url));
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ Map<String, String> entries = new DefaultConfiguration(ctxBuilder.build()).getProperties();
+ this.propertiesCache.put(bundleID, entries);
+ return entries;
+ }
+
+ private List<String> evaluateBundleIds(Locale locale) {
+ List<String> bundleIds = new ArrayList<>();
+ String country = locale.getCountry();
+ if(country==null){
+ country="";
+ }
+ String lang = locale.getLanguage();
+ if(lang==null){
+ lang="";
+ }
+ String variant = locale.getVariant();
+ if(variant==null){
+ variant="";
+ }
+ String key = baseName + "_"+country+"_"+lang+"_"+variant;
+ key = reduceKey(key);
+ if(!bundleIds.contains(key)){
+ bundleIds.add(key);
+ }
+ key = baseName + "_"+country+"_"+lang;
+ key = reduceKey(key);
+ if(!bundleIds.contains(key)){
+ bundleIds.add(key);
+ }
+ key = baseName + "_"+country;
+ key = reduceKey(key);
+ if(!bundleIds.contains(key)){
+ bundleIds.add(key);
+ }
+ key = baseName;
+ if(!bundleIds.contains(key)){
+ bundleIds.add(key);
+ }
+ return bundleIds;
+ }
+
+ /**
+ * Remove all doubled '_' hereby normalizing the bundle key.
+ * @param key the key, not null.
+ * @return the normaliuzed key, not null.
+ */
+ private String reduceKey(String key) {
+ String reduced = key.replace("___","_").replace("__","_");
+ if(reduced.endsWith("_")){
+ reduced = reduced.substring(0,reduced.length()-1);
+ }
+ return reduced;
+ }
+
+ /**
+ * Evaluates the base name to be used for creating the resource bundle used.
+ * @return
+ */
+ private String evaluateBaseName() {
+ String baseName = System.getProperty(TAMAYA_UI_BASE_NAME);
+ if(baseName==null || baseName.isEmpty()){
+ baseName = System.getenv("tamaya.ui.baseName");
+ }
+ if(baseName==null || baseName.isEmpty()){
+ baseName = ConfigurationProvider.getConfiguration().get("tamaya.ui.baseName");
+ }
+ if(baseName==null || baseName.isEmpty()){
+ baseName = "ui/lang/tamaya";
+ }
+ return baseName.replace('.', '/');
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a83105bc/ui/src/main/java/org/apache/tamaya/ui/internal/ConfiguredMessageProvider.java
----------------------------------------------------------------------
diff --git a/ui/src/main/java/org/apache/tamaya/ui/internal/ConfiguredMessageProvider.java b/ui/src/main/java/org/apache/tamaya/ui/internal/ConfiguredMessageProvider.java
new file mode 100644
index 0000000..e2a761c
--- /dev/null
+++ b/ui/src/main/java/org/apache/tamaya/ui/internal/ConfiguredMessageProvider.java
@@ -0,0 +1,61 @@
+///*
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements. See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership. The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License. You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied. See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// */
+//package org.apache.tamaya.ui.internal;
+//
+//import org.apache.tamaya.ui.services.MessageProvider;
+//
+//import java.util.Locale;
+//import java.util.ResourceBundle;
+//
+///**
+// * Component resolving messages for being shown in the UI, based on the ResourceBundle mechanisms.
+// */
+//public class ConfiguredMessageProvider implements MessageProvider{
+//
+// /**
+// * Private singleton constructor.
+// */
+// public ConfiguredMessageProvider(){}
+//
+// /**
+// * Get a message using the defaul locale.
+// * @param bundleID the message bundle key, not null.
+// * @return the resolved message, or the bundle ID, never null.
+// */
+// public String getMessage(String bundleID){
+// return getMessage(bundleID, Locale.getDefault());
+// }
+//
+// /**
+// * Get a message.
+// * @param bundleID the message bundle key, not null.
+// * @param locale the target locale, or null, for the default locale.
+// * @return the resolved message, or the bundle ID, never null.
+// */
+// public String getMessage(String bundleID, Locale locale){
+// try{
+// ResourceBundle bundle = ResourceBundle.getBundle("ui/lang/tamaya", locale);
+// return bundle.getString(bundleID);
+// }
+// catch(Exception e){
+// return bundleID;
+// }
+// }
+//
+//}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a83105bc/ui/src/main/java/org/apache/tamaya/ui/internal/ResourceBundleMessageProvider.java
----------------------------------------------------------------------
diff --git a/ui/src/main/java/org/apache/tamaya/ui/internal/ResourceBundleMessageProvider.java b/ui/src/main/java/org/apache/tamaya/ui/internal/ResourceBundleMessageProvider.java
new file mode 100644
index 0000000..c0aa092
--- /dev/null
+++ b/ui/src/main/java/org/apache/tamaya/ui/internal/ResourceBundleMessageProvider.java
@@ -0,0 +1,91 @@
+///*
+// * Licensed to the Apache Software Foundation (ASF) under one
+// * or more contributor license agreements. See the NOTICE file
+// * distributed with this work for additional information
+// * regarding copyright ownership. The ASF licenses this file
+// * to you under the Apache License, Version 2.0 (the
+// * "License"); you may not use this file except in compliance
+// * with the License. You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing,
+// * software distributed under the License is distributed on an
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// * KIND, either express or implied. See the License for the
+// * specific language governing permissions and limitations
+// * under the License.
+// */
+//package org.apache.tamaya.ui.internal;
+//
+//import org.apache.tamaya.ConfigurationProvider;
+//import org.apache.tamaya.ui.services.MessageProvider;
+//
+//import java.util.Locale;
+//import java.util.ResourceBundle;
+//
+///**
+// * Component resolving messages for being shown in the UI, based on the ResourceBundle mechanisms.
+// * The baseName used can optionally be configured by setting {@code tamaya.ui.baseName} either as system property,
+// * environment property or Tamaya configuration. Be aware that the JDK resource bundle mechanism only reads
+// * the first property file on the classpath (or a corresponding class file implementing ResourceBundle).
+// */
+//public class ResourceBundleMessageProvider implements MessageProvider{
+//
+// private static final String BASENAME = evaluateBaseName();
+//
+// /**
+// * The property name for configuring the resource bundle's base name either as
+// * system property, environment property or configuration entry.
+// */
+// private static final String TAMAYA_UI_BASE_NAME = "tamaya.ui.baseName";
+//
+// /**
+// * Evaluates the base name to be used for creating the resource bundle used.
+// * @return
+// */
+// private static String evaluateBaseName() {
+// String baseName = System.getProperty(TAMAYA_UI_BASE_NAME);
+// if(baseName==null || baseName.isEmpty()){
+// baseName = System.getenv("tamaya.ui.baseName");
+// }
+// if(baseName==null || baseName.isEmpty()){
+// baseName = ConfigurationProvider.getConfiguration().get("tamaya.ui.baseName");
+// }
+// if(baseName==null || baseName.isEmpty()){
+// baseName = "ui/lang/tamaya";
+// }
+// return baseName;
+// }
+//
+// /**
+// * Private singleton constructor.
+// */
+// public ResourceBundleMessageProvider(){}
+//
+// /**
+// * Get a message using the defaul locale.
+// * @param bundleID the message bundle key, not null.
+// * @return the resolved message, or the bundle ID, never null.
+// */
+// public String getMessage(String bundleID){
+// return getMessage(bundleID, Locale.getDefault());
+// }
+//
+// /**
+// * Get a message.
+// * @param bundleID the message bundle key, not null.
+// * @param locale the target locale, or null, for the default locale.
+// * @return the resolved message, or the bundle ID, never null.
+// */
+// public String getMessage(String bundleID, Locale locale){
+// try{
+// ResourceBundle bundle = ResourceBundle.getBundle(BASENAME, locale);
+// return bundle.getString(bundleID);
+// }
+// catch(Exception e){
+// return bundleID;
+// }
+// }
+//
+//}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a83105bc/ui/src/main/java/org/apache/tamaya/ui/internal/URLPropertySource.java
----------------------------------------------------------------------
diff --git a/ui/src/main/java/org/apache/tamaya/ui/internal/URLPropertySource.java b/ui/src/main/java/org/apache/tamaya/ui/internal/URLPropertySource.java
new file mode 100644
index 0000000..0727515
--- /dev/null
+++ b/ui/src/main/java/org/apache/tamaya/ui/internal/URLPropertySource.java
@@ -0,0 +1,60 @@
+package org.apache.tamaya.ui.internal;
+
+import org.apache.tamaya.spisupport.BasePropertySource;
+import org.apache.tamaya.spisupport.MapPropertySource;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * Simple property source, used for internationalization.
+ */
+final class URLPropertySource extends BasePropertySource{
+
+ private static final Logger LOG = Logger.getLogger(URLPropertySource.class.getName());
+ private URL url;
+ private Map<String, String> properties;
+
+ public URLPropertySource(URL url){
+ this.url = Objects.requireNonNull(url);
+ load();
+ }
+
+ /**
+ * Loads/reloads the properties from the URL. If loading of the properties failed the previus state is preserved,
+ * unless there is no such state. In this case an empty map is assigned.
+ */
+ public void load(){
+ try(InputStream is = url.openStream()) {
+ Properties props = new Properties();
+ if (url.getFile().endsWith(".xml")) {
+ props.loadFromXML(is);
+ } else {
+ props.load(is);
+ }
+ properties = Collections.unmodifiableMap(MapPropertySource.getMap(props));
+ }
+ catch(Exception e){
+ LOG.log(Level.WARNING, "Failed to read config from "+url,e);
+ if(properties==null) {
+ properties = Collections.emptyMap();
+ }
+ }
+ }
+
+ @Override
+ public String getName() {
+ return url.toString();
+ }
+
+ @Override
+ public Map<String, String> getProperties() {
+ return properties;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a83105bc/ui/src/main/java/org/apache/tamaya/ui/services/MessageProvider.java
----------------------------------------------------------------------
diff --git a/ui/src/main/java/org/apache/tamaya/ui/services/MessageProvider.java b/ui/src/main/java/org/apache/tamaya/ui/services/MessageProvider.java
new file mode 100644
index 0000000..a15ae46
--- /dev/null
+++ b/ui/src/main/java/org/apache/tamaya/ui/services/MessageProvider.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.ui.services;
+
+import java.util.Locale;
+
+/**
+ * Component resolving messages for being shown in the UI.
+ */
+public interface MessageProvider {
+
+ /**
+ * Get a message using the default locale.
+ * @param key the message key, not null.
+ * @return the resolved message, or the key, never null.
+ */
+ String getMessage(String key);
+
+ /**
+ * Get a message.
+ * @param key the message key, not null.
+ * @param locale the target locale, or null, for the default locale.
+ * @return the resolved message, or the key, never null.
+ */
+ String getMessage(String key, Locale locale);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a83105bc/ui/src/main/java/org/apache/tamaya/ui/services/UserService.java
----------------------------------------------------------------------
diff --git a/ui/src/main/java/org/apache/tamaya/ui/services/UserService.java b/ui/src/main/java/org/apache/tamaya/ui/services/UserService.java
new file mode 100644
index 0000000..71a8a43
--- /dev/null
+++ b/ui/src/main/java/org/apache/tamaya/ui/services/UserService.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tamaya.ui.services;
+
+import org.apache.tamaya.ui.User;
+
+/**
+ * Created by atsticks on 29.03.16.
+ */
+public interface UserService {
+
+ User login(String userId, String credentials);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a83105bc/ui/src/main/resources/META-INF/services/org.apache.tamaya.ui.ViewProvider
----------------------------------------------------------------------
diff --git a/ui/src/main/resources/META-INF/services/org.apache.tamaya.ui.ViewProvider b/ui/src/main/resources/META-INF/services/org.apache.tamaya.ui.ViewProvider
new file mode 100644
index 0000000..eeb467b
--- /dev/null
+++ b/ui/src/main/resources/META-INF/services/org.apache.tamaya.ui.ViewProvider
@@ -0,0 +1,21 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy current the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.tamaya.ui.views.HomeView$Provider
+org.apache.tamaya.ui.views.ConfigView$Provider
+org.apache.tamaya.ui.views.ComponentView$Provider
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a83105bc/ui/src/main/resources/META-INF/services/org.apache.tamaya.ui.services.MessageProvider
----------------------------------------------------------------------
diff --git a/ui/src/main/resources/META-INF/services/org.apache.tamaya.ui.services.MessageProvider b/ui/src/main/resources/META-INF/services/org.apache.tamaya.ui.services.MessageProvider
new file mode 100644
index 0000000..6ce4a9f
--- /dev/null
+++ b/ui/src/main/resources/META-INF/services/org.apache.tamaya.ui.services.MessageProvider
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy current the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+org.apache.tamaya.ui.internal.ConfigurationBasedMessageProvider
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/a83105bc/ui/src/main/resources/ui/lang/tamaya.properties
----------------------------------------------------------------------
diff --git a/ui/src/main/resources/ui/lang/tamaya.properties b/ui/src/main/resources/ui/lang/tamaya.properties
new file mode 100644
index 0000000..16880d4
--- /dev/null
+++ b/ui/src/main/resources/ui/lang/tamaya.properties
@@ -0,0 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy current the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+project.name=Apache Tamaya
+default.label.logout=Log out
+default.label.unknown=<unknown>
+default.label.username=Username
+default.label.password=Password
+default.label.components=Components
+
+view.config.name=Configuration
+view.home.name=Home
+view.components.name=Components