Started refactoring user and group functionality
authorn.hoffmann <n.hoffmann@localhost>
Wed, 16 Feb 2011 15:07:16 +0000 (15:07 +0000)
committern.hoffmann <n.hoffmann@localhost>
Wed, 16 Feb 2011 15:07:16 +0000 (15:07 +0000)
22 files changed:
.gitattributes
taxeditor-application/src/main/java/eu/etaxonomy/taxeditor/perspective/Default.java
taxeditor-navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchResultView.java
taxeditor-store/META-INF/MANIFEST.MF
taxeditor-store/plugin.xml
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/AbstractAccountView.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/view/UserManagerView.java with 61% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/group/view/GroupLabelProvider.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/group/view/GroupView.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/AuthenticatedUserBar.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/AuthenticatedUserBar.java with 98% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/handler/CreateUserHandler.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/handler/CreateUserHandler.java with 82% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/handler/EditUserHandler.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/handler/EditUserHandler.java with 85% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/handler/ToggleUserEnablementHandler.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/handler/ToggleUserEnablementHandler.java with 86% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/operation/CreateUserOperation.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/operation/CreateUserOperation.java with 98% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/operation/DeleteUserOperation.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/operation/DeleteUserOperation.java with 97% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/operation/EditUserOperation.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/operation/EditUserOperation.java with 98% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/operation/ToggleUserEnablementOperation.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/operation/ToggleUserEnablementOperation.java with 98% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/view/UserContentProvider.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/view/UserManagerContentProvider.java with 91% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/view/UserLabelProvider.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/view/UserManagerLabelProvider.java with 91% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/view/UserView.java [new file with mode: 0644]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/wizard/UserWizard.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/wizard/UserWizard.java with 77% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/wizard/UserWizardPage.java [moved from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/wizard/UserWizardPage.java with 99% similarity]
taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java

index 6066b49dd692a9b7517fe2b83c86193d710c534f..89e6e0e5d5f6324ee25583fd3b9ce141452c7bc3 100644 (file)
@@ -1008,6 +1008,22 @@ taxeditor-store/icons/web.gif -text
 taxeditor-store/p2.inf -text
 taxeditor-store/plugin.xml -text
 taxeditor-store/pom.xml -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/AbstractAccountView.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/group/view/GroupLabelProvider.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/group/view/GroupView.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/AuthenticatedUserBar.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/handler/CreateUserHandler.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/handler/EditUserHandler.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/handler/ToggleUserEnablementHandler.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/operation/CreateUserOperation.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/operation/DeleteUserOperation.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/operation/EditUserOperation.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/operation/ToggleUserEnablementOperation.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/view/UserContentProvider.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/view/UserLabelProvider.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/view/UserView.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/wizard/UserWizard.java -text
+taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/wizard/UserWizardPage.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/CdmDataSourceRepository.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/handler/AbstractDataSourceHandler.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/datasource/handler/ChangeConnectionHandler.java -text
@@ -1159,19 +1175,6 @@ taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/store/StoreUtil.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/store/TermManager.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/store/TermStore.java -text
 taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/store/internal/TaxeditorStorePlugin.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/AuthenticatedUserBar.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/handler/CreateUserHandler.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/handler/EditUserHandler.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/handler/ToggleUserEnablementHandler.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/operation/CreateUserOperation.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/operation/DeleteUserOperation.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/operation/EditUserOperation.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/operation/ToggleUserEnablementOperation.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/view/UserManagerContentProvider.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/view/UserManagerLabelProvider.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/view/UserManagerView.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/wizard/UserWizard.java -text
-taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/wizard/UserWizardPage.java -text
 taxeditor-store/src/main/resources/eu/etaxonomy/cdm/editorApplicationContext.xml -text
 taxeditor-store/src/main/resources/log4j.properties -text
 taxeditor-store/src/test/java/eu/etaxonomy/taxeditor/store/CdmStoreTest.java -text
index 0cc9fec37cc6139ee0b1a012a4897a4f5e0ee5a7..fad8147f943e5954c270fa7de9ff77a79c3eee3b 100644 (file)
@@ -8,8 +8,8 @@ import org.eclipse.ui.IPerspectiveFactory;
 import org.eclipse.ui.IPlaceholderFolderLayout;
 import org.eclipse.ui.progress.IProgressConstants;
 
+import eu.etaxonomy.taxeditor.account.user.view.UserView;
 import eu.etaxonomy.taxeditor.datasource.view.CdmDataSourceViewPart;
-import eu.etaxonomy.taxeditor.user.view.UserManagerView;
 
 /**
  * @author n.hoffmann
@@ -31,7 +31,7 @@ public abstract class Default implements IPerspectiveFactory {
                
                folderAdditional.addPlaceholder(CdmDataSourceViewPart.ID);
                folderAdditional.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
-               folderAdditional.addPlaceholder(UserManagerView.ID);
+               folderAdditional.addPlaceholder(UserView.ID);
        }
 
 }
index e86abfe77626630a8e8968b38b8a9665207e0049..8e496369e982fe51acb3cbda5f5d29a67587433d 100644 (file)
@@ -38,7 +38,8 @@ import org.eclipse.ui.part.ViewPart;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.config.ITaxonServiceConfigurator;
-import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
+import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
 import eu.etaxonomy.taxeditor.model.IContextListener;
@@ -201,7 +202,7 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
         *
         * @param result a {@link java.util.List} object.
         */
-       protected void displaySearchResult(List<IdentifiableEntity> result) {
+       protected void displaySearchResult(List<UuidAndTitleCache<TaxonBase>> result) {
                if(result.size() > 0){
                        resultViewer.setInput(result); 
                        status.setText(result.size() + " entities found");
@@ -285,7 +286,7 @@ public class SearchResultView extends ViewPart implements IConversationEnabled{
                        monitor.beginTask("", 100);
                        monitor.worked(20);
                        
-                       final List<IdentifiableEntity> searchResult = CdmStore.getSearchManager().findTaxaAndNames(configurator);
+                       final List<UuidAndTitleCache<TaxonBase>> searchResult = CdmStore.getSearchManager().findTaxaAndNames(configurator);
                        monitor.worked(40);
                        
                        if(! monitor.isCanceled()){
index d498fbfabed636fc3e62362cc5caabe9c5796b06..cfaa3646aea0d5cd3d17b7205f8faae01084fb0c 100644 (file)
@@ -8,6 +8,10 @@ Bundle-Vendor: EDIT
 Export-Package: dbscripts,
  eu.etaxonomy.cdm,
  eu.etaxonomy.cdm.database,
+ eu.etaxonomy.taxeditor.account.user,
+ eu.etaxonomy.taxeditor.account.user.handler,
+ eu.etaxonomy.taxeditor.account.user.view,
+ eu.etaxonomy.taxeditor.account.user.wizard,
  eu.etaxonomy.taxeditor.datasource,
  eu.etaxonomy.taxeditor.datasource.handler,
  eu.etaxonomy.taxeditor.datasource.view,
@@ -31,11 +35,7 @@ Export-Package: dbscripts,
  eu.etaxonomy.taxeditor.preference.wizard,
  eu.etaxonomy.taxeditor.store,
  eu.etaxonomy.taxeditor.store.internal,
- eu.etaxonomy.taxeditor.store.operations,
- eu.etaxonomy.taxeditor.user,
- eu.etaxonomy.taxeditor.user.handler,
- eu.etaxonomy.taxeditor.user.view,
- eu.etaxonomy.taxeditor.user.wizard
+ eu.etaxonomy.taxeditor.store.operations
 Require-Bundle: org.eclipse.osgi,
  org.eclipse.ui,
  org.eclipse.jface.text,
index 7a4d2175c607066edadb5b410b036062fb9bc683..925ef36ef368f6396e63bfbc6154aa2678774ea0 100644 (file)
             restorable="true">
       </view>
       <view
-            class="eu.etaxonomy.taxeditor.user.view.UserManagerView"
+            class="eu.etaxonomy.taxeditor.account.user.view.UserView"
             icon="icons/system-users.png"
             id="eu.etaxonomy.taxeditor.store.userManagerView"
-            name="User Manager"
+            name="User"
+            restorable="true">
+      </view>
+      <view
+            class="eu.etaxonomy.taxeditor.account.group.view.GroupView"
+            id="eu.etaxonomy.taxeditor.store.groupView"
+            name="Group"
             restorable="true">
       </view>
       <view  
         id="eu.etaxonomy.taxeditor.reporting.viewPart"
         name="Reporting"
         restorable="true">
-  </view>  
+  </view>
    </extension>
    <extension
          point="org.eclipse.ui.menus">
             </command>
             <command
                   commandId="org.eclipse.ui.views.showView"
-                  label="User Manager"
+                  label="Users"
                   style="push">
                <parameter
                      name="org.eclipse.ui.views.showView.viewId"
                   </reference>
                </visibleWhen>
             </command>
+            <command
+                  commandId="org.eclipse.ui.views.showView"
+                  label="Groups"
+                  style="push">
+               <parameter
+                     name="org.eclipse.ui.views.showView.viewId"
+                     value="eu.etaxonomy.taxeditor.store.groupView">
+               </parameter>
+            </command>
          </menu>
       </menuContribution>
       <menuContribution
          <toolbar
                id="eu.etaxonomy.taxeditor.store.authentication.trim.toolbar">
             <control
-                  class="eu.etaxonomy.taxeditor.user.AuthenticatedUserBar">
+                  class="eu.etaxonomy.taxeditor.account.user.AuthenticatedUserBar">
             </control>
          </toolbar>
       </menuContribution>
    <extension
          point="org.eclipse.ui.commands">
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.user.handler.CreateUserHandler"
+            defaultHandler="eu.etaxonomy.taxeditor.account.user.handler.CreateUserHandler"
             id="eu.etaxonomy.taxeditor.store.createUser"
             name="Create User">
       </command>
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.user.handler.EditUserHandler"
+            defaultHandler="eu.etaxonomy.taxeditor.account.user.handler.EditUserHandler"
             id="eu.etaxonomy.taxeditor.store.editUser"
             name="Edit User">
       </command>
       <command
-            defaultHandler="eu.etaxonomy.taxeditor.user.handler.ToggleUserEnablementHandler"
+            defaultHandler="eu.etaxonomy.taxeditor.account.user.handler.ToggleUserEnablementHandler"
             id="eu.etaxonomy.taxeditor.store.disableUser"
             name="Toggle User Enablement">
       </command>
similarity index 61%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/view/UserManagerView.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/AbstractAccountView.java
index 51509e154418c2fe1995d9934f773d89c640b46f..169e69b4f9bd4dc575d17e67c2c2b2865ef2d768 100644 (file)
@@ -8,15 +8,16 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user.view;
+package eu.etaxonomy.taxeditor.account;
 
-import java.util.List;
+import java.util.Collection;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.action.GroupMarker;
 import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
 import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.FocusAdapter;
 import org.eclipse.swt.events.FocusEvent;
@@ -24,16 +25,13 @@ import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Table;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.part.ViewPart;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
-import eu.etaxonomy.cdm.api.service.IUserService;
 import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.common.User;
 import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
 import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
 import eu.etaxonomy.taxeditor.model.IContextListener;
@@ -41,14 +39,13 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
- * <p>UserManagerView class.</p>
- *
  * @author n.hoffmann
- * @created 01.07.2009
+ * @created Feb 16, 2011
  * @version 1.0
  */
-public class UserManagerView extends ViewPart implements IConversationEnabled, IPostOperationEnabled{
-       
+public abstract class AbstractAccountView<T> extends ViewPart implements
+               IConversationEnabled, IPostOperationEnabled {
+
        private class ContextListener extends ContextListenerAdapter{
 
                /* (non-Javadoc)
@@ -57,7 +54,7 @@ public class UserManagerView extends ViewPart implements IConversationEnabled, I
                @Override
                public void contextStop(IMemento memento, IProgressMonitor monitor) {
                        monitor.subTask("Shutting down User View");
-                       tableViewer.setInput(null);
+                       viewer.setInput(null);
                }
 
                /* (non-Javadoc)
@@ -66,19 +63,16 @@ public class UserManagerView extends ViewPart implements IConversationEnabled, I
                @Override
                public void contextStart(IMemento memento, IProgressMonitor monitor) {
                        monitor.subTask("Initiating User View");
-                       tableViewer.setInput(getAllUser());
+                       viewer.setInput(getInput());
                }
        }
        
-       /** Constant <code>ID="eu.etaxonomy.taxeditor.store.userManage"{trunked}</code> */
-       public static String ID = "eu.etaxonomy.taxeditor.store.userManagerView";
-       
-       private TableViewer tableViewer;
-
        private ConversationHolder conversation;
-
+       
+       protected TableViewer viewer;
+       
        private IContextListener contextListener;
-
+       
        /* (non-Javadoc)
         * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
         */
@@ -94,26 +88,26 @@ public class UserManagerView extends ViewPart implements IConversationEnabled, I
                fillLayout.type = SWT.VERTICAL; 
                parent.setLayout(fillLayout);
                
-               tableViewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL
+               viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL
                                | SWT.V_SCROLL | SWT.FULL_SELECTION);
                
-               getSite().setSelectionProvider(tableViewer);
+               getSite().setSelectionProvider(viewer);
                
-               createColumns(tableViewer);
+               createColumns(viewer);
                
                MenuManager menuMgr = new MenuManager();
                menuMgr.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS));
-               getSite().registerContextMenu(menuMgr, tableViewer);
+               getSite().registerContextMenu(menuMgr, viewer);
 
-               Control control = tableViewer.getControl();
+               Control control = viewer.getControl();
                Menu menu = menuMgr.createContextMenu(control);
                control.setMenu(menu);  
                
-               tableViewer.setContentProvider(new UserManagerContentProvider());
-               tableViewer.setLabelProvider(new UserManagerLabelProvider());
+               viewer.setContentProvider(new ArrayContentProvider());
+               viewer.setLabelProvider(getLabelProvider());
                                
                if(CdmStore.isActive()){
-                       tableViewer.setInput(getAllUser());
+                       viewer.setInput(getInput());
                }
                
                
@@ -124,103 +118,97 @@ public class UserManagerView extends ViewPart implements IConversationEnabled, I
                        @Override
                        public void focusGained(FocusEvent e) {
                                super.focusGained(e);
-                               conversation.bind();
-                               tableViewer.getControl().setFocus();
+                               getConversationHolder().bind();
+                               viewer.getControl().setFocus();
                        }
                });
        }
+       
+       /**
+        * @return
+        */
+       protected abstract IBaseLabelProvider getLabelProvider();
 
-       // This will create the columns for the table
-       private void createColumns(TableViewer viewer) {
-               Table table = viewer.getTable();
-               String[] titles = {"Active", "Name", "Enabled", "Locked", "Person", "Email"};
-               int[] bounds = { 20, 200, 50, 50, 200, 100};
-
-               for (int i = 0; i < titles.length; i++) {
-                       TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
-                       column.getColumn().setText(titles[i]);
-                       column.getColumn().setWidth(bounds[i]);
-                       column.getColumn().setResizable(true);
-                       column.getColumn().setMoveable(true);
+       /**
+        * @param viewer2
+        */
+       protected abstract void createColumns(TableViewer viewer);
+       
+       /**
+        * @return the contextListener
+        */
+       public IContextListener getContextListener() {
+               if(contextListener == null){
+                       throw new IllegalStateException("Context listener was not initialized");
                }
-               table.setHeaderVisible(true);
-               table.setLinesVisible(true);
+               return contextListener;
        }
        
        /* (non-Javadoc)
-        * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
+        * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
         */
-       /** {@inheritDoc} */
        @Override
-       public void setFocus() {
-               if(conversation != null){
-                       conversation.bind();
-               }
-               tableViewer.getControl().setFocus();
+       public void update(CdmDataChangeMap changeEvents) {
+               // data changes can only be generate here at the moment
        }
 
-       
-       
        /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.operations.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
+        * @see eu.etaxonomy.taxeditor.operation.IPostOperationEnabled#postOperation(eu.etaxonomy.cdm.model.common.CdmBase)
         */
-       /** {@inheritDoc} */
+       @Override
        public boolean postOperation(CdmBase objectAffectedByOperation) {
                if(CdmStore.isActive()){
-                       List<User> allUsers = getAllUser();
-                       
-                       tableViewer.setInput(allUsers);
-                       tableViewer.refresh();
+                       viewer.setInput(getInput());
+                       viewer.refresh();
                }
                
                return true;
        }
+
        
        /**
-        * 
         * @return
         */
-       private List<User> getAllUser(){
-               conversation = CdmStore.createConversation();
-               return CdmStore.getService(IUserService.class).list(null, null, null, null, null);
+       public abstract Collection getInput();
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.operation.IPostOperationEnabled#onComplete()
+        */
+       @Override
+       public boolean onComplete() {
+               return true;
        }
 
        /* (non-Javadoc)
         * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
         */
-       /**
-        * <p>getConversationHolder</p>
-        *
-        * @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        */
+       @Override
        public ConversationHolder getConversationHolder() {
+               if(conversation == null){
+                       conversation = CdmStore.createConversation();
+               }
                return conversation;
        }
-
+       
        /* (non-Javadoc)
-        * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
+        * @see org.eclipse.ui.part.WorkbenchPart#dispose()
         */
-       /** {@inheritDoc} */
-       public void update(CdmDataChangeMap changeEvents) {
-               // data changes can only be generate here at the moment
-       }
-
-       /** {@inheritDoc} */
        @Override
        public void dispose() {
-               CdmStore.getContextManager().removeContextListener(contextListener);
+               CdmStore.getContextManager().removeContextListener(getContextListener());
                super.dispose();
        }
 
-       /**
-        * <p>onComplete</p>
-        *
-        * @return a boolean.
+       /* (non-Javadoc)
+        * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
         */
-       public boolean onComplete() {
-               return true;
+       /** {@inheritDoc} */
+       @Override
+       public void setFocus() {
+               if(getConversationHolder() != null){
+                       getConversationHolder().bind();
+               }
+               viewer.getControl().setFocus();
        }
 
-
-       
 }
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/group/view/GroupLabelProvider.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/group/view/GroupLabelProvider.java
new file mode 100644 (file)
index 0000000..f04f9bb
--- /dev/null
@@ -0,0 +1,37 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.account.group.view;
+
+import org.eclipse.jface.viewers.LabelProvider;
+
+import eu.etaxonomy.cdm.model.common.Group;
+
+/**
+ * @author n.hoffmann
+ * @created Feb 16, 2011
+ * @version 1.0
+ */
+public class GroupLabelProvider extends LabelProvider {
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+        */
+       @Override
+       public String getText(Object element) {
+               if(element instanceof Group){
+                       
+                       return ((Group) element).getName();
+                       
+               }
+               return super.getText(element);
+       }
+       
+}
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/group/view/GroupView.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/group/view/GroupView.java
new file mode 100644 (file)
index 0000000..f553464
--- /dev/null
@@ -0,0 +1,55 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.account.group.view;
+
+import java.util.Collection;
+
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+
+import eu.etaxonomy.cdm.api.service.IUserService;
+import eu.etaxonomy.cdm.model.common.Group;
+import eu.etaxonomy.taxeditor.account.AbstractAccountView;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author n.hoffmann
+ * @created Feb 16, 2011
+ * @version 1.0
+ */
+public class GroupView extends AbstractAccountView<Group>{
+
+       public static String ID = "eu.etaxonomy.taxeditor.store.groupView";
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.account.AbstractAccountView#getInput()
+        */
+       @Override
+       public Collection<String> getInput() {
+               return CdmStore.getService(IUserService.class).findAllGroups();
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.account.AbstractAccountView#getLabelProvider()
+        */
+       @Override
+       protected IBaseLabelProvider getLabelProvider() {
+               return new GroupLabelProvider();
+       }
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.account.AbstractAccountView#createColumns(org.eclipse.jface.viewers.TableViewer)
+        */
+       @Override
+       protected void createColumns(TableViewer viewer) {
+       }
+       
+}
similarity index 98%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/AuthenticatedUserBar.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/AuthenticatedUserBar.java
index 4728f4e102b94ba61b79c70b65341d20533f9733..d865ab6edc93f15e58315573d9d5c7c1bb5061d5 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user;
+package eu.etaxonomy.taxeditor.account.user;
 
 import java.util.Observable;
 import java.util.Observer;
similarity index 82%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/handler/CreateUserHandler.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/handler/CreateUserHandler.java
index eac13def86cf5c90542b65063f48a74b8eb8633d..ed72245ca6a4ee12db2947f33f5ad0ae6202202a 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user.handler;
+package eu.etaxonomy.taxeditor.account.user.handler;
 
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
@@ -17,8 +17,8 @@ import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.handlers.HandlerUtil;
 
-import eu.etaxonomy.taxeditor.user.view.UserManagerView;
-import eu.etaxonomy.taxeditor.user.wizard.UserWizard;
+import eu.etaxonomy.taxeditor.account.user.view.UserView;
+import eu.etaxonomy.taxeditor.account.user.wizard.UserWizard;
 
 /**
  * <p>CreateUserHandler class.</p>
@@ -36,7 +36,7 @@ public class CreateUserHandler extends AbstractHandler {
        public Object execute(ExecutionEvent event) throws ExecutionException {
                Shell shell = HandlerUtil.getActiveShell(event);
                
-               UserManagerView part = (UserManagerView) HandlerUtil.getActivePart(event);
+               UserView part = (UserView) HandlerUtil.getActivePart(event);
                UserWizard wizard = new UserWizard(part); 
                
                WizardDialog dialog = new WizardDialog(shell, wizard);
similarity index 85%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/handler/EditUserHandler.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/handler/EditUserHandler.java
index 41e5a86c699fe1c38aa754158cb9bcb31dafe288..4aa87305d182dac2dd9c826496c9fb48964c83d8 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user.handler;
+package eu.etaxonomy.taxeditor.account.user.handler;
 
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
@@ -19,8 +19,8 @@ import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.user.view.UserManagerView;
-import eu.etaxonomy.taxeditor.user.wizard.UserWizard;
+import eu.etaxonomy.taxeditor.account.user.view.UserView;
+import eu.etaxonomy.taxeditor.account.user.wizard.UserWizard;
 
 /**
  * <p>EditUserHandler class.</p>
@@ -39,7 +39,7 @@ public class EditUserHandler extends AbstractHandler {
                ISelection menuSelection = HandlerUtil.getActiveMenuSelection(event);
                User user = (User) ((StructuredSelection) menuSelection).getFirstElement();
 
-               UserManagerView part = (UserManagerView) HandlerUtil.getActivePart(event);
+               UserView part = (UserView) HandlerUtil.getActivePart(event);
                
                UserWizard wizard = new UserWizard(part, user);
                WizardDialog dialog = new WizardDialog(HandlerUtil.getActiveShell(event), wizard);
similarity index 86%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/handler/ToggleUserEnablementHandler.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/handler/ToggleUserEnablementHandler.java
index 85f71cd579bb08a95b550c1eb7c1c42d4a38e1bb..a0b0574a51b2ca79f39da8dd812777e877e408c9 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user.handler;
+package eu.etaxonomy.taxeditor.account.user.handler;
 
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
@@ -18,10 +18,10 @@ import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.ui.handlers.HandlerUtil;
 
 import eu.etaxonomy.cdm.model.common.User;
+import eu.etaxonomy.taxeditor.account.user.operation.ToggleUserEnablementOperation;
+import eu.etaxonomy.taxeditor.account.user.view.UserView;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.user.operation.ToggleUserEnablementOperation;
-import eu.etaxonomy.taxeditor.user.view.UserManagerView;
 
 /**
  * <p>ToggleUserEnablementHandler class.</p>
@@ -45,7 +45,7 @@ public class ToggleUserEnablementHandler extends AbstractHandler {
                        User user = (User) object;
 
                        // TODO refresh the list -> set postOperationEnabled to the real deal
-                       UserManagerView userManagerView = (UserManagerView) HandlerUtil.getActivePart(event);
+                       UserView userManagerView = (UserView) HandlerUtil.getActivePart(event);
                        
                        AbstractPostOperation operation = null;
                        try {
similarity index 98%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/operation/CreateUserOperation.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/operation/CreateUserOperation.java
index d8c619d7e11ee44ed022808a537a214008a37c58..73beb4d86b0f1ad5ce25406aad4510802478bbc2 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user.operation;
+package eu.etaxonomy.taxeditor.account.user.operation;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.operations.IUndoContext;
similarity index 97%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/operation/DeleteUserOperation.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/operation/DeleteUserOperation.java
index 597a983c08edf2145de9db27a7035a1a1fa3c4a2..f8e07494172f62466c5d3ce1d56e0bd5598d6b46 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user.operation;
+package eu.etaxonomy.taxeditor.account.user.operation;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.operations.IUndoContext;
similarity index 98%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/operation/EditUserOperation.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/operation/EditUserOperation.java
index e8f6cfee3ca04733cf447ab2cea9f0bca6798c88..a1ca3e41ede5a8215a102a2942db3f0fbf70f159 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user.operation;
+package eu.etaxonomy.taxeditor.account.user.operation;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.operations.IUndoContext;
similarity index 98%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/operation/ToggleUserEnablementOperation.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/operation/ToggleUserEnablementOperation.java
index ec32bf2fc84522799d05fc0df9c8e7fc618547e8..a3edcf237638b91306491880bf449790382bbe22 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user.operation;
+package eu.etaxonomy.taxeditor.account.user.operation;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.commands.operations.IUndoContext;
similarity index 91%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/view/UserManagerContentProvider.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/view/UserContentProvider.java
index a569052a2b86097c4e71237f6618ac4e788485f9..1d50ed7a27b205d47bb66ac343087191e7feb6bf 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user.view;
+package eu.etaxonomy.taxeditor.account.user.view;
 
 import java.util.List;
 
@@ -24,7 +24,7 @@ import eu.etaxonomy.cdm.model.common.User;
  * @created 01.07.2009
  * @version 1.0
  */
-public class UserManagerContentProvider implements IStructuredContentProvider {
+public class UserContentProvider implements IStructuredContentProvider {
 
        /* (non-Javadoc)
         * @see org.eclipse.jface.viewers.IContentProvider#dispose()
similarity index 91%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/view/UserManagerLabelProvider.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/view/UserLabelProvider.java
index 18769aa170144a529b5c738bf2c6d9c0a32f971b..8f8e4da3b4b4435c6ef80e596194d6b3f25b5b04 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user.view;
+package eu.etaxonomy.taxeditor.account.user.view;
 
 import org.eclipse.jface.viewers.ITableLabelProvider;
 import org.eclipse.jface.viewers.LabelProvider;
@@ -25,7 +25,7 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
  * @created 01.07.2009
  * @version 1.0
  */
-public class UserManagerLabelProvider extends LabelProvider implements ITableLabelProvider {
+public class UserLabelProvider extends LabelProvider implements ITableLabelProvider {
 
        /** {@inheritDoc} */
        public Image getColumnImage(Object element, int columnIndex) {
diff --git a/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/view/UserView.java b/taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/view/UserView.java
new file mode 100644 (file)
index 0000000..34f9cfd
--- /dev/null
@@ -0,0 +1,74 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.account.user.view;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Table;
+
+import eu.etaxonomy.cdm.api.service.IUserService;
+import eu.etaxonomy.cdm.model.common.User;
+import eu.etaxonomy.taxeditor.account.AbstractAccountView;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * <p>UserManagerView class.</p>
+ *
+ * @author n.hoffmann
+ * @created 01.07.2009
+ * @version 1.0
+ */
+public class UserView extends AbstractAccountView<User>{
+       
+       
+       /** Constant <code>ID="eu.etaxonomy.taxeditor.store.userManage"{trunked}</code> */
+       public static String ID = "eu.etaxonomy.taxeditor.store.userManagerView";
+       
+       // This will create the columns for the table
+       protected void createColumns(TableViewer viewer) {
+               Table table = viewer.getTable();
+               String[] titles = {"Active", "Name", "Enabled", "Locked", "Person", "Email"};
+               int[] bounds = { 20, 200, 50, 50, 200, 100};
+
+               for (int i = 0; i < titles.length; i++) {
+                       TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
+                       column.getColumn().setText(titles[i]);
+                       column.getColumn().setWidth(bounds[i]);
+                       column.getColumn().setResizable(true);
+                       column.getColumn().setMoveable(true);
+               }
+               table.setHeaderVisible(true);
+               table.setLinesVisible(true);
+       }
+       
+       
+       /**
+        * 
+        * @return
+        */
+       public List<User> getInput(){
+               return CdmStore.getService(IUserService.class).list(null, null, null, null, null);
+       }
+
+
+       /* (non-Javadoc)
+        * @see eu.etaxonomy.taxeditor.account.AbstractAccountView#getLabelProvider()
+        */
+       @Override
+       protected IBaseLabelProvider getLabelProvider() {
+               return new UserLabelProvider();
+       }
+       
+}
similarity index 77%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/wizard/UserWizard.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/wizard/UserWizard.java
index b1421dd4991c3cd40fa05d324c8518e85ddeb9b9..354f40655fa31a1c9b55357e00649f08e40aa403 100644 (file)
@@ -8,17 +8,17 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user.wizard;
+package eu.etaxonomy.taxeditor.account.user.wizard;
 
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.wizard.Wizard;
 
 import eu.etaxonomy.cdm.model.common.User;
+import eu.etaxonomy.taxeditor.account.user.operation.CreateUserOperation;
+import eu.etaxonomy.taxeditor.account.user.operation.EditUserOperation;
+import eu.etaxonomy.taxeditor.account.user.view.UserView;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
-import eu.etaxonomy.taxeditor.user.operation.CreateUserOperation;
-import eu.etaxonomy.taxeditor.user.operation.EditUserOperation;
-import eu.etaxonomy.taxeditor.user.view.UserManagerView;
 
 /**
  * <p>UserWizard class.</p>
@@ -30,15 +30,15 @@ import eu.etaxonomy.taxeditor.user.view.UserManagerView;
 public class UserWizard extends Wizard {
        private User user;
        private UserWizardPage page;
-       private UserManagerView view;
+       private UserView view;
        private boolean createMode;
 
        /**
         * <p>Constructor for UserWizard.</p>
         *
-        * @param view a {@link eu.etaxonomy.taxeditor.user.view.UserManagerView} object.
+        * @param view a {@link eu.etaxonomy.taxeditor.account.user.view.UserView} object.
         */
-       public UserWizard(UserManagerView view){
+       public UserWizard(UserView view){
                this.view = view;
                setWindowTitle("User Wizard");
                createMode = true;
@@ -47,10 +47,10 @@ public class UserWizard extends Wizard {
        /**
         * <p>Constructor for UserWizard.</p>
         *
-        * @param view a {@link eu.etaxonomy.taxeditor.user.view.UserManagerView} object.
+        * @param view a {@link eu.etaxonomy.taxeditor.account.user.view.UserView} object.
         * @param user a {@link eu.etaxonomy.cdm.model.common.User} object.
         */
-       public UserWizard(UserManagerView view, User user){
+       public UserWizard(UserView view, User user){
                this(view);
                if(user != null){
                        this.user = user;
similarity index 99%
rename from taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/user/wizard/UserWizardPage.java
rename to taxeditor-store/src/main/java/eu/etaxonomy/taxeditor/account/user/wizard/UserWizardPage.java
index 6e938946c4bc72802a601702043ae57c2a6e2629..aacee67c84dcc464d6a9caebf268d6a466ad2076 100644 (file)
@@ -8,7 +8,7 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.user.wizard;
+package eu.etaxonomy.taxeditor.account.user.wizard;
 
 import org.eclipse.jface.dialogs.IInputValidator;
 import org.eclipse.jface.wizard.WizardPage;
index 484a2aae82a630d675b7ca48724bf71fbefa6790..3119397a830dc54cfd43ccc13e3cf2c4e63e3dec 100644 (file)
@@ -22,9 +22,11 @@ import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurato
 import eu.etaxonomy.cdm.api.service.config.ITaxonServiceConfigurator;
 import eu.etaxonomy.cdm.model.agent.AgentBase;
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
+import eu.etaxonomy.cdm.model.common.UuidAndTitleCache;
 import eu.etaxonomy.cdm.model.name.TaxonNameBase;
 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
 
 /**
  * @author n.hoffmann
@@ -53,9 +55,9 @@ public class SearchManager {
         * @param configurator a {@link eu.etaxonomy.cdm.api.service.config.ITaxonServiceConfigurator} object.
         * @return a {@link java.util.List} object.
         */
-       public static List<IdentifiableEntity> findTaxaAndNames(ITaxonServiceConfigurator configurator){
+       public static List<UuidAndTitleCache<TaxonBase>> findTaxaAndNames(ITaxonServiceConfigurator configurator){
                
-               return CdmStore.getService(ITaxonService.class).findTaxaAndNames(configurator).getRecords();
+               return CdmStore.getService(ITaxonService.class).findTaxaAndNamesForEditor(configurator);
        }
        
        /**