catch up with branch development

Signed-off-by: Ralf Mollik <ramollik@compex-commerce.com>
diff --git a/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/datamarts/DatamartsServiceBinder.java b/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/datamarts/DatamartsServiceBinder.java
index 1542a14..18aca65 100644
--- a/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/datamarts/DatamartsServiceBinder.java
+++ b/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/datamarts/DatamartsServiceBinder.java
@@ -18,6 +18,7 @@
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Timestamp;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
 import java.util.ResourceBundle;
diff --git a/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/datamarts/DatamartsTestClass.java b/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/datamarts/DatamartsTestClass.java
index 91e6470..50fb5e8 100644
--- a/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/datamarts/DatamartsTestClass.java
+++ b/org.eclipse.osbp.authentication.ui/src-gen/org/eclipse/osbp/authentication/account/datamarts/DatamartsTestClass.java
@@ -18,6 +18,7 @@
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Timestamp;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
 import java.util.ResourceBundle;
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 1ba6e00..0d8ca44 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
@@ -55,7 +55,7 @@
   
   private Connection connection = null;
   
-  private HashMap<Integer, ArrayList<String>> axisMap = new HashMap<Integer,ArrayList<String>>() {{
+  private Map<Integer, ArrayList<String>> axisMap = new HashMap<Integer,ArrayList<String>>() {{
     		put(0,new ArrayList<String>() {{
     		add("position");
     		add("userName");
@@ -66,7 +66,15 @@
     		}});
     }};
   
-  private HashMap<String, IDataMart.EType> idMap = new HashMap<String,EType>() {{
+  private Map<String, String> aliasMap = new HashMap<String,String>() {{
+    	put("position","org.eclipse.osbp.authentication.account.entities.UserAccount.position");
+    	put("userName","org.eclipse.osbp.authentication.account.entities.UserAccount.userName");
+    	put("notRegistered","org.eclipse.osbp.authentication.account.entities.UserAccount.notRegistered");
+    	put("email","org.eclipse.osbp.authentication.account.entities.UserAccount.email");
+    	put("profileimage","org.eclipse.osbp.authentication.account.entities.UserAccount.profileimage");
+    }};
+  
+  private Map<String, IDataMart.EType> idMap = new HashMap<String,EType>() {{
     			put("__UserAccount__ID__", EType.STRING);
     }};
   
@@ -74,35 +82,37 @@
     			add(new DatamartPrimary<String>("__UserAccount__ID__", "id", "org.eclipse.osbp.authentication.account.entities.UserAccount"));
     }};
   
-  private HashMap<String, HashMap<String, IDataMart.EType>> typesMap = new HashMap<String,HashMap<String,EType>>() {{
-    	new HashMap<String,EType>(){{
-    		put("UserAccount.position", EType.STRING);
-    		put("UserAccount.profileimage", EType.BLOPMAPPING);
-    		put("UserAccount.notRegistered", EType.BOOLEAN);
-    		put("UserAccount.userName", EType.STRING);
-    		put("UserAccount.email", EType.STRING);
-    	}};
+  private Map<String, IDataMart.EType> typesMap = new HashMap<String,EType>() {{
+    	put("UserAccount.position", EType.STRING);
+    	put("UserAccount.profileimage", EType.BLOPMAPPING);
+    	put("UserAccount.notRegistered", EType.BOOLEAN);
+    	put("UserAccount.userName", EType.STRING);
+    	put("UserAccount.email", EType.STRING);
     }};
   
-  private HashMap<String, String> typesProp = new HashMap<String, String>() {{
+  private Map<String, String> typesProp = new HashMap<String, String>() {{
     	put("position", "");
     }};
   
-  private HashMap<String, String> resultAttributes = new HashMap<String,String>();
+  private Map<String, String> resultAttributes = new HashMap<String,String>();
   
-  public HashMap<String, IDataMart.EType> getIdMap() {
+  public Map<String, IDataMart.EType> getIdMap() {
     return this.idMap;
   }
   
-  public ArrayList<DatamartPrimary<?>> getPrimaryList() {
+  public List<DatamartPrimary<?>> getPrimaryList() {
     return this.primaryList;
   }
   
-  public HashMap<Integer, ArrayList<String>> getAxisMap() {
+  public Map<Integer, ArrayList<String>> getAxisMap() {
     return this.axisMap;
   }
   
-  public HashMap<String, String> getTypesProp() {
+  public Map<String, String> getAliasMap() {
+    return this.aliasMap;
+  }
+  
+  public Map<String, String> getTypesProp() {
     return this.typesProp;
   }
   
@@ -136,8 +146,8 @@
     return resultAttributes.get(attributeName);
   }
   
-  public HashMap<String, IDataMart.EType> getTypesMap() {
-    return typesMap.get("Administrator");
+  public Map<String, IDataMart.EType> getTypesMap() {
+    return typesMap;
     
   }
   
@@ -310,7 +320,7 @@
     }
     if (rs != null) {
     	try {
-    		cellSet = new SqlCellSet(rs, getAxisMap(), getIdMap(), datamartDtoMapper, operativeDtoClass, operativeDtos, getPrimaryList());
+    		cellSet = new SqlCellSet(rs, getAxisMap(), getIdMap(), getAliasMap(), datamartDtoMapper, operativeDtoClass, operativeDtos, getPrimaryList(), org.eclipse.osbp.authentication.account.datamarts.DatamartsServiceBinder.getUserAccessService());
     		registerFirstLine(rs, user);
     		metaData = rs.getMetaData();
     		rs.close();
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 fa3f326..24ae69e 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
@@ -52,6 +52,8 @@
 import org.eclipse.e4.core.di.extensions.EventUtils;
 import org.eclipse.e4.ui.di.Focus;
 import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
+import org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl;
 import org.eclipse.e4.ui.workbench.IPresentationEngine;
 import org.eclipse.osbp.authentication.account.datamarts.UserAccountDatamart;
 import org.eclipse.osbp.bpm.api.BPMOperation;
@@ -420,7 +422,9 @@
         			}
     			}
     		}
+    		PerspectiveImpl perspective = (PerspectiveImpl) getContext().get(MPerspective.class);
     		EventDispatcherEvent evnt = new EventDispatcherEvent(EventDispatcherCommand.SELECT, "org.eclipse.osbp.authentication.account.entities.UserAccount.id", "org.eclipse.osbp.authentication.account.tables.UserAdministration");
+    		if(perspective != null){evnt.setPerspective(perspective);}
     		evnt.addItem(EventDispatcherDataTag.ID, dataSourceContainer.getValueByProperty(selection, "__useraccount__id__"));
     		eventDispatcher.sendEvent(evnt);
     		for (DatamartPrimary<?> primary : datamartInstance.getPrimaryList()){
@@ -428,6 +432,7 @@
     				Object primaryValue = dataSourceContainer.getValueByProperty(selection, primary.getAlias().toLowerCase());
     				if (primaryValue != null) {
     					evnt = new EventDispatcherEvent(EventDispatcherCommand.SELECT, primary.getEntityName() + "." + primary.getAttributeName(), "org.eclipse.osbp.authentication.account.tables.UserAdministration");
+    		    		if(perspective != null){evnt.setPerspective(perspective);}
     					evnt.addItem(EventDispatcherDataTag.ID, primaryValue);
     					eventDispatcher.sendEvent(evnt);
     				}
@@ -541,10 +546,13 @@
   public void receiveEvent(final EventDispatcherEvent event) {
     switch(event.getCommand()) {
     	case SELECT:
-    		if(!event.getSender().equals("org.eclipse.osbp.authentication.account.tables.UserAdministration")) {
-    			if(filterGenerator.selectItem(event, getSelectById())) {
-    				selectedId = event.getData().get(EventDispatcherDataTag.ID);
-    				renderData();
+    		PerspectiveImpl perspective = (PerspectiveImpl) eclipseContext.getActive(MPerspective.class);
+    		if(event.getPerspective() == null || (perspective != null && event.getPerspective().equals(perspective))){ 
+    			if(!event.getSender().equals("org.eclipse.osbp.authentication.account.tables.UserAdministration")) {
+    				if(filterGenerator.selectItem(event, getSelectById())) {
+    					selectedId = event.getData().get(EventDispatcherDataTag.ID);
+    					renderData();
+    				}
     			}
     		}
     		break;
@@ -578,6 +586,8 @@
   public void filterChanged(final DatamartFilter changedFilter) {
     if(changedFilter != null) {
     	EventDispatcherEvent evnt = new EventDispatcherEvent(EventDispatcherCommand.SELECT, changedFilter.getName(), "org.eclipse.osbp.authentication.account.tables.UserAdministration");
+    	PerspectiveImpl perspective = (PerspectiveImpl) getContext().get(MPerspective.class);
+    	if(perspective != null){evnt.setPerspective(perspective);}
     	evnt.addData(changedFilter.getSelectedData());
     	eventDispatcher.sendEvent(evnt);
     }
diff --git a/org.eclipse.osbp.authentication.ui/src/account.datamart b/org.eclipse.osbp.authentication.ui/src/account.datamart
index d566f0b..54a48e8 100644
--- a/org.eclipse.osbp.authentication.ui/src/account.datamart
+++ b/org.eclipse.osbp.authentication.ui/src/account.datamart
@@ -13,7 +13,7 @@
  * 	   Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
  * 
  */
-package org.eclipse.osbp.authentication.account.datamarts{
+package org.eclipse.osbp.authentication.account.datamarts{ 
 
 	datamart UserAccount 
 	using entity UserAccount {