catch up with branch development

Signed-off-by: Ralf Mollik <ramollik@compex-commerce.com>
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/org.eclipse.osbp.authentication.ui/assets/license.txt b/org.eclipse.osbp.authentication.ui/assets/license.txt
deleted file mode 100644
index cf862fb..0000000
--- a/org.eclipse.osbp.authentication.ui/assets/license.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- *                                                                            
- * Copyright (c) 2011, 2016 - 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 v1.0       
- * which accompanies this distribution, and is available at                  
- * http://www.eclipse.org/legal/epl-v10.html                                 
- *                                                                            
- * Contributors:   
- * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation 
- */
-
-The following pictures originate from the sources listed:
-
-
-Pictures from StockSnap/pixabay:
---------------------------------
-
-locked.png
-unlocked.png
diff --git a/org.eclipse.osbp.authentication.ui/ecviews/org.eclipse.osbp.authentication.account.dialogs.autobinded.UserAccount.ecview b/org.eclipse.osbp.authentication.ui/ecviews/org.eclipse.osbp.authentication.account.dialogs.autobinded.UserAccount.ecview
index b929f70..945eaec 100644
--- a/org.eclipse.osbp.authentication.ui/ecviews/org.eclipse.osbp.authentication.account.dialogs.autobinded.UserAccount.ecview
+++ b/org.eclipse.osbp.authentication.ui/ecviews/org.eclipse.osbp.authentication.account.dialogs.autobinded.UserAccount.ecview
@@ -133,7 +133,8 @@
         </valueBindingEndpoints>
       </suspects>
       <suspects xsi:type="model:YTypedSuspect" id="org.eclipse.osbp.authentication.account.dialogs.autobinded.UserAccount.org.eclipse.osbp.authentication.account.dtos.UserAccountDto.printService" authorizationGroup="org.eclipse.osbp.authentication.account.dtos.UserAccountDto" authorizationId="printService" labelI18nKey="printService" label="printService" typeQualifiedName="java.lang.String" type="java.lang.String">
-        <tags>text</tags>
+        <tags>printserviceCombo</tags>
+        <properties key="printservice" value=""/>
         <valueBindingEndpoints xsi:type="binding:YDetailValueBindingEndpoint" propertyPath="printService" type="org.eclipse.osbp.authentication.account.dtos.UserAccountDto">
           <masterObservable xsi:type="core:YBeanSlotValueBindingEndpoint" attributePath="value" beanSlot="//@beanSlots.0"/>
         </valueBindingEndpoints>
diff --git a/org.eclipse.osbp.authentication.ui/ecviews/org.eclipse.osbp.authentication.account.dialogs.autobinded.UserAdministration.ecview b/org.eclipse.osbp.authentication.ui/ecviews/org.eclipse.osbp.authentication.account.dialogs.autobinded.UserAdministration.ecview
index 3f39191..daca1cc 100644
--- a/org.eclipse.osbp.authentication.ui/ecviews/org.eclipse.osbp.authentication.account.dialogs.autobinded.UserAdministration.ecview
+++ b/org.eclipse.osbp.authentication.ui/ecviews/org.eclipse.osbp.authentication.account.dialogs.autobinded.UserAdministration.ecview
@@ -133,7 +133,8 @@
         </valueBindingEndpoints>
       </suspects>
       <suspects xsi:type="model:YTypedSuspect" id="org.eclipse.osbp.authentication.account.dialogs.autobinded.UserAdministration.org.eclipse.osbp.authentication.account.dtos.UserAccountDto.printService" authorizationGroup="org.eclipse.osbp.authentication.account.dtos.UserAccountDto" authorizationId="printService" labelI18nKey="printService" label="printService" typeQualifiedName="java.lang.String" type="java.lang.String">
-        <tags>text</tags>
+        <tags>printserviceCombo</tags>
+        <properties key="printservice" value=""/>
         <valueBindingEndpoints xsi:type="binding:YDetailValueBindingEndpoint" propertyPath="printService" type="org.eclipse.osbp.authentication.account.dtos.UserAccountDto">
           <masterObservable xsi:type="core:YBeanSlotValueBindingEndpoint" attributePath="value" beanSlot="//@beanSlots.0"/>
         </valueBindingEndpoints>
diff --git a/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/datamarts/UserAccountDatamart.java b/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/datamarts/UserAccountDatamart.java
index 46bb4f3..9b43ec2 100644
--- a/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/datamarts/UserAccountDatamart.java
+++ b/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/datamarts/UserAccountDatamart.java
@@ -12,6 +12,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
+import java.util.Map;
 import java.util.ResourceBundle;
 import org.eclipse.osbp.bpm.api.BPMTaskSummary;
 import org.eclipse.osbp.core.api.persistence.IPersistenceService;
@@ -49,6 +50,8 @@
   
   private IUser user;
   
+  private Map<String, Map<String, String>> dateFilterAttributeProperties = new HashMap<String, Map<String, String>>();
+  
   private HashMap<String, String> statements = new HashMap<String,String>() {{
     	put("Administrator", "select UserAccount.USER_NAME as \"userName\",UserAccount.EMAIL as \"email\",UserAccount.NOT_REGISTERED as \"notRegistered\",UserAccount.POSITION as \"position\",UserAccount.PROFILEIMAGE as \"profileimage\",UserAccount.id as \"__UserAccount__ID__\" from USER_ACCOUNT UserAccount");
     }};
@@ -87,6 +90,10 @@
     	}});
     }};
   
+  private HashMap<String, String> typesProp = new HashMap<String, String>() {{
+    	put("position", "");
+    }};
+  
   private HashMap<String, String> resultAttributes = new HashMap<String,String>();
   
   public HashMap<String, IDataMart.EType> getIdMap() {
@@ -101,6 +108,10 @@
     return this.axisMap;
   }
   
+  public HashMap<String, String> getTypesProp() {
+    return this.typesProp;
+  }
+  
   public IUser getUser() {
     return this.user;
   }
@@ -173,55 +184,55 @@
     connect();
     if (connection != null) {
     	for (DatamartFilter filter : getFilters()) {
-    		if(filter.getType() != DatamartFilter.FilterType.BY_ID) {
+    		if((DatamartFilter.FilterType.BY_ID != filter.getType()) && (DatamartFilter.FilterType.BETWEEN != filter.getType()) && (DatamartFilter.FilterType.BETWEEN_DATE != filter.getType())) {
     			ResultSet rs = null;
     			try {
     				rs = connection.createStatement().executeQuery(getVendorSql(filter));
     				if (rs != null) {
     					while (rs.next()) {
-    				  		int type = rs.getMetaData().getColumnType(1);
-    				  		switch (type) {
-    				  			case java.sql.Types.DATE:
-    				  			    Date date = rs.getDate(1);
-    				  			    if (date != null) {
-    					  				if (user == null) {
-    					  					filter.addItem(date.toString(), getVendorToDateSQLMethod()+"('"+date.toString().replace(".0","")+"','YYYY-MM-DD HH24:MI:SS')", false);
-    					  				} else {
-    					  					filter.addItem(SimpleDateFormatter.getFormat("LONGDATE", user.getLocale()).format(date), getVendorToDateSQLMethod()+"('"+date.toString().replace(".0","")+"','YYYY-MM-DD HH24:MI:SS')", false);
-    					  				}
-    				  				}
-    				  				break;
-    				  			case java.sql.Types.TIMESTAMP:
-    				  				Timestamp timestamp = rs.getTimestamp(1);
-    				  				if (timestamp != null) {
-    				  					if (user == null) {
-    					  					filter.addItem(timestamp.toString(), getVendorToTimestampSQLMethod()+"('"+timestamp.toString().replace(".0","")+"','YYYY-MM-DD HH24:MI:SS')", false);
-    					  				} else {
-    					  					filter.addItem(SimpleDateFormatter.getFormat("LONGDATE", user.getLocale()).format(timestamp), getVendorToTimestampSQLMethod()+"('"+timestamp.toString().replace(".0","")+"','YYYY-MM-DD HH24:MI:SS')", false);
-    						  			}
-    						  		}
-    				  				break;
-    				  			case java.sql.Types.DECIMAL:
-    				  				BigDecimal bigDecimal = rs.getBigDecimal(1);
-    				  				if (bigDecimal != null) {
-    				  					filter.addItem(bigDecimal.toPlainString(), bigDecimal.toPlainString(), false);
-    				  				}
-    				  				break;
-    				  			case java.sql.Types.NUMERIC:
-    				  			case java.sql.Types.DOUBLE:
-    				  				filter.addItem(Double.toString(rs.getDouble(1)), Double.toString(rs.getDouble(1)), false);
-    				  				break;
-    				  			case java.sql.Types.FLOAT:
-    				  				filter.addItem(Float.toString(rs.getFloat(1)), Float.toString(rs.getFloat(1)), false);
-    				  				break;
-    				  			case java.sql.Types.CHAR:
-    				  			case java.sql.Types.NCHAR:
-    				  			case java.sql.Types.NVARCHAR:
-    				  			case java.sql.Types.VARCHAR:
+    					 		int type = rs.getMetaData().getColumnType(1);
+    					 		switch (type) {
+    					 			case java.sql.Types.DATE:
+    					 			    Date date = rs.getDate(1);
+    					 			    if (date != null) {
+    					 					if (user == null) {
+    					 						filter.addItem(date.toString(), getVendorToDateSQLMethod()+"('"+date.toString().replace(".0","")+"','YYYY-MM-DD HH24:MI:SS')", false);
+    					 					} else {
+    					 						filter.addItem(SimpleDateFormatter.getFormat("LONGDATE", user.getLocale()).format(date), getVendorToDateSQLMethod()+"('"+date.toString().replace(".0","")+"','YYYY-MM-DD HH24:MI:SS')", false);
+    					 					}
+    					 				}
+    					 				break;
+    					 			case java.sql.Types.TIMESTAMP:
+    					 				Timestamp timestamp = rs.getTimestamp(1);
+    					 				if (timestamp != null) {
+    					 					if (user == null) {
+    					 						filter.addItem(timestamp.toString(), getVendorToTimestampSQLMethod()+"('"+timestamp.toString().replace(".0","")+"','YYYY-MM-DD HH24:MI:SS')", false);
+    					 					} else {
+    					 						filter.addItem(SimpleDateFormatter.getFormat("LONGDATE", user.getLocale()).format(timestamp), getVendorToTimestampSQLMethod()+"('"+timestamp.toString().replace(".0","")+"','YYYY-MM-DD HH24:MI:SS')", false);
+    					 					}
+    					 				}
+    					 				break;
+    					 			case java.sql.Types.DECIMAL:
+    					 				BigDecimal bigDecimal = rs.getBigDecimal(1);
+    					 				if (bigDecimal != null) {
+    					 					filter.addItem(bigDecimal.toPlainString(), bigDecimal.toPlainString(), false);
+    					 				}
+    					 				break;
+    					 			case java.sql.Types.NUMERIC:
+    					 			case java.sql.Types.DOUBLE:
+    					 				filter.addItem(Double.toString(rs.getDouble(1)), Double.toString(rs.getDouble(1)), false);
+    					 				break;
+    					 			case java.sql.Types.FLOAT:
+    					 				filter.addItem(Float.toString(rs.getFloat(1)), Float.toString(rs.getFloat(1)), false);
+    					 				break;
+    					 			case java.sql.Types.CHAR:
+    					 			case java.sql.Types.NCHAR:
+    					 			case java.sql.Types.NVARCHAR:
+    					 			case java.sql.Types.VARCHAR:
     							case java.sql.Types.LONGVARCHAR: 
-    				  				filter.addItem(rs.getString(1), rs.getString(1), true);
-    				  				break;
-    				  		}
+    										filter.addItem(rs.getString(1), rs.getString(1), true);
+    										break;
+    								}
     					}
     				}
     			} catch (SQLException e) {
@@ -242,7 +253,7 @@
     filteredStatement = statements.get("Administrator");
     computeConditions();
     for (DatamartFilter filter : getFilters()) {
-    	if (filter.getType() == DatamartFilter.FilterType.BY_ID) {
+    	if (DatamartFilter.FilterType.BY_ID == filter.getType()) {
     		if(filter.getCondition() != null) {
     			if	(!filteredStatement.toLowerCase().contains(" where ")) {
     				if	((" "+filter.getCondition()).toLowerCase().contains("where ")) {
diff --git a/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/dialogs/UserAccountDialogEmbedded.java b/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/dialogs/UserAccountDialogEmbedded.java
index d6f3ccf..38edc28 100644
--- a/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/dialogs/UserAccountDialogEmbedded.java
+++ b/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/dialogs/UserAccountDialogEmbedded.java
@@ -100,6 +100,10 @@
     return "UserAccount";
   }
   
+  public String getLayoutingStrategyId() {
+    return "";
+  }
+  
   public String getPrimaryKey() {
     return "org.eclipse.osbp.authentication.account.entities.UserAccount.id";
   }
diff --git a/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/dialogs/UserAdministrationDialog.java b/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/dialogs/UserAdministrationDialog.java
index b0ae4c6..c737c66 100644
--- a/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/dialogs/UserAdministrationDialog.java
+++ b/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/dialogs/UserAdministrationDialog.java
@@ -104,6 +104,10 @@
     return "UserAccount";
   }
   
+  public String getLayoutingStrategyId() {
+    return "";
+  }
+  
   public String getPrimaryKey() {
     return "org.eclipse.osbp.authentication.account.entities.UserAccount.id";
   }
diff --git a/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/tables/UserAdministrationTable.java b/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/tables/UserAdministrationTable.java
index 0d294c7..7656f56 100644
--- a/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/tables/UserAdministrationTable.java
+++ b/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/tables/UserAdministrationTable.java
@@ -20,6 +20,8 @@
 import com.vaadin.ui.TabSheet;
 import com.vaadin.ui.UI;
 import com.vaadin.ui.VerticalLayout;
+import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
@@ -34,7 +36,6 @@
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
-import javax.annotation.PreDestroy;
 import javax.inject.Inject;
 import org.eclipse.bpmn2.Task;
 import org.eclipse.e4.core.contexts.ContextInjectionFactory;
@@ -81,6 +82,7 @@
 import org.eclipse.osbp.utils.vaadin.SelectUserWindow;
 import org.eclipse.osbp.utils.vaadin.ViewLayoutManager;
 import org.eclipse.osbp.vaaclipse.common.ecview.api.IECViewSessionHelper;
+import org.eclipse.osbp.xtext.action.SelectWorkloadActionEnum;
 import org.eclipse.osbp.xtext.blip.BlipItem;
 import org.eclipse.osbp.xtext.datamart.common.AEntityDatamart;
 import org.eclipse.osbp.xtext.datamart.common.DatamartFilterGenerator;
@@ -138,6 +140,8 @@
   
   private Component dataComponent;
   
+  private boolean mustRefresh = false;
+  
   private HashMap<String, PropertyLookup> attributeLookupMap;
   
   private HashMap<Component, ArrayList<String>> tabSheets;
@@ -159,8 +163,6 @@
   
   private EventHandler delegatedTask;
   
-  private EventHandler dispatchAction;
-  
   private TableFilterDecorator tableFilterDecorator;
   
   @Inject
@@ -195,7 +197,9 @@
     user.addUserLocaleListener(this);
     eventDispatcher.addEventReceiver(this);
     filterGenerator.addFilterChangeListener(this);
-    
+    if(mustRefresh){
+    	dataRefresh();
+    }
   }
   
   @Override
@@ -228,7 +232,6 @@
     tableRefresher = new Refresher();
     attributeLookupMap = new HashMap<>();
     tabSheets = new HashMap<>();
-    setup();
     initDone = true;
     
   }
@@ -379,24 +382,13 @@
     		table.sanitizeSelection();
     	}
     } catch (Exception e) {
-    	log.error("dataRefresh", e);
+    	StringWriter sw = new StringWriter();
+    	e.printStackTrace(new PrintWriter(sw));
+    	String exceptionDetails = sw.toString();
+    	log.error("table data refresh:{}", exceptionDetails);
     }
   }
   
-  protected void setup() {
-    subscribe();
-    
-  }
-  
-  protected void subscribe() {
-    
-  }
-  
-  @PreDestroy
-  protected void unsubscribe() {
-    
-  }
-  
   @Override
   public void localeChanged(final Locale locale) {
     if(initDone) {
@@ -450,7 +442,7 @@
     			}
     		}
     		break;
-    }
+    	}
     
   }
   
diff --git a/org.eclipse.osbp.authentication.ui/src/account.dialog b/org.eclipse.osbp.authentication.ui/src/account.dialog
index 145e2ce..90bfc99 100644
--- a/org.eclipse.osbp.authentication.ui/src/account.dialog
+++ b/org.eclipse.osbp.authentication.ui/src/account.dialog
@@ -14,7 +14,7 @@
 import ns org.eclipse.osbp.authentication.account.dtos.UserAccountDto
 import ns org.eclipse.osbp.authentication.account.actions.Dialog package org.eclipse.osbp.authentication.account.dialogs {
 
-	dialog UserAccount autobinding UserAccountDto embedded
+	dialog UserAccount autobinding UserAccountDto embedded 
 
-	dialog UserAdministration autobinding UserAccountDto toolbar Dialog
+	dialog UserAdministration autobinding UserAccountDto toolbar Dialog 
 }
\ No newline at end of file
diff --git a/org.eclipse.osbp.authentication.ui/src/account.table b/org.eclipse.osbp.authentication.ui/src/account.table
index 60cdcd3..d7e62b2 100644
--- a/org.eclipse.osbp.authentication.ui/src/account.table
+++ b/org.eclipse.osbp.authentication.ui/src/account.table
@@ -15,5 +15,5 @@
  */
 package org.eclipse.osbp.authentication.account.tables {
 
-	table UserAdministration as table filtering using datamart UserAccount  
+	table UserAdministration as table filtering using datamart UserAccount
 }
\ No newline at end of file