| /** |
| * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Florian Pirchner - Initial implementation |
| */ |
| package org.eclipse.osbp.ui.api.user; |
| |
| import java.util.Collection; |
| import java.util.Locale; |
| import java.util.Map; |
| |
| import org.eclipse.e4.ui.model.application.MApplication; |
| |
| /** |
| * Every user object needs to implement this interface. |
| */ |
| public interface IUser { |
| // to avoid dependency to publicapi |
| public static final String userClass = "userClass"; |
| /** |
| * Sets the application. |
| * |
| * @param application |
| * the new application |
| */ |
| void setApplication(MApplication application); |
| |
| /** |
| * Returns the user name. |
| * |
| * @return |
| */ |
| String getUserName(); |
| |
| /** |
| * Gets the profile image id. |
| * |
| * @return the profile image id |
| */ |
| String getProfileImageId(); |
| /** |
| * Gets the layouting strategy. |
| * |
| * @return the layouting strategy |
| */ |
| String getLayoutingStrategy(); |
| |
| /** |
| * Gets the focusing strategy. |
| * |
| * @return the focusing strategy |
| */ |
| String getFocusingStrategy(); |
| |
| /** |
| * Gets the theme. |
| * |
| * @return the theme |
| */ |
| String getTheme(); |
| |
| /** |
| * Gets the Print Service. |
| * |
| * @return the print service name |
| */ |
| String getPrintService(); |
| |
| /** |
| * Sets the user name. |
| * |
| * @param userName |
| * the new user name |
| */ |
| void setUserName(String userName); |
| |
| /** |
| * Gets the id. |
| * |
| * @return the id |
| */ |
| String getId(); |
| |
| /** |
| * Gets the position. |
| * |
| * @return the position |
| */ |
| String getPosition(); |
| |
| /** |
| * Gets the extra password. |
| * |
| * @return the extra password |
| */ |
| String getExtraPassword(); |
| |
| /** |
| * Gets the supervisor. |
| * |
| * @return the supervisor |
| */ |
| boolean isSupervisor(); |
| |
| /** |
| * Gets the perspective id. |
| * |
| * @return the perspective id |
| */ |
| String getPerspective(); |
| |
| /** |
| * Gets the email. |
| * |
| * @return the email |
| */ |
| String getEmail(); |
| |
| /** |
| * Gets the roles. |
| * |
| * @return the roles |
| */ |
| Collection<String> getRoles(); |
| |
| /** |
| * Gets the locale. |
| * |
| * @return the locale |
| */ |
| Locale getLocale(); |
| |
| /** |
| * Gets the properties. |
| * |
| * @param the key |
| * @return the value |
| */ |
| Object getProperty (String key); |
| |
| /** |
| * Add to properties. |
| * |
| * @param the key |
| * @param the value |
| */ |
| void addToProperties (String key, Object value); |
| |
| /** |
| * Remove from properties. |
| * |
| * @param the key |
| */ |
| void removeFromProperties (String key); |
| |
| /** |
| * Clear properties. |
| */ |
| void clearFromProperties (); |
| |
| /** |
| * Persist properties |
| */ |
| void persistProperties(); |
| |
| /** |
| * Sets the locale. |
| * |
| * @param locale |
| * the new locale |
| */ |
| void setLocale(Locale locale); |
| |
| /** |
| * Sets the print service name. |
| * |
| * @param print service |
| * the new print service |
| */ |
| void setPrintService(String printService); |
| |
| /** |
| * Adds a locale listener to the service. |
| * |
| * @param listener |
| * the listener |
| */ |
| void addUserLocaleListener(UserLocaleListener listener); |
| |
| /** |
| * Removes the given locale listener from the service. |
| * |
| * @param listener |
| * the listener |
| */ |
| void removeUserLocaleListener(UserLocaleListener listener); |
| |
| /** |
| * Notifies the listener about the changed locale. |
| * |
| * @param locale |
| * the locale |
| */ |
| void notifyUserLocaleChanged(Locale locale); |
| |
| /** |
| * The listener interface for receiving locale events. The class that is |
| * interested in processing a locale event implements this interface, and |
| * the object created with that class is registered with a component using |
| * the component's <code>addLocaleListener</code> method. When the user's |
| * locale change event occurs, that object's appropriate method is invoked. |
| * |
| */ |
| interface UserLocaleListener { |
| |
| /** |
| * Notifies the listener about a locale change. |
| * |
| * @param locale |
| * the locale |
| */ |
| void localeChanged(Locale locale); |
| |
| } |
| |
| IColumnUtil getColumnUtil(); |
| |
| interface IColumnUtil { |
| String getColumnWidth(String key); |
| String getColumnCollapsed(String key); |
| Map<Object, Integer> getVisibleColumns(String key); |
| } |
| |
| } |