All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.graphenee.vaadin.event.DashboardEvent Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
/*******************************************************************************
 * Copyright (c) 2016, 2018 Farrukh Ijaz
 *
 * Licensed 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 io.graphenee.vaadin.event;

import java.util.Map;

import io.graphenee.vaadin.AbstractDashboardView.Dashlet;

/*
 * Event bus events used in Dashboard are listed here as inner classes.
 */
public abstract class DashboardEvent {

	public static class DashletMaximized {

		private Dashlet dashlet;

		public DashletMaximized(Dashlet dashlet) {
			this.setDashlet(dashlet);

		}

		public Dashlet getDashlet() {
			return dashlet;
		}

		public void setDashlet(Dashlet dashlet) {
			this.dashlet = dashlet;
		}

	}

	public static class DashletMinimized {

		private Dashlet dashlet;

		public DashletMinimized(Dashlet dashlet) {
			this.setDashlet(dashlet);

		}

		public Dashlet getDashlet() {
			return dashlet;
		}

		public void setDashlet(Dashlet dashlet) {
			this.dashlet = dashlet;
		}

	}

	public static final class UserLoginRequestedEvent {
		private final String userName, password;
		private Map additionalData;

		public UserLoginRequestedEvent(final String userName, final String password) {
			this.userName = userName;
			this.password = password;
		}

		public String getUserName() {
			return userName;
		}

		public String getPassword() {
			return password;
		}

		public Map getAdditionalData() {
			return additionalData;
		}

		public void setAdditionalData(Map additionalData) {
			this.additionalData = additionalData;
		}

	}

	public static final class UserChangePasswordRequestedEvent {
		private final String userName, oldPassword, newPassword;
		private Map additionalData;

		public UserChangePasswordRequestedEvent(final String userName, final String oldPassword, final String newPassword) {
			this.userName = userName;
			this.oldPassword = oldPassword;
			this.newPassword = newPassword;
		}

		public String getUserName() {
			return userName;
		}

		public String getOldPassword() {
			return oldPassword;
		}

		public String getNewPassword() {
			return newPassword;
		}

		public Map getAdditionalData() {
			return additionalData;
		}

		public void setAdditionalData(Map additionalData) {
			this.additionalData = additionalData;
		}

	}

	public static class BrowserResizeEvent {
		private int width;
		private int height;

		public BrowserResizeEvent(int width, int height) {
			this.width = width;
			this.height = height;
		}

		public int getWidth() {
			return width;
		}

		public int getHeight() {
			return height;
		}
	}

	public static class UserLoggedOutEvent {

	}

	public static class NotificationsCountUpdatedEvent {
		private final int count;

		public NotificationsCountUpdatedEvent(final int count) {
			this.count = count;
		}

		public int getCount() {
			return count;
		}
	}

	public static final class ReportsCountUpdatedEvent {
		private final int count;

		public ReportsCountUpdatedEvent(final int count) {
			this.count = count;
		}

		public int getCount() {
			return count;
		}

	}

	public static final class PostViewChangeEvent {
		private final String viewName;
		private final String parameters;

		public PostViewChangeEvent(final String viewName, final String parameters) {
			this.viewName = viewName;
			this.parameters = parameters;
		}

		public String getViewName() {
			return viewName;
		}

		public String getParameters() {
			return parameters;
		}

	}

	public static class CloseOpenWindowsEvent {
	}

	public static class ProfileUpdatedEvent {
	}

	public static class UserProfileRenderEvent {
	}

	public static class RequestRefreshNotificationsEvent {
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy