Revision 115:933b6a3a9c42

View differences:

resource/com/ib/ibss/resources/exception/IBSSBusinessExceptionResources.properties
29 29
login.error.10=error.application.server.not.permitted
30 30
login.error.11=error.already.exist
31 31
login.error.12=error.tac.generated.already
32
login.error.15=error.invalid.password
33
login.error.16=error.wrong.password
34
login.error.16.a=error.user.alias.weak
35
login.error.17=error.password.previously.changed
36
login.error.18=error.duplicate.login
37
login.error.19=error.dormant.account.locked
38
login.error.20=error.password.cannot.be.useralias
39
login.error.21=error.dormant.account.state
40
login.error.22=error.suspend.account.state
41
login.error.28=error.password.change.interval
32 42
login.error.95=error.password.char.repeat
33 43
login.error.96=error.password.weak
34 44
login.error.97=error.invalid.input
......
37 47
login.error.101=error.password.not.tally
38 48
login.error.102=error.password.username.similar
39 49

  
40
login.error.15=error.invalid.password
41
login.error.16=error.wrong.password
42
login.error.17=error.password.previously.changed
43
login.error.18=error.duplicate.login
44

  
45
login.error.19=error.dormant.account.locked
46

  
47
login.error.20=error.password.cannot.be.useralias
48

  
49
login.error.21=error.dormant.account.state
50
login.error.22=error.suspend.account.state
51

  
52
login.error.16.a=error.user.alias.weak
53

  
54 50
# Application internal error NEEDED TO BE SET IN APPLICATION RESOURCE
55 51
application.error.resource.unavailable=error.app.resource.unavailable
56 52
application.error.database.unavailable=error.app.database.unavailable
......
68 64
upass.error.10=error.application.server.not.permitted
69 65
upass.error.11=error.already.exist
70 66
upass.error.12=error.tac.generated.already
67
upass.error.15=error.invalid.password
68
upass.error.16=error.token.serial.not.exist.msg
69
upass.error.17=error.token.serial.not.exist
70
upass.error.28=error.password.change.interval
71 71
upass.error.97=error.invalid.input
72 72
upass.error.98=error.system.not.ready
73 73
upass.error.99=error.unknown
74 74

  
75
upass.error.28=error.password.change.interval
76

  
77
upass.error.15=error.invalid.password
78
upass.error.16=error.token.serial.not.exist.msg
79
upass.error.17=error.token.serial.not.exist
80

  
81 75
#ESB error message
82 76
esb.error.0=error.invalid.account.no
83 77
esb.error.1=error.invalid.foreign.to.account.no
src/com/ib/ibss/enterprise/services/ss112_user/IBSSRetailUserActivateResultServices.java
65 65
		
66 66
		Long m_oLogStatus = AuditLogConstants.UNSUCCESSFUL;
67 67
		String m_sUserAlias = null;	
68
		String m_sLogReason="";
68
		String logReason="";
69 69
		try
70 70
		{	
71 71
			IBSSDynaBean m_oDetailBean = (IBSSDynaBean) getIBSSDynaBean().get(IBSSUserConstants.IBSS_USER_DETAIL);
......
74 74
			
75 75
			UPassControllerV2 upass = new UPassControllerV2();
76 76
			
77
			int rc = upass.UA_ActivateUser(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), m_sUserAlias);
77
			int upassRC = upass.UA_ActivateUser(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), m_sUserAlias);
78 78
			
79
			switch(rc)
79
			switch(upassRC)
80 80
			{
81 81
				case MinimalConstants.ERR_SUCCESS:
82
					m_sLogReason = "Unlock Successful: " + m_sUserAlias;
82
					logReason = "Unlock Successful: " + m_sUserAlias;
83 83
					m_oLogStatus = AuditLogConstants.SUCCESSFUL;
84 84
					
85 85
					Map<String, String> m_mUStatusMap 	= ResourcesUtils.getBusinessOptionsResourceKey(BusinessOptions.USER_STATUS);
......
89 89
					
90 90
					break;
91 91
				case MinimalConstants.ERR_ALREADY_EXIST:
92
					m_sLogReason = AuditLogConstants.CREATE_ADMIN_R_ALREADY_EXIST + m_sUserAlias;
92
					logReason = AuditLogConstants.CREATE_ADMIN_R_ALREADY_EXIST + m_sUserAlias;
93 93
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_USER_ALREADY_EXIST);
94 94
				case MinimalConstants.ERR_INVALID_INPUT:
95
					m_sLogReason = String.valueOf(rc) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
95
					logReason = String.valueOf(upassRC) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
96 96
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_INVALID_INPUT);
97 97
				default:
98
					m_sLogReason = "Unhandled Response: " + m_sUserAlias + " " + rc;
99
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.ERR_SYSTEM_NOT_READY);
98
					logReason = "Unhandled response code: " + upassRC + " Message:" + MinimalConstants.getErrText(String.valueOf(upassRC));
99
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, String.valueOf(upassRC));
100 100
			}
101 101
			
102 102
			setBeanMessage (IBSSUserConstants.JSP_TITLE, 
......
116 116
				getAuditLogDAO ().logActivity (USER_ACTIVITY_TYTPE.ACTIVATE_RIB_USER.getID(), 
117 117
						USER_ACTIVITY_TYTPE.ACTIVATE_RIB_USER.getDescription() + ": " + m_sUserAlias, 
118 118
						m_oLogStatus, 
119
						m_sLogReason, 
119
						logReason, 
120 120
						getIBSSessionObjects ().getSessionUserAlias (), 
121 121
						getIBSSessionObjects ().getSessionUser ().getRoleId (),
122 122
						getIBSSessionObjects ().getSessionUser ().getGroupId (),
src/com/ib/ibss/enterprise/services/ss112_user/IBSSRetailUserCreateResultServices.java
70 70
		String wsIdentCode	= "";
71 71
		String wsMySgId		= "";
72 72
		Date wsRegTimeStamp	= new Date();
73
		int rc 				= MinimalConstants.ERR_UNKNOWN;
73
		int upassRC 				= MinimalConstants.ERR_UNKNOWN;
74 74
		
75 75
		try
76 76
		{
......
96 96
				
97 97
				pan1 	= getBeanMessage (IBSSUserConstants.M2U_PAN1);
98 98
				pan2 	= getBeanMessage (IBSSUserConstants.M2U_PAN2);
99
				rc 	= impl.newUser(adminUserAlias, adminPassword, userAlias, password, pan1, pan2);
99
				upassRC 	= impl.newUser(adminUserAlias, adminPassword, userAlias, password, pan1, pan2);
100 100
			}
101 101
			//online stock
102 102
			else if(selectedAppId.equals(ClientApp.APP_ID_ONLINE_STOCK))
103 103
			{
104 104
				idNo   	= getBeanMessage (IBSSUserConstants.ONLINE_STOCK_ID_NO);
105
				rc 	= impl.newStockUser(adminUserAlias, adminPassword, userAlias, idNo);
105
				upassRC 	= impl.newStockUser(adminUserAlias, adminPassword, userAlias, idNo);
106 106
			}
107 107
			//ticketing
108 108
			else if(selectedAppId.equals(ClientApp.APP_ID_ONLINE_TICKETING))
......
114 114
				firstName	= getBeanMessage (IBSSUserConstants.TICKETING_FIRST_NAME);
115 115
				lastName	= getBeanMessage (IBSSUserConstants.TICKETING_LAST_NAME);
116 116
				payeeCode	= getBeanMessage (IBSSUserConstants.TICKETING_PAYEE_CODE);
117
				rc 	 	= impl.newTicketingUser(adminUserAlias, adminPassword, userAlias, password, fullName, firstName, lastName, payeeCode);
117
				upassRC 	 	= impl.newTicketingUser(adminUserAlias, adminPassword, userAlias, password, fullName, firstName, lastName, payeeCode);
118 118
			}
119 119
			//ccpp
120 120
			else if(selectedAppId.equals(ClientApp.APP_ID_CCPP))
......
123 123
				logReason = service.checkPasswordPattern (password ,getUPassService (), selectedAppId);
124 124
				
125 125
				panCC  = getBeanMessage (IBSSUserConstants.CCPP_PAN_CC);
126
				rc = impl.newIbccPublicUser(adminUserAlias, adminPassword, userAlias, password, panCC);
126
				upassRC = impl.newIbccPublicUser(adminUserAlias, adminPassword, userAlias, password, panCC);
127 127
			}
128 128
			//im2u
129 129
			else if(selectedAppId.equals(ClientApp.APP_ID_IM2U))
......
149 149
						throw IBSSErrorHandler.createBusinessException ("general.error.incorrect.", "date", new String[]{ResourcesUtils.getApplicationResourceMessage("user.ws.registration.time.stamp")});
150 150
					}
151 151
					
152
					rc 		= impl.newIm2uUser(adminUserAlias, adminPassword, userAlias, wsFlag, wsIdentCode, wsMySgId, wsRegTimeStamp);
152
					upassRC 		= impl.newIm2uUser(adminUserAlias, adminPassword, userAlias, wsFlag, wsIdentCode, wsMySgId, wsRegTimeStamp);
153 153
				}
154 154
				catch (Exception e)
155 155
				{
......
162 162
				
163 163
			}
164 164
			
165
			System.out.println("rc = "+rc);
166
			switch(rc)
165
			System.out.println("rc = "+upassRC);
166
			switch(upassRC)
167 167
			{
168 168
			case MinimalConstants.ERR_SUCCESS:
169 169
				logReason = "Creation Successful: " + userAlias;
170 170
				status 	  = AuditLogConstants.SUCCESSFUL;
171 171
				break;
172 172
			case MinimalConstants.ERR_PASSWD_WEAK:
173
				logReason = String.valueOf(rc) + ResourcesUtils.getApplicationResourceMessage("error.password.weak");
173
				logReason = String.valueOf(upassRC) + ResourcesUtils.getApplicationResourceMessage("error.password.weak");
174 174
				throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.LOGIN_PASSWORD_WEAK);
175 175
			case MinimalConstants.ERR_APP_SERV_NOT_PERMITTED:
176
				logReason = String.valueOf(rc) + ResourcesUtils.getApplicationResourceMessage("error.user.id.not.exist.inm2u.1");
176
				logReason = String.valueOf(upassRC) + ResourcesUtils.getApplicationResourceMessage("error.user.id.not.exist.inm2u.1");
177 177
				throw IBSSErrorHandler.createBusinessException ("error.user.id.not.exist.inm2u.", "2");
178 178
			case MinimalConstants.ERR_INVALID_USERALIAS:
179 179
				logReason = "Weak User ID Combination: " + userAlias;
......
182 182
				logReason = AuditLogConstants.CREATE_ADMIN_R_ALREADY_EXIST + userAlias;
183 183
				throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_USER_ALREADY_EXIST);
184 184
			case MinimalConstants.ERR_INVALID_INPUT:
185
				logReason = String.valueOf(rc) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
185
				logReason = String.valueOf(upassRC) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
186 186
				throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_INVALID_INPUT);
187 187
			default:
188
				logReason = "Unhandled Response: " + userAlias + " " + rc;
189
				throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.ERR_SYSTEM_NOT_READY);
188
				logReason = "Unhandled response code: " + upassRC + " Message:" + MinimalConstants.getErrText(String.valueOf(upassRC));
189
				throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, String.valueOf(upassRC));
190 190
			}
191 191
			
192 192
			getIBSSDynaBean ().set (IBSSUserConstants.JSP_TITLE, 
src/com/ib/ibss/enterprise/services/ss112_user/IBSSRetailUserEnquiryDeleteServices.java
15 15

  
16 16
import org.hibernate.Session;
17 17

  
18
import my.com.upass.MinimalConstants;
18 19
import my.com.upass.UPassControllerV2;
19 20
import net.penril.generic.hibernate.HibernateUtils;
20 21
import net.penril.ibss.audit.log.AuditLogConstants;
......
63 64
	String c_sPassword;
64 65
	String c_sConfirmPassword;
65 66
	String c_sAdminName;
66
	String c_sLogReason;
67
	String logReason;
67 68
	String appId;
68 69
	Long c_oAdminID;
69 70
	Long c_oUserID;
......
94 95
			UPassControllerV2 upass = new UPassControllerV2();
95 96
			session = HibernateUtils.currentSession();
96 97
			session.beginTransaction();
97
			int response = upass.deleteUserWithTheProfile(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), c_sUserAlias, Integer.valueOf(appId), session);
98
			int upassRC = upass.deleteUserWithTheProfile(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), c_sUserAlias, Integer.valueOf(appId), session);
98 99
			
99
			switch(response)
100
			switch(upassRC)
100 101
			{
101 102
				case StatusConstants.ERR_SUCCESS:
102 103
					m_oLogStatus = AuditLogConstants.SUCCESSFUL;
......
105 106
							ResourcesUtils.getApplicationResourceMessage ("user.user") + ": " + c_sUserAlias + " " +
106 107
							ResourcesUtils.getApplicationResourceMessage ("user.has.been.successfully") + " " +
107 108
							ResourcesUtils.getApplicationResourceMessage ("general.status.lower.deleted"));
108
					c_sLogReason = "Delete Successful";
109
					logReason = "Delete Successful";
109 110
					break;
110 111
				default:
111
					c_sLogReason = "Unhandled response: " + response;
112
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.ERR_SYSTEM_NOT_READY);
112
					logReason = "Unhandled response code: " + upassRC + " Message:" + MinimalConstants.getErrText(String.valueOf(upassRC));
113
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, String.valueOf(upassRC));
113 114
			}
114 115
		}
115 116
		catch (Exception e)
......
123 124
				getAuditLogDAO ().logActivity (USER_ACTIVITY_TYTPE.DELETE_RIB_USER.getID(), 
124 125
						USER_ACTIVITY_TYTPE.DELETE_RIB_USER.getDescription() + ": " + c_sUserAlias, 
125 126
						m_oLogStatus, 
126
						c_sLogReason, 
127
						logReason, 
127 128
						getIBSSessionObjects ().getSessionUserAlias (), 
128 129
						getIBSSessionObjects ().getSessionUser ().getRoleId (),
129 130
						getIBSSessionObjects ().getSessionUser ().getGroupId (),
src/com/ib/ibss/enterprise/services/ss112_user/IBSSRetailUserEnquiryEditResultServices.java
80 80
		String logReason 	= "";
81 81
		String userAlias	= "";
82 82
		String appId		= "";
83
		int rc 				= MinimalConstants.ERR_UNKNOWN;
83
		int upassRC 				= MinimalConstants.ERR_UNKNOWN;
84 84
		Map <Integer, String> valueMap = new HashMap<Integer, String>();
85 85
		Session session 	= null;
86 86
		
......
108 108
				
109 109
				valueMap = BeanToBeanTransferUtils.convertBeanToStringForDiffValue(m2uProfile, m2uProfile2);
110 110
				
111
				rc = upass.updateProfileShallowly(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), m2uProfile2, session);
111
				upassRC = upass.updateProfileShallowly(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), m2uProfile2, session);
112 112
			}
113 113
			//Online Stock
114 114
			else if(Integer.valueOf(appId).equals(ClientApp.APP_ID_ONLINE_STOCK))
......
120 120
				
121 121
				valueMap = BeanToBeanTransferUtils.convertBeanToStringForDiffValue(stockProfile, stockProfile2);
122 122
				
123
				rc = upass.updateProfileShallowly(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), stockProfile2, session);
123
				upassRC = upass.updateProfileShallowly(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), stockProfile2, session);
124 124
			}
125 125
			//Ticketing
126 126
			else if(Integer.valueOf(appId).equals(ClientApp.APP_ID_ONLINE_TICKETING))
......
135 135
				
136 136
				valueMap = BeanToBeanTransferUtils.convertBeanToStringForDiffValue(ticketProfile, ticketProfile2);
137 137
				
138
				rc = upass.updateProfileShallowly(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), ticketProfile2, session);
138
				upassRC = upass.updateProfileShallowly(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), ticketProfile2, session);
139 139
			}
140 140
			//CCPP
141 141
			else if(Integer.valueOf(appId).equals(ClientApp.APP_ID_CCPP))
......
147 147
				
148 148
				valueMap = BeanToBeanTransferUtils.convertBeanToStringForDiffValue(ibccProfile, ibccProfile2);
149 149
				
150
				rc = upass.updateProfileShallowly(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), ibccProfile2, session);
150
				upassRC = upass.updateProfileShallowly(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), ibccProfile2, session);
151 151
			}
152 152
			//IM2U
153 153
			else if(Integer.valueOf(appId).equals(ClientApp.APP_ID_IM2U))
......
174 174
					
175 175
					valueMap = BeanToBeanTransferUtils.convertBeanToStringForDiffValue(im2uProfile, im2uProfile2);
176 176
					
177
					rc = upass.updateProfileShallowly(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), im2uProfile2, session);
177
					upassRC = upass.updateProfileShallowly(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), im2uProfile2, session);
178 178
					
179 179
				}
180 180
				catch (Exception e)
......
188 188
				
189 189
			}
190 190
			
191
			System.out.println("rc = "+rc);
191
			System.out.println("rc = "+upassRC);
192 192
			/*check response code*/
193
			switch(rc)
193
			switch(upassRC)
194 194
			{
195 195
				case MinimalConstants.ERR_SUCCESS:
196 196
					logReason = "Edit Successful: " + userAlias;
......
200 200
					logReason = AuditLogConstants.CREATE_ADMIN_R_ALREADY_EXIST + userAlias;
201 201
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_USER_ALREADY_EXIST);
202 202
				case MinimalConstants.ERR_INVALID_INPUT:
203
					logReason = String.valueOf(rc) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
203
					logReason = String.valueOf(upassRC) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
204 204
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_INVALID_INPUT);
205 205
				default:
206
					logReason = "Unhandled Response: " + userAlias + " " + rc;
207
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.ERR_SYSTEM_NOT_READY);
206
					logReason = "Unhandled response code: " + upassRC + " Message:" + MinimalConstants.getErrText(String.valueOf(upassRC));
207
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, String.valueOf(upassRC));
208 208
			}
209 209
			
210 210
			setBeanMessage (IBSSUserConstants.JSP_TITLE, 
src/com/ib/ibss/enterprise/services/ss112_user/IBSSRetailUserEnquiryResetPassServices.java
15 15

  
16 16
import org.hibernate.Session;
17 17

  
18
import my.com.upass.MinimalConstants;
18 19
import my.com.upass.MinimalUPassControllerV2;
19 20
import my.com.upass.pojo.ClientApp;
20 21
import net.penril.generic.hibernate.HibernateUtils;
......
62 63
		super(sessionObjects);
63 64
	}
64 65
	
65
	String c_sUserAlias;
66
	String userAlias;
66 67
	String c_sPassword;
67 68
	String c_sConfirmPassword;
68 69
	String c_sAdminName;
69
	String c_sLogReason;
70
	String logReason;
70 71
	Long c_oAdminID;
71 72
	Long c_oUserID;
72 73
	
......
85 86
		c_oAdminID			= getIBSSessionObjects().getSessionUser().getUserId ();
86 87
		c_oDetailBean 		= (IBSSDynaBean) getIBSSDynaBean().get(IBSSUserConstants.IBSS_USER_DETAIL);
87 88
		c_oUserID			= (Long) c_oDetailBean.get (IBSSUserConstants.USER_ID);
88
		c_sUserAlias 		= (String) c_oDetailBean.get (IBSSUserConstants.USER_ALIAS);
89
		userAlias 		= (String) c_oDetailBean.get (IBSSUserConstants.USER_ALIAS);
89 90
		
90 91
		String appId		= (String) c_oDetailBean.get (IBSSUserConstants.USER_APPLICATION_KEY);
91 92
		
......
103 104
			/* Validate Password */
104 105
			if(Integer.valueOf(appId).equals(ClientApp.APP_ID_ONLINE_STOCK) || Integer.valueOf(appId).equals(ClientApp.APP_ID_IM2U))
105 106
			{
106
				c_sLogReason = m_oAdminService.checkPasswordPattern (c_sPassword ,getUPassService (), ClientApp.APP_ID_M2U);
107
				logReason = m_oAdminService.checkPasswordPattern (c_sPassword ,getUPassService (), ClientApp.APP_ID_M2U);
107 108
			}
108 109
			else
109 110
			{
110
				c_sLogReason = m_oAdminService.checkPasswordPattern (c_sPassword ,getUPassService (), Integer.valueOf(appId));
111
				logReason = m_oAdminService.checkPasswordPattern (c_sPassword ,getUPassService (), Integer.valueOf(appId));
111 112
			}
112 113
			
113 114
			//Determine maker checker
......
118 119
			MinimalUPassControllerV2 upass = new MinimalUPassControllerV2();
119 120
			session = HibernateUtils.currentSession();
120 121
			session.beginTransaction();
121
			int m_iRC = upass.resetPassword_withAppChecked(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), c_sUserAlias, c_sPassword);
122
			int upassRC = upass.resetPassword_withAppChecked(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), userAlias, c_sPassword);
122 123
			
123
			switch(m_iRC)
124
			switch(upassRC)
124 125
			{
125 126
				case StatusConstants.ERR_SUCCESS:
126 127
					setBeanMessage (IBSSUserConstants.PASS, "");
127 128
					setBeanMessage (IBSSUserConstants.CONFIRM_PASS, "");
128 129
					setBeanMessage (IBSSUserConstants.USER_ID, String.valueOf (c_oUserID));
129
					c_sLogReason = "Update Successful";
130
					logReason = "Update Successful";
130 131
					break;
132
				case MinimalConstants.ERR_REUSED_PASSWD:	
133
					logReason = "Reused Password";
134
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.ERR_REUSED_PASSWD);
131 135
				default:
132
					c_sLogReason = "Unhandled response: " + m_iRC;
133
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.ERR_SYSTEM_NOT_READY);
136
					logReason = "Unhandled response code: " + upassRC + " Message:" + MinimalConstants.getErrText(String.valueOf(upassRC));
137
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, String.valueOf(upassRC));
134 138
			}
135 139

  
136 140
			/* Log successful */
137 141
			m_oLogStatus = AuditLogConstants.SUCCESSFUL;
138 142
				
139 143
			setBeanMessage (IBSSUserConstants.JSP_TITLE, 
140
				ResourcesUtils.getApplicationResourceMessage ("user.user") + ": " + c_sUserAlias + " " +
144
				ResourcesUtils.getApplicationResourceMessage ("user.user") + ": " + userAlias + " " +
141 145
				ResourcesUtils.getApplicationResourceMessage ("user.has.been.successfully") + " " +
142 146
				ResourcesUtils.getApplicationResourceMessage ("user.reset.desc"));
143 147
		}
......
152 156
				getAuditLogDAO ().logActivity (USER_ACTIVITY_TYTPE.RESET_RIB_USER_PASSWORD.getID(), 
153 157
						USER_ACTIVITY_TYTPE.RESET_RIB_USER_PASSWORD.getDescription(), 
154 158
						m_oLogStatus, 
155
						c_sLogReason, 
159
						logReason, 
156 160
						getIBSSessionObjects ().getSessionUserAlias (), 
157 161
						getIBSSessionObjects ().getSessionUser ().getRoleId (),
158 162
						getIBSSessionObjects ().getSessionUser ().getGroupId (),
src/com/ib/ibss/enterprise/services/ss112_user/IBSSRetailUserSuspendResultServices.java
79 79
			
80 80
			UPassControllerV2 upass = new UPassControllerV2();
81 81

  
82
			int rc = upass.UA_LockUser(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), userAlias);
82
			int upassRC = upass.UA_LockUser(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), userAlias);
83 83
			
84
			switch(rc)
84
			switch(upassRC)
85 85
			{
86 86
				case MinimalConstants.ERR_SUCCESS:
87 87
					logReason = "Suspend Successful: " + userAlias;
......
96 96
					logReason = AuditLogConstants.CREATE_ADMIN_R_ALREADY_EXIST + userAlias;
97 97
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_USER_ALREADY_EXIST);
98 98
				case MinimalConstants.ERR_INVALID_INPUT:
99
					logReason = String.valueOf(rc) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
99
					logReason = String.valueOf(upassRC) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
100 100
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_INVALID_INPUT);
101 101
				default:
102
					logReason = "Unhandled Response: " + userAlias + " " + rc;
103
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.ERR_SYSTEM_NOT_READY);
102
					logReason = "Unhandled response code: " + upassRC + " Message:" + MinimalConstants.getErrText(String.valueOf(upassRC));
103
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, String.valueOf(upassRC));
104 104
			}
105 105
			
106 106
			setBeanMessage (IBSSUserConstants.USER_ID, String.valueOf (uerID));
src/com/ib/ibss/enterprise/services/ss112_user/IBSSRetailUserUnlockResultServices.java
64 64
		IBSSLogger.debug (c_oClass, "Entering execute");
65 65
		
66 66
		
67
		String m_sLogReason="";		
67
		String logReason="";		
68 68
		Long m_oLogStatus = AuditLogConstants.UNSUCCESSFUL;
69 69
		String m_sUserAlias = null;				
70 70
		long m_lAuditCategoryID = 0;
......
92 92
			
93 93
			UPassControllerV2 upass = new UPassControllerV2();
94 94
			
95
			int rc = upass.UA_ActivateUser(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), m_sUserAlias);
95
			int upassRC = upass.UA_ActivateUser(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), m_sUserAlias);
96 96
			
97
			switch(rc)
97
			switch(upassRC)
98 98
			{
99 99
				case MinimalConstants.ERR_SUCCESS:
100
					m_sLogReason = "Unlock Successful: " + m_sUserAlias;
100
					logReason = "Unlock Successful: " + m_sUserAlias;
101 101
					m_oLogStatus = AuditLogConstants.SUCCESSFUL;
102 102
					
103 103
					Map<String, String> m_mUStatusMap 	= ResourcesUtils.getBusinessOptionsResourceKey(BusinessOptions.USER_STATUS);
......
106 106
					getIBSSDynaBean().set(IBSSUserConstants.IBSS_USER_DETAIL, m_oDetailBean);
107 107
					break;
108 108
				case MinimalConstants.ERR_ALREADY_EXIST:
109
					m_sLogReason = AuditLogConstants.CREATE_ADMIN_R_ALREADY_EXIST + m_sUserAlias;
109
					logReason = AuditLogConstants.CREATE_ADMIN_R_ALREADY_EXIST + m_sUserAlias;
110 110
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_USER_ALREADY_EXIST);
111 111
				case MinimalConstants.ERR_INVALID_INPUT:
112
					m_sLogReason = String.valueOf(rc) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
112
					logReason = String.valueOf(upassRC) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
113 113
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_INVALID_INPUT);
114 114
				default:
115
					m_sLogReason = "Unhandled Response: " + m_sUserAlias + " " + rc;
116
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.ERR_SYSTEM_NOT_READY);
115
					logReason = "Unhandled response code: " + upassRC + " Message:" + MinimalConstants.getErrText(String.valueOf(upassRC));
116
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, String.valueOf(upassRC));
117 117
			}
118 118
			
119 119
			setBeanMessage (IBSSUserConstants.JSP_TITLE, 
......
134 134
				getAuditLogDAO ().logActivity (m_lAuditCategoryID, 
135 135
						m_sLogDescription + ": " + m_sUserAlias, 
136 136
						m_oLogStatus, 
137
						m_sLogReason, 
137
						logReason, 
138 138
						getIBSSessionObjects ().getSessionUserAlias (), 
139 139
						getIBSSessionObjects ().getSessionUser ().getRoleId (),
140 140
						getIBSSessionObjects ().getSessionUser ().getGroupId (),
src/com/ib/ibss/enterprise/services/ss223_application/IBSSApplicationUserCreateResultServices.java
87 87
			user.setDescription(userDesc);
88 88
			user.setUserType(MinimalConstants.UTYPE_STATE_USER);
89 89
			
90
			int rc = upass.addUser(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), user, UserAppAccess.TYPE_ADMIN, Integer.valueOf(selectedAppId), session, true);
90
			int upassRC = upass.addUser(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), user, UserAppAccess.TYPE_ADMIN, Integer.valueOf(selectedAppId), session, true);
91 91
			
92
			switch(rc)
92
			switch(upassRC)
93 93
			{
94 94
			case MinimalConstants.ERR_SUCCESS:
95 95
				logReason = "Creation Successful: " + userAlias;
96 96
				status 	  = AuditLogConstants.SUCCESSFUL;
97 97
				break;
98 98
			case MinimalConstants.ERR_PASSWD_WEAK:
99
				logReason = String.valueOf(rc) + ResourcesUtils.getApplicationResourceMessage("error.password.weak");
99
				logReason = String.valueOf(upassRC) + ResourcesUtils.getApplicationResourceMessage("error.password.weak");
100 100
				throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.LOGIN_PASSWORD_WEAK);
101 101
			case MinimalConstants.ERR_INVALID_USERALIAS:
102 102
				logReason = "Weak User ID Combination: " + userAlias;
......
105 105
				logReason = AuditLogConstants.CREATE_ADMIN_R_ALREADY_EXIST + userAlias;
106 106
				throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_USER_ALREADY_EXIST);
107 107
			case MinimalConstants.ERR_INVALID_INPUT:
108
				logReason = String.valueOf(rc) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
108
				logReason = String.valueOf(upassRC) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
109 109
				throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_INVALID_INPUT);
110 110
			default:
111
				logReason = "Unhandled Response: " + userAlias + " " + rc;
112
				throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.ERR_SYSTEM_NOT_READY);
111
				logReason = "Unhandled response code: " + upassRC + " Message:" + MinimalConstants.getErrText(String.valueOf(upassRC));
112
				throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, String.valueOf(upassRC));
113 113
			}
114 114
			
115 115
			getIBSSDynaBean ().set (IBSSUserConstants.JSP_TITLE, 
src/com/ib/ibss/enterprise/services/ss223_application/IBSSApplicationUserDeleteResultServices.java
72 72
			session = HibernateUtils.currentSession();
73 73
			session.beginTransaction();
74 74
			
75
			int rc = upass.deleteUserWithTheProfile(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), userAlias, appId, session);
75
			int upassRC = upass.deleteUserWithTheProfile(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), userAlias, appId, session);
76 76
			
77
			switch(rc)
77
			switch(upassRC)
78 78
			{
79 79
				case MinimalConstants.ERR_SUCCESS:
80 80
					logReason = "Delete Successful: " + userAlias;
......
84 84
					logReason = AuditLogConstants.CREATE_ADMIN_R_ALREADY_EXIST + userAlias;
85 85
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_USER_ALREADY_EXIST);
86 86
				case MinimalConstants.ERR_INVALID_INPUT:
87
					logReason = String.valueOf(rc) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
87
					logReason = String.valueOf(upassRC) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
88 88
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_INVALID_INPUT);
89 89
				default:
90
					logReason = "Unhandled Response: " + userAlias + " " + rc;
91
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.ERR_SYSTEM_NOT_READY);
90
					logReason = "Unhandled response code: " + upassRC + " Message:" + MinimalConstants.getErrText(String.valueOf(upassRC));
91
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, String.valueOf(upassRC));
92 92
			}
93 93
			
94 94
			getIBSSDynaBean ().set (IBSSUserConstants.JSP_TITLE, 
src/com/ib/ibss/enterprise/services/ss223_application/IBSSApplicationUserEditResultServices.java
79 79
			session = HibernateUtils.currentSession();
80 80
			session.beginTransaction();
81 81
			
82
			int rc = upass.UA_ModifyUser(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), userAlias, userDescription, null);
82
			int upassRC = upass.UA_ModifyUser(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), userAlias, userDescription, null);
83 83
			
84
			switch(rc)
84
			switch(upassRC)
85 85
			{
86 86
				case MinimalConstants.ERR_SUCCESS:
87 87
					logReason = "Edit Successful: " + userAlias;
......
91 91
					logReason = AuditLogConstants.CREATE_ADMIN_R_ALREADY_EXIST + userAlias;
92 92
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_USER_ALREADY_EXIST);
93 93
				case MinimalConstants.ERR_INVALID_INPUT:
94
					logReason = String.valueOf(rc) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
94
					logReason = String.valueOf(upassRC) + ResourcesUtils.getApplicationResourceMessage("error.invalid.input");
95 95
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, StatusConstants.UPASS_ERR_INVALID_INPUT);
96 96
				default:
97
					logReason = "Unhandled Response: " + userAlias + " " + rc;
98
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.ERR_SYSTEM_NOT_READY);
97
					logReason = "Unhandled response code: " + upassRC + " Message:" + MinimalConstants.getErrText(String.valueOf(upassRC));
98
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, String.valueOf(upassRC));
99 99
			}
100 100
			
101 101
			getIBSSDynaBean ().set (IBSSUserConstants.JSP_TITLE, 
src/com/ib/ibss/enterprise/services/ss223_application/IBSSApplicationUserResetPassResultServices.java
78 78
			
79 79
			/* Reset password */
80 80
			MinimalUPassControllerV2 upass = new MinimalUPassControllerV2();
81
			int rc = upass.resetPassword_withAppChecked(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), userAlias, password);
81
			int upassRC = upass.resetPassword_withAppChecked(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), userAlias, password);
82 82
			
83
			switch(rc)
83
			switch(upassRC)
84 84
			{
85 85
				case StatusConstants.ERR_SUCCESS:
86 86
					getIBSSDynaBean().set (IBSSApplicationUserConstants.PASSWORD, "");
......
89 89
					logReason = "Update Successful";
90 90
					break;
91 91
				case MinimalConstants.ERR_PASSWD_WEAK:
92
					logReason = String.valueOf(rc) + ResourcesUtils.getApplicationResourceMessage("error.password.weak");
92
					logReason = String.valueOf(upassRC) + ResourcesUtils.getApplicationResourceMessage("error.password.weak");
93 93
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.LOGIN_PASSWORD_WEAK);	
94 94
				default:
95
					logReason = "Unhandled response: " + rc;
95
					logReason = "Unhandled response code: " + upassRC + " Message:" + MinimalConstants.getErrText(String.valueOf(upassRC));
96 96
					throw IBSSErrorHandler.createBusinessException (IBSSBusinessException.LOGIN, ExceptionErrors.ERR_SYSTEM_NOT_READY);
97 97
			}
98 98
			

Also available in: Unified diff