Author: bdaw
Date: 2012-02-28 15:37:24 -0500 (Tue, 28 Feb 2012)
New Revision: 8480
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/Config.java
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
Log:
GTNPORTAL-2364 Duplicated last entry in the user list of the organization portlet
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/Config.java
===================================================================
---
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/Config.java 2012-02-28
18:03:49 UTC (rev 8479)
+++
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/Config.java 2012-02-28
20:37:24 UTC (rev 8480)
@@ -58,6 +58,8 @@
private boolean sortMemberships = true;
+ private boolean countPaginatedUsers = true;
+
public Config()
{
}
@@ -328,4 +330,14 @@
{
this.sortMemberships = sortMemberships;
}
+
+ public boolean isCountPaginatedUsers()
+ {
+ return countPaginatedUsers;
+ }
+
+ public void setCountPaginatedUsers(boolean countPaginatedUsers)
+ {
+ this.countPaginatedUsers = countPaginatedUsers;
+ }
}
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java
===================================================================
---
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java 2012-02-28
18:03:49 UTC (rev 8479)
+++
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java 2012-02-28
20:37:24 UTC (rev 8480)
@@ -555,7 +555,7 @@
q.getFirstName() == null &&
q.getLastName() == null)
{
- list = new IDMUserListAccess(qb, 20, true);
+ list = new IDMUserListAccess(qb, 20, !countPaginatedUsers());
}
else
{
@@ -924,4 +924,9 @@
// TODO: it should be there.
return ((PicketLinkIDMServiceImpl)service_).getRealmName();
}
+
+ private boolean countPaginatedUsers()
+ {
+ return orgService.getConfiguration().isCountPaginatedUsers();
+ }
}
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml 2012-02-28
18:03:49 UTC (rev 8479)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml 2012-02-28
20:37:24 UTC (rev 8480)
@@ -242,6 +242,19 @@
<field name="sortMemberships">
<boolean>true</boolean>
</field>
+
+ <!-- For some LDAP configurations where part of users can duplicate in both
DB and LDAP
+ it is not possible to count user efficiently for paginated query. Only way
is to download
+ whole content of LDAP server and exclude duplicates manually to return
accurate user count.
+ When this option is set to true GateIn will rely on user count information
returned from PLIDM
+ which can return greater number of users then in real non duplicated count
for perf reasons..
+ Those users will be filtered before returning search page however to not
return nulls last entry
+ can be duplicated in returned user list.
+ If this value is set to false GateIn will perform whole non paginated
query and filter it after.
+ It will result in more accurate results and paginated list size info
however can affect performance -->
+ <field name="countPaginatedUsers">
+ <boolean>true</boolean>
+ </field>
</object>
</object-param>
</init-params>
Show replies by date