Author: prabhat.jha(a)jboss.com
Date: 2009-02-15 21:29:38 -0500 (Sun, 15 Feb 2009)
New Revision: 12824
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java
Log:
Apply JBoss Coding Convention and Formatting
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java 2009-02-16
02:09:50 UTC (rev 12823)
+++
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/admin/UserAdministrationBean.java 2009-02-16
02:29:38 UTC (rev 12824)
@@ -69,22 +69,22 @@
/** The roles */
private List<String> roles = new ArrayList<String>();
-
+
/** The node which should be displayed. */
private String displayNode = IdentityConstants.JBPM_NODE_APPROVAL;
-
+
/** The subscription mode. */
private String subscriptionMode;
-
+
/** The admin subscription mode. */
private String adminSubscriptionMode;
-
+
/** The pending users. */
private List<UserContainer> pendingUsers = null;
-
+
/** The pending list selected for approval or reject. */
private List<UserContainer> pendingActionList = null;
-
+
/** The pending user action. */
private String pendingUserAction = null;
@@ -99,16 +99,16 @@
/** The idenetity role bean. */
private IdentityRoleBean identityRoleBean;
-
+
/** The registration service. */
private RegistrationService registrationService;
/** The logger. */
private static final Logger log = Logger.getLogger(UserAdministrationBean.class);
-
+
/** The decoder. */
private static final FastURLDecoder decoder = FastURLDecoder.getUTF8Instance();
-
+
private boolean isNewSearch=true;
public UserAdministrationBean()
@@ -174,27 +174,27 @@
{
this.uiUser = uiUser;
}
-
+
public String getSubscriptionMode()
{
return subscriptionMode;
}
-
+
public void setSubscriptionMode(String subscriptionMode)
{
this.subscriptionMode = subscriptionMode;
}
-
+
public String getAdminSubscriptionMode()
{
return adminSubscriptionMode;
}
-
+
public void setAdminSubscriptionMode(String adminSubscriptionMode)
{
this.adminSubscriptionMode = adminSubscriptionMode;
}
-
+
public IdentityUserBean getIdentityUserBean()
{
return identityUserBean;
@@ -204,7 +204,7 @@
{
return pendingUserAction;
}
-
+
public List<UserContainer> getPendingActionList()
{
return pendingActionList;
@@ -241,19 +241,21 @@
{
try
{
-
- int initLimit = Integer.valueOf(limit).intValue();
- int offset = 0;
- if(!isNewSearch)
- {
+
+ int initLimit = Integer.valueOf(limit).intValue();
+ int offset = 0;
+ if(!isNewSearch)
+ {
offset = page > 0 ? ((page - 1) * initLimit) : 0;
isNewSearch = true;
- }
-
- else
- page = 1;
-
-
+ }
+
+ else
+ {
+ page = 1;
+ }
+
+
int limit1 = initLimit + 1;
this.userList = new
ListDataModel(identityUserBean.findUsersFilteredByUserName(searchString, offset,
limit1));
}
@@ -275,7 +277,7 @@
String action = (String) params.get("enableAction");
ResourceBundle bundle = ResourceBundle.getBundle("conf.bundles.Identity",
ctx.getViewRoot().getLocale());
this.currentUser = params.get("currentUser") != null ?
decoder.encode((String) params.get("currentUser")) : null;
-
+
if (this.currentUser != null && action != null)
{
Map<String, Object> profileMap = new HashMap<String, Object>();
@@ -303,7 +305,7 @@
return "userAdmin";
}
// Updating search
- if (action.equals("enable"))
+ if (action.equals("enable"))
{
ctx.addMessage("status", new
FacesMessage(bundle.getString("IDENTITY_MANAGEMENT_ENABLE_USER_ENABLED")));
}
@@ -316,7 +318,7 @@
}
return "searchUsers";
}
-
+
public int getPendingCount()
{
try
@@ -329,7 +331,7 @@
return -1;
}
}
-
+
public int getUserCount()
{
if (userCount == 0)
@@ -347,13 +349,13 @@
}
return userCount;
}
-
+
public List<UserContainer> getPendingUsers()
{
try
{
if ( this.registrationService != null && this.pendingUsers == null)
- this.pendingUsers =
this.registrationService.getPendingUsers(displayNode);
+ this.pendingUsers = this.registrationService.getPendingUsers(displayNode);
}
catch (CoreIdentityConfigurationException e)
{
@@ -368,7 +370,7 @@
ExternalContext ectx = ctx.getExternalContext();
Map params = ectx.getRequestParameterMap();
this.currentUser = params.get("currentUser") != null ?
decoder.encode((String) params.get("currentUser")) : null;
-
+
if (this.currentUser != null)
{
this.uiUser = new IdentityUIUser(this.currentUser);
@@ -396,23 +398,23 @@
}
return "userAdmin";
}
-
+
public String nextPage()
{
- isNewSearch = false;
+ isNewSearch = false;
this.page++;
this.searchUsers();
return "searchUsers";
}
-
+
public String prevPage()
{
- isNewSearch = false;
+ isNewSearch = false;
this.page--;
this.searchUsers();
return "searchUsers";
}
-
+
public String approveRegistration()
{
ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
@@ -445,7 +447,7 @@
else
return "userAdmin";
}
-
+
public String approveList()
{
this.pendingUserAction = "approve";
@@ -463,7 +465,7 @@
}
return "pendingUsers";
}
-
+
public String rejectList()
{
this.pendingUserAction = "reject";
@@ -481,7 +483,7 @@
}
return "pendingUsers";
}
-
+
public String confirmPendingAction()
{
try
Show replies by date