[gatein-commits] gatein SVN: r8506 - in epp/portal/branches/EPP_5_2_Branch: web/portal/src/main/webapp/WEB-INF/conf/organization and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Feb 29 16:12:31 EST 2012
Author: bdaw
Date: 2012-02-29 16:12:29 -0500 (Wed, 29 Feb 2012)
New Revision: 8506
Modified:
epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/Config.java
epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
Log:
bug 794436 Duplicated last entry in the user list of the organization portlet
Modified: epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/Config.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/Config.java 2012-02-29 20:29:52 UTC (rev 8505)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/Config.java 2012-02-29 21:12:29 UTC (rev 8506)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java 2012-02-29 20:29:52 UTC (rev 8505)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/main/java/org/exoplatform/services/organization/idm/UserDAOImpl.java 2012-02-29 21:12:29 UTC (rev 8506)
@@ -557,7 +557,7 @@
q.getFirstName() == null &&
q.getLastName() == null)
{
- list = new IDMUserListAccess(qb, 20, true);
+ list = new IDMUserListAccess(qb, 20, !countPaginatedUsers());
}
else
{
@@ -968,4 +968,9 @@
log.error("Cannot remove displayName attribute of user: " + user.getUserName() + "; ", e);
}
}
+
+ private boolean countPaginatedUsers()
+ {
+ return orgService.getConfiguration().isCountPaginatedUsers();
+ }
}
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml 2012-02-29 20:29:52 UTC (rev 8505)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml 2012-02-29 21:12:29 UTC (rev 8506)
@@ -278,6 +278,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>
More information about the gatein-commits
mailing list