Gilad Chaplik has uploaded a new change for review.

Change subject: webadmin: DataProvider.java cleanup (6/6)
......................................................................

webadmin: DataProvider.java cleanup (6/6)

DataProvider is a class which is mostly obsolete,
as it contains synchronous calls to the engine,
which are not relevant anymore under the GWT platform/infrastructure.

The goal is to eliminate this class all-together.

In this patch:
1) Removing sync getUsers and not replacing it;
The original flow was to get all users, and filter
out users that are already included.
This filtering needs further thinking,
beacuse the admins may be confused by it (e.g. empty list)

2) Deleting DataProvider.java since it's now empty

Change-Id: I31f6af5b3af32a55a623ce701c2a6c384bef6ddc
Signed-off-by: Gilad Chaplik <gchap...@redhat.com>
Bug-Url: https://bugzilla.redhat.com/881747
---
D 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/DataProvider.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserListModel.java
2 files changed, 0 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/22/9722/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/DataProvider.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/DataProvider.java
deleted file mode 100644
index fd182ca..0000000
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/DataProvider.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.ovirt.engine.ui.uicommonweb;
-
-import java.util.ArrayList;
-
-import org.ovirt.engine.core.common.businessentities.DbUser;
-import org.ovirt.engine.core.common.businessentities.IVdcQueryable;
-import org.ovirt.engine.core.common.interfaces.SearchType;
-import org.ovirt.engine.core.common.queries.SearchParameters;
-import org.ovirt.engine.core.common.queries.VdcQueryReturnValue;
-import org.ovirt.engine.core.common.queries.VdcQueryType;
-import org.ovirt.engine.ui.frontend.Frontend;
-
-/**
- * Contains method for retrieving common data (mostly via frontend).
- *
- *
- * All method returning list of objects must avoid returning a null value, but 
an empty list.
- */
-@SuppressWarnings("unused")
-public final class DataProvider
-{
-    public static ArrayList<DbUser> GetUserList()
-    {
-        VdcQueryReturnValue returnValue =
-                Frontend.RunQuery(VdcQueryType.Search, new 
SearchParameters("User:", SearchType.DBUser)); //$NON-NLS-1$
-
-        if (returnValue != null && returnValue.getSucceeded() && 
returnValue.getReturnValue() != null)
-        {
-            return Linq.<DbUser> Cast((ArrayList<IVdcQueryable>) 
returnValue.getReturnValue());
-        }
-
-        return new ArrayList<DbUser>();
-    }
-
-}
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserListModel.java
index c0114ce..0ac0425 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/users/UserListModel.java
@@ -25,7 +25,6 @@
 import org.ovirt.engine.ui.frontend.AsyncQuery;
 import org.ovirt.engine.ui.frontend.Frontend;
 import org.ovirt.engine.ui.frontend.INewAsyncCallback;
-import org.ovirt.engine.ui.uicommonweb.DataProvider;
 import org.ovirt.engine.ui.uicommonweb.Linq;
 import org.ovirt.engine.ui.uicommonweb.TagsEqualityComparer;
 import org.ovirt.engine.ui.uicommonweb.UICommand;
@@ -333,7 +332,6 @@
         setWindow(model);
         
model.setTitle(ConstantsManager.getInstance().getConstants().addUsersAndGroupsTitle());
         model.setHashName("add_users_and_groups"); //$NON-NLS-1$
-        model.setExcludeItems(DataProvider.GetUserList());
         model.setIsRoleListHidden(true);
         model.getIsEveryoneSelectionHidden().setEntity(true);
 


--
To view, visit http://gerrit.ovirt.org/9722
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I31f6af5b3af32a55a623ce701c2a6c384bef6ddc
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <gchap...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to