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:37 UTC

[41/50] [abbrv] incubator-tamaya-sandbox git commit: TAMAYA-149 Final fixes restabilizing modules after Tomcat is now used.

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/543eedbc/ui/src/main/java/org/apache/tamaya/ui/views/HomeView.java
----------------------------------------------------------------------
diff --git a/ui/src/main/java/org/apache/tamaya/ui/views/HomeView.java b/ui/src/main/java/org/apache/tamaya/ui/views/HomeView.java
deleted file mode 100644
index 78297d2..0000000
--- a/ui/src/main/java/org/apache/tamaya/ui/views/HomeView.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.views;
-
-import com.vaadin.navigator.View;
-import com.vaadin.navigator.ViewChangeListener;
-import com.vaadin.shared.ui.label.ContentMode;
-import com.vaadin.ui.Label;
-import org.apache.tamaya.spi.ServiceContextManager;
-import org.apache.tamaya.ui.CurrentUser;
-import org.apache.tamaya.ui.UIConstants;
-import org.apache.tamaya.ui.ViewProvider;
-import org.apache.tamaya.ui.components.VerticalSpacedLayout;
-import org.apache.tamaya.ui.services.MessageProvider;
-
-import javax.annotation.Priority;
-
-
-public class HomeView extends VerticalSpacedLayout implements View {
-
-    @Priority(0)
-    public static final class Provider implements ViewProvider{
-
-        @Override
-        public ViewLifecycle getLifecycle() {
-            return ViewLifecycle.CREATE;
-        }
-
-        @Override
-        public String getUrlPattern() {
-            return "";
-        }
-
-        @Override
-        public String getDisplayName() {
-            return ServiceContextManager.getServiceContext().getService(MessageProvider.class)
-                    .getMessage("view.home.name");
-        }
-
-        @Override
-        public View createView(){
-            return new HomeView();
-        }
-    }
-
-    public HomeView() {
-        Label caption = new Label("Welcome, " + CurrentUser.get().getUserID());
-        Label description = new Label(
-                "<b>Apache Tamaya</b> is an API and extendable framework for accessing and managing configuration.<br/> \n" +
-                        "Please check the project's home page <a href='http://tamaya.incubator.apache.org'>http://tamaya.incubator.apache.org</a>.",
-                ContentMode.HTML);
-
-        addComponents(caption, description);
-
-        caption.addStyleName(UIConstants.LABEL_HUGE);
-        description.addStyleName(UIConstants.LABEL_LARGE);
-
-    }
-
-    @Override
-    public void enter(ViewChangeListener.ViewChangeEvent event) {
-
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/543eedbc/ui/src/main/java/org/apache/tamaya/ui/views/login/LoginBox.java
----------------------------------------------------------------------
diff --git a/ui/src/main/java/org/apache/tamaya/ui/views/login/LoginBox.java b/ui/src/main/java/org/apache/tamaya/ui/views/login/LoginBox.java
deleted file mode 100644
index 049d885..0000000
--- a/ui/src/main/java/org/apache/tamaya/ui/views/login/LoginBox.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package org.apache.tamaya.ui.views.login;
-
-import com.vaadin.event.ShortcutAction;
-import com.vaadin.ui.*;
-import org.apache.tamaya.spi.ServiceContextManager;
-import org.apache.tamaya.ui.UIConstants;
-import org.apache.tamaya.ui.User;
-import org.apache.tamaya.ui.event.EventBus;
-import org.apache.tamaya.ui.services.MessageProvider;
-import org.apache.tamaya.ui.services.UserService;
-
-
-public class LoginBox extends VerticalLayout {
-
-    private UserService userService = new UserService() {
-        @Override
-        public User login(String userId, String credentials) {
-            if("admin".equals(userId)){
-                return new User("admin", "Administrator");
-            }
-            return null;
-        }
-    }; // TODO Load
-    private TextField username;
-    private PasswordField password;
-
-    public LoginBox() {
-        setWidth("400px");
-        addStyleName(UIConstants.LOGIN_BOX);
-        setSpacing(true);
-        setMargin(true);
-
-        addCaption();
-        addForm();
-        addButtons();
-    }
-
-    private void addCaption() {
-        Label caption = new Label("Login to system");
-        addComponent(caption);
-
-        caption.addStyleName(UIConstants.LABEL_H1);
-    }
-
-    private void addForm() {
-        FormLayout loginForm = new FormLayout();
-        MessageProvider mp = ServiceContextManager.getServiceContext().getService(MessageProvider.class);
-        username = new TextField(mp.getMessage("default.label.username"));
-        password = new PasswordField(mp.getMessage("default.label.password"));
-        loginForm.addComponents(username, password);
-        addComponent(loginForm);
-        loginForm.setSpacing(true);
-        for(Component component:loginForm){
-            component.setWidth("100%");
-        }
-        username.focus();
-    }
-
-    private void addButtons() {
-        HorizontalLayout buttonsLayout = new HorizontalLayout();
-        Button forgotButton = new Button("Forgot", new Button.ClickListener() {
-            @Override
-            public void buttonClick(Button.ClickEvent clickEvent) {
-                Notification.show("Not implemented", Notification.Type.TRAY_NOTIFICATION);
-            }
-        });
-        Button loginButton = new Button("Login", new Button.ClickListener() {
-            @Override
-            public void buttonClick(Button.ClickEvent clickEvent) {
-                login();
-            }
-        });
-        buttonsLayout.addComponents(forgotButton, loginButton);
-        addComponent(buttonsLayout);
-        buttonsLayout.setSpacing(true);
-        forgotButton.addStyleName(UIConstants.BUTTON_LINK);
-        loginButton.addStyleName(UIConstants.BUTTON_PRIMARY);
-        loginButton.setClickShortcut(ShortcutAction.KeyCode.ENTER);
-        setComponentAlignment(buttonsLayout, Alignment.BOTTOM_RIGHT);
-    }
-
-    private void login() {
-        User user = userService.login(username.getValue(), password.getValue());
-        if(user!=null){
-            EventBus.post(new LoginEvent(user));
-        }else{
-            Notification.show("Login failed.", "Hint: use any non-empty strings", Notification.Type.WARNING_MESSAGE);
-            username.focus();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/543eedbc/ui/src/main/java/org/apache/tamaya/ui/views/login/LoginEvent.java
----------------------------------------------------------------------
diff --git a/ui/src/main/java/org/apache/tamaya/ui/views/login/LoginEvent.java b/ui/src/main/java/org/apache/tamaya/ui/views/login/LoginEvent.java
deleted file mode 100644
index b6ba2b4..0000000
--- a/ui/src/main/java/org/apache/tamaya/ui/views/login/LoginEvent.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.apache.tamaya.ui.views.login;
-
-import org.apache.tamaya.ui.User;
-
-public class LoginEvent {
-    private User user;
-
-    public LoginEvent(User user) {
-        this.user = user;
-    }
-
-    public User getUser() {
-        return user;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/543eedbc/ui/src/main/java/org/apache/tamaya/ui/views/login/LoginView.java
----------------------------------------------------------------------
diff --git a/ui/src/main/java/org/apache/tamaya/ui/views/login/LoginView.java b/ui/src/main/java/org/apache/tamaya/ui/views/login/LoginView.java
deleted file mode 100644
index e1181d1..0000000
--- a/ui/src/main/java/org/apache/tamaya/ui/views/login/LoginView.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.apache.tamaya.ui.views.login;
-
-import com.vaadin.ui.Alignment;
-import com.vaadin.ui.VerticalLayout;
-
-public class LoginView extends VerticalLayout {
-
-    public LoginView() {
-        setSizeFull();
-        setDefaultComponentAlignment(Alignment.MIDDLE_CENTER);
-        addComponent(new LoginBox());
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/543eedbc/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
deleted file mode 100644
index eeb467b..0000000
--- a/ui/src/main/resources/META-INF/services/org.apache.tamaya.ui.ViewProvider
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# 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/543eedbc/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
deleted file mode 100644
index 6ce4a9f..0000000
--- a/ui/src/main/resources/META-INF/services/org.apache.tamaya.ui.services.MessageProvider
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# 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/543eedbc/ui/src/main/resources/config/application.yml
----------------------------------------------------------------------
diff --git a/ui/src/main/resources/config/application.yml b/ui/src/main/resources/config/application.yml
deleted file mode 100644
index a22ec36..0000000
--- a/ui/src/main/resources/config/application.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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.
-#
-
-server:
-  type: default
-  maxThreads: 1024
-  applicationConnectors:
-      - type: http
-        port: 8090
-  adminConnectors:
-      - type: http
-        port: 8091
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/543eedbc/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
deleted file mode 100644
index 16880d4..0000000
--- a/ui/src/main/resources/ui/lang/tamaya.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# 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

http://git-wip-us.apache.org/repos/asf/incubator-tamaya-sandbox/blob/543eedbc/ui/src/test/resources/config/application.yml
----------------------------------------------------------------------
diff --git a/ui/src/test/resources/config/application.yml b/ui/src/test/resources/config/application.yml
deleted file mode 100644
index 33c353c..0000000
--- a/ui/src/test/resources/config/application.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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.
-#
-
-server:
-  type: default
-  maxThreads: 1024
-  applicationConnectors:
-      - type: http
-        port: 8090
-      - type: https
-        port: 8453
-  adminConnectors:
-      - type: http
-        port: 8091
-      - type: https
-        port: 8453
\ No newline at end of file