Revision 102:f38fc82aa715

View differences:

WebContent/WEB-INF/config/ss112_user/struts-config.xml
21 21
			type="com.ib.ibss.controller.actions.ss112_user.IBSSRetailUserEnquiryMainAction"
22 22
			validate="false">
23 23
			<forward name="success" path=".ibss.retail.enquiry.main" />
24
			<forward name="create" path="/ss112/retailCreateUser.do" />
24 25
			<forward name="failure" path=".ibss.retail.user.search" />
25 26
			<forward name="noUsers" path=".ibss.retail.enquiry.main.no.users" />
26 27
		</action>
WebContent/WEB-INF/config/ss112_user/validation.xml
56 56
		</form>
57 57
		
58 58
		<form name="ss112RetailUserM2UCreateResultValidation">
59
		    <field depends="required" property="userAlias">
59
		    <field depends="required, alphaNumeric" property="userAlias">
60 60
			    <arg0 key="user.id"/>
61 61
			</field>
62 62
			<field depends="required" property="pass">
......
65 65
			<field depends="required" property="confirmPass">
66 66
			    <arg0 key="user.confirm.password"/>
67 67
			</field>
68
			<field depends="required" property="m2uPan1">
68
			<field depends="required, numeric, minlength" property="m2uPan1">
69 69
			    <arg0 key="user.pan.1"/>
70
			    <arg1 key="${var:minlength}" name="minlength" resource="false"/>
71
			    <var>
72
			     <var-name>minlength</var-name>
73
			     <var-value>16</var-value>
74
			    </var>
70 75
			</field>
71
			<field depends="required" property="m2uPan2">
76
			<field depends="required, numeric, minlength" property="m2uPan2">
72 77
			    <arg0 key="user.pan.2"/>
78
			    <arg1 key="${var:minlength}" name="minlength" resource="false"/>
79
			    <var>
80
			     <var-name>minlength</var-name>
81
			     <var-value>19</var-value>
82
			    </var>
73 83
			</field>
74 84
			<field depends="notMatch" property="pass">
75 85
    			<arg0 key="user.new.password"/>
......
92 102
		</form>
93 103
		
94 104
		<form name="ss112RetailUserOnlineStockCreateResultValidation">
95
		    <field depends="required" property="userAlias">
105
		    <field depends="required, alphaNumeric" property="userAlias">
96 106
			    <arg0 key="user.id"/>
97 107
			</field>
98 108
			<!-- <field depends="required" property="onlineStockIdNo">
......
101 111
		</form>
102 112
		
103 113
		<form name="ss112RetailUserTicketingCreateResultValidation">
104
		   	<field depends="required" property="userAlias">
114
		   	<field depends="required, alphaNumeric" property="userAlias">
105 115
			    <arg0 key="user.id"/>
106 116
			</field>
107 117
			<field depends="required" property="pass">
......
110 120
			<field depends="required" property="confirmPass">
111 121
			    <arg0 key="user.confirm.password"/>
112 122
			</field>
113
			<field depends="required" property="ticketingFullName">
123
			<field depends="required, customerFullNameVal" property="ticketingFullName">
114 124
			    <arg0 key="user.full.name"/>
115 125
			</field>
116
			<field depends="required" property="ticketingFirstName">
126
			<field depends="required, customerFullNameVal" property="ticketingFirstName">
117 127
			    <arg0 key="user.first.name"/>
118 128
			</field>
119
			<field depends="required" property="ticketingLastName">
129
			<field depends="required, customerFullNameVal" property="ticketingLastName">
120 130
			    <arg0 key="user.last.name"/>
121 131
			</field>
122
			<field depends="required" property="ticketingPayeeCode">
132
			<field depends="required, numeric, minlength" property="ticketingPayeeCode">
123 133
			    <arg0 key="user.payee.code"/>
134
			    <arg1 key="${var:minlength}" name="minlength" resource="false"/>
135
			    <var>
136
			     <var-name>minlength</var-name>
137
			     <var-value>3</var-value>
138
			    </var>
124 139
			</field>
125 140
			<field depends="notMatch" property="pass">
126 141
    			<arg0 key="user.new.password"/>
......
143 158
		</form>
144 159
		
145 160
		<form name="ss112RetailUserCCPPCreateResultValidation">
146
		    <field depends="required" property="userAlias">
161
		    <field depends="required, alphaNumeric" property="userAlias">
147 162
			    <arg0 key="user.id"/>
148 163
			</field>
149 164
			<field depends="required" property="pass">
......
152 167
			<field depends="required" property="confirmPass">
153 168
			    <arg0 key="user.confirm.password"/>
154 169
			</field>
155
			<field depends="required" property="ccppPanCC">
170
			<field depends="required, minlength" property="ccppPanCC">
156 171
			    <arg0 key="user.pan.cc"/>
172
			    <arg1 key="${var:minlength}" name="minlength" resource="false"/>
173
			    <var>
174
			     <var-name>minlength</var-name>
175
			     <var-value>16</var-value>
176
			    </var>
157 177
			</field>
158 178
			<field depends="notMatch" property="pass">
159 179
    			<arg0 key="user.new.password"/>
......
176 196
		</form>
177 197
		
178 198
		<form name="ss112RetailUserIM2UCreateResultValidation">
179
		    <field depends="required" property="userAlias">
199
		    <field depends="required, alphaNumeric" property="userAlias">
180 200
			    <arg0 key="user.ws.ident.code"/>
181 201
			</field>
182 202
			 <field depends="required" property="im2uWSIdentCode">
......
191 211
		</form>
192 212
		
193 213
		<form name="ss112RetailUserM2UEditResultValidation">
194
			<field depends="required" property="m2uPan1">
214
			<field depends="required, numeric, minlength" property="m2uPan1">
195 215
			    <arg0 key="user.pan.1"/>
216
			    <arg1 key="${var:minlength}" name="minlength" resource="false"/>
217
			    <var>
218
			     <var-name>minlength</var-name>
219
			     <var-value>16</var-value>
220
			    </var>
196 221
			</field>
197
			<field depends="required" property="m2uPan2">
222
			<field depends="required, numeric, minlength" property="m2uPan2">
198 223
			    <arg0 key="user.pan.2"/>
224
			    <arg1 key="${var:minlength}" name="minlength" resource="false"/>
225
			    <var>
226
			     <var-name>minlength</var-name>
227
			     <var-value>19</var-value>
228
			    </var>
199 229
			</field>
200 230
		</form>
201 231
		
......
206 236
		</form> -->
207 237
		
208 238
		<form name="ss112RetailUserTicketingEditResultValidation">
209
			<field depends="required" property="ticketingFullName">
239
			<field depends="required, customerFullNameVal" property="ticketingFullName">
210 240
			    <arg0 key="user.full.name"/>
211 241
			</field>
212
			<field depends="required" property="ticketingFirstName">
242
			<field depends="required, customerFullNameVal" property="ticketingFirstName">
213 243
			    <arg0 key="user.first.name"/>
214 244
			</field>
215
			<field depends="required" property="ticketingLastName">
245
			<field depends="required, customerFullNameVal" property="ticketingLastName">
216 246
			    <arg0 key="user.last.name"/>
217 247
			</field>
218
			<field depends="required" property="ticketingPayeeCode">
248
			<field depends="required, minlength, numeric" property="ticketingPayeeCode">
219 249
			    <arg0 key="user.payee.code"/>
250
			    <arg1 key="${var:minlength}" name="minlength" resource="false"/>
251
			    <var>
252
			     <var-name>minlength</var-name>
253
			     <var-value>3</var-value>
254
			    </var>
220 255
			</field>
221 256
		</form>
222 257
		
223 258
		<form name="ss112RetailUserCCPPEditResultValidation">
224
			<field depends="required" property="ccppPanCC">
259
			<field depends="required, minlength, numeric" property="ccppPanCC">
225 260
			    <arg0 key="user.pan.cc"/>
261
			    <arg1 key="${var:minlength}" name="minlength" resource="false"/>
262
			    <var>
263
			     <var-name>minlength</var-name>
264
			     <var-value>16</var-value>
265
			    </var>
226 266
			</field>
227 267
		</form>
228 268
		
WebContent/jsp/ss112_user/ibssRetailUserCreateConfirm.jsp
72 72
	<tr>
73 73
		<td width="72">&nbsp;</td>
74 74
		<td width="140"><bean:message key="user.pan.1"/>:</td>
75
		<td width="345"><htmlEL:text property="m2uPan1" name="ibssUserForm" autocomplete="off"/></td>
75
		<td width="345"><htmlEL:text property="m2uPan1" name="ibssUserForm" autocomplete="off" maxlength="16"/></td>
76 76
		<td width="3">&nbsp;</td>
77 77
   		<td width="44">&nbsp;</td>
78 78
	</tr>
79 79
	<tr>
80 80
		<td width="72">&nbsp;</td>
81 81
		<td width="140"><bean:message key="user.pan.2"/>:</td>
82
		<td width="345"><htmlEL:text property="m2uPan2" name="ibssUserForm" autocomplete="off"/></td>
82
		<td width="345"><htmlEL:text property="m2uPan2" name="ibssUserForm" autocomplete="off" maxlength="19"/></td>
83 83
		<td width="3">&nbsp;</td>
84 84
   		<td width="44">&nbsp;</td>
85 85
	</tr>
......
101 101
	<tr>
102 102
		<td width="72">&nbsp;</td>
103 103
		<td width="140"><bean:message key="user.full.name"/>:</td>
104
		<td width="345"><htmlEL:text property="ticketingFullName" name="ibssUserForm" autocomplete="off"/></td>
104
		<td width="345"><htmlEL:text property="ticketingFullName" name="ibssUserForm" autocomplete="off" maxlength="64"/></td>
105 105
		<td width="3">&nbsp;</td>
106 106
   		<td width="44">&nbsp;</td>
107 107
	</tr>
108 108
	<tr>
109 109
		<td width="72">&nbsp;</td>
110 110
		<td width="140"><bean:message key="user.first.name"/>:</td>
111
		<td><htmlEL:text property="ticketingFirstName" name="ibssUserForm" autocomplete="off"/></td>
111
		<td><htmlEL:text property="ticketingFirstName" name="ibssUserForm" autocomplete="off" maxlength="64"/></td>
112 112
		<td width="3">&nbsp;</td>
113 113
   		<td width="44">&nbsp;</td>
114 114
	</tr>
115 115
	<tr>
116 116
		<td width="72">&nbsp;</td>
117 117
		<td width="140"><bean:message key="user.last.name"/>:</td>
118
		<td width="345"><htmlEL:text property="ticketingLastName" name="ibssUserForm" autocomplete="off"/></td>
118
		<td width="345"><htmlEL:text property="ticketingLastName" name="ibssUserForm" autocomplete="off" maxlength="64"/></td>
119 119
		<td width="3">&nbsp;</td>
120 120
   		<td width="44">&nbsp;</td>
121 121
	</tr>
122 122
	<tr>
123 123
		<td width="72">&nbsp;</td>
124 124
		<td width="140"><bean:message key="user.payee.code"/>:</td>
125
		<td width="345"><htmlEL:text property="ticketingPayeeCode" name="ibssUserForm" autocomplete="off"/></td>
125
		<td width="345"><htmlEL:text property="ticketingPayeeCode" name="ibssUserForm" autocomplete="off" maxlength="3"/></td>
126 126
		<td width="3">&nbsp;</td>
127 127
   		<td width="44">&nbsp;</td>
128 128
	</tr>
......
133 133
	<tr>
134 134
		<td width="72">&nbsp;</td>
135 135
		<td width="140"><bean:message key="user.pan.cc"/>:</td>
136
		<td width="345"><htmlEL:text property="ccppPanCC" name="ibssUserForm" autocomplete="off"/></td>
136
		<td width="345"><htmlEL:text property="ccppPanCC" name="ibssUserForm" autocomplete="off" maxlength="16"/></td>
137 137
		<td width="3">&nbsp;</td>
138 138
   		<td width="44">&nbsp;</td>
139 139
	</tr>
WebContent/jsp/ss112_user/ibssRetailUserEdit.jsp
64 64
	<tr>
65 65
		<td width="72">&nbsp;</td>
66 66
		<td width="140"><bean:message key="user.pan.1"/>:</td>
67
		<td width="345"><htmlEL:text property="m2uPan1" name="ibssUserForm" autocomplete="off"/></td>
67
		<td width="345"><htmlEL:text property="m2uPan1" name="ibssUserForm" autocomplete="off" maxlength="16"/></td>
68 68
		<td width="3">&nbsp;</td>
69 69
   		<td width="44">&nbsp;</td>
70 70
	</tr>
71 71
	<tr>
72 72
		<td width="72">&nbsp;</td>
73 73
		<td width="140"><bean:message key="user.pan.2"/>:</td>
74
		<td width="345"><htmlEL:text property="m2uPan2" name="ibssUserForm" autocomplete="off"/></td>
74
		<td width="345"><htmlEL:text property="m2uPan2" name="ibssUserForm" autocomplete="off" maxlength="19"/></td>
75 75
		<td width="3">&nbsp;</td>
76 76
   		<td width="44">&nbsp;</td>
77 77
	</tr>
......
93 93
	<tr>
94 94
		<td width="72">&nbsp;</td>
95 95
		<td width="140"><bean:message key="user.full.name"/>:</td>
96
		<td width="345"><htmlEL:text property="ticketingFullName" name="ibssUserForm" autocomplete="off"/></td>
96
		<td width="345"><htmlEL:text property="ticketingFullName" name="ibssUserForm" autocomplete="off" maxlength="64"/></td>
97 97
		<td width="3">&nbsp;</td>
98 98
   		<td width="44">&nbsp;</td>
99 99
	</tr>
100 100
	<tr>
101 101
		<td width="72">&nbsp;</td>
102 102
		<td width="140"><bean:message key="user.first.name"/>:</td>
103
		<td><htmlEL:text property="ticketingFirstName" name="ibssUserForm" autocomplete="off"/></td>
103
		<td><htmlEL:text property="ticketingFirstName" name="ibssUserForm" autocomplete="off" maxlength="64"/></td>
104 104
		<td width="3">&nbsp;</td>
105 105
   		<td width="44">&nbsp;</td>
106 106
	</tr>
107 107
	<tr>
108 108
		<td width="72">&nbsp;</td>
109 109
		<td width="140"><bean:message key="user.last.name"/>:</td>
110
		<td width="345"><htmlEL:text property="ticketingLastName" name="ibssUserForm" autocomplete="off"/></td>
110
		<td width="345"><htmlEL:text property="ticketingLastName" name="ibssUserForm" autocomplete="off" maxlength="64"/></td>
111 111
		<td width="3">&nbsp;</td>
112 112
   		<td width="44">&nbsp;</td>
113 113
	</tr>
114 114
	<tr>
115 115
		<td width="72">&nbsp;</td>
116 116
		<td width="140"><bean:message key="user.payee.code"/>:</td>
117
		<td width="345"><htmlEL:text property="ticketingPayeeCode" name="ibssUserForm" autocomplete="off"/></td>
117
		<td width="345"><htmlEL:text property="ticketingPayeeCode" name="ibssUserForm" autocomplete="off" maxlength="3"/></td>
118 118
		<td width="3">&nbsp;</td>
119 119
   		<td width="44">&nbsp;</td>
120 120
	</tr>
......
125 125
	<tr>
126 126
		<td width="72">&nbsp;</td>
127 127
		<td width="140"><bean:message key="user.pan.cc"/>:</td>
128
		<td width="345"><htmlEL:text property="ccppPanCC" name="ibssUserForm" autocomplete="off"/></td>
128
		<td width="345"><htmlEL:text property="ccppPanCC" name="ibssUserForm" autocomplete="off" maxlength="16"/></td>
129 129
		<td width="3">&nbsp;</td>
130 130
   		<td width="44">&nbsp;</td>
131 131
	</tr>
WebContent/jsp/ss112_user/ibssRetailUserSearch.jsp
94 94
		<htmlEL:submit property="action" styleClass="button" onclick="overlay();">
95 95
			<bean:message key="general.button.search"/>
96 96
		</htmlEL:submit>
97
		<htmlEL:submit property="action" onclick="overlay();">
98
			<bean:message key="general.button.create" />
99
		</htmlEL:submit>
97 100
	</div>
98 101
	
99 102
	<div class="floatRight">
resource/com/ib/ibss/resources/exception/IBSSBusinessExceptionResources.properties
13 13
general.error.operation.time=error.service.available.time
14 14
general.error.1 = general.error.user.access
15 15
general.error.2 = errors.either3
16
general.error.unparseable.date=general.error.unparseable.date
17
general.error.incorrect.date=general.error.incorrect.date
16 18

  
17 19
# Login error message handling (similiar to UPass)
18 20
login.error.1=error.invalid.credential
resource/com/ib/ibss/resources/message/IBSSApplicationResources.properties
189 189

  
190 190
general.quicklink.pagenumber=Page {0} of {1}
191 191

  
192
general.error.unparseable.date=Incorrect date format for {0}
193
general.error.incorrect.date=Incorrect date input for {0}
194

  
192 195
#General Button
193 196
general.button.report=Performance Report
194 197
general.button.login=Login
src/com/ib/ibss/controller/actions/ss112_user/IBSSRetailUserEnquiryMainAction.java
26 26
import com.ib.ibss.common.constant.FunctionConstants.FunctionCodeEnum;
27 27
import com.ib.ibss.common.utils.DataValidator;
28 28
import com.ib.ibss.common.utils.IBSSNavigationUtil;
29
import com.ib.ibss.enterprise.services.AccessConstants;
29 30
import com.ib.ibss.enterprise.services.ss102_user_admin.constants.IBSSUserConstants;
30 31
import com.ib.ibss.enterprise.services.ss112_user.IBSSRetailUserEnquiryMainServices;
31 32
import com.ib.ibss.error.exception.IBSSGenericException;
......
70 71
	{
71 72
		ActionErrors m_oError = p_oForm.validate(createNewActionMapping(p_oMapping, JSPValidator.USER_ENQUIRY_SEARCH_VALIDATION), p_oRequest);
72 73

  
73
		if(!m_oError.isEmpty ())
74
		String action = p_oRequest.getParameter(AccessConstants.ACTION);
75
		if("create".equalsIgnoreCase (action))
74 76
		{
75
			errorHandling(p_oRequest, p_oMapping, m_oError);
77
			setForwardPage("create");
76 78
		}
77 79
		else
78 80
		{
79
			String m_sUserEnquirySegment = null;
80
			Map<String, String> m_oInputsMap = new HashMap<String, String>();
81
			
82
			try
81
			if(!m_oError.isEmpty ())
83 82
			{
84
				checkToken (p_oRequest, p_oMapping, false);
85
				checkCredential(p_oRequest, FunctionCodeEnum.RIB_USER_ENQUIRY);
83
				errorHandling(p_oRequest, p_oMapping, m_oError);
84
			}
85
			else
86
			{
87
				String m_sUserEnquirySegment = null;
88
				Map<String, String> m_oInputsMap = new HashMap<String, String>();
86 89
				
87
				noErrorHandling (p_oRequest, p_oMapping);
88
				IBSSDynaBean m_oIBDynaBean = IBSSDynaBeanManager.createIBSSDynaBean (p_oForm, p_oMapping);
89
				IBSSSessionObjects m_oSessionObjects = new IBSSSessionObjects(p_oRequest);
90
				IBSSNavigationUtil m_oTree = new IBSSNavigationUtil(m_oSessionObjects);
91
				m_oTree.buildNavigation ();
92
				
93
				m_sUserEnquirySegment = p_oRequest.getParameter ("p");
94
				
95
				if (DataValidator.isEmptyString(m_sUserEnquirySegment))
90
				try
96 91
				{
97
					m_sUserEnquirySegment = "1";
92
					checkToken (p_oRequest, p_oMapping, false);
93
					checkCredential(p_oRequest, FunctionCodeEnum.RIB_USER_ENQUIRY);
94
					
95
					noErrorHandling (p_oRequest, p_oMapping);
96
					IBSSDynaBean m_oIBDynaBean = IBSSDynaBeanManager.createIBSSDynaBean (p_oForm, p_oMapping);
97
					IBSSSessionObjects m_oSessionObjects = new IBSSSessionObjects(p_oRequest);
98
					IBSSNavigationUtil m_oTree = new IBSSNavigationUtil(m_oSessionObjects);
99
					m_oTree.buildNavigation ();
100
					
101
					m_sUserEnquirySegment = p_oRequest.getParameter ("p");
102
					
103
					if (DataValidator.isEmptyString(m_sUserEnquirySegment))
104
					{
105
						m_sUserEnquirySegment = "1";
106
					}
107
					
108
					m_oInputsMap.put (IBSSUserConstants.ENQUIRY_SEGMENT, m_sUserEnquirySegment);
109
					IBSSRetailUserEnquiryMainServices m_oServices = new IBSSRetailUserEnquiryMainServices(m_oSessionObjects);
110
					m_oServices.setIBSSDynaBean (m_oIBDynaBean);
111
					m_oServices.createEnquiryScreen(m_oInputsMap, p_oRequest);
98 112
				}
99
				
100
				m_oInputsMap.put (IBSSUserConstants.ENQUIRY_SEGMENT, m_sUserEnquirySegment);
101
				IBSSRetailUserEnquiryMainServices m_oServices = new IBSSRetailUserEnquiryMainServices(m_oSessionObjects);
102
				m_oServices.setIBSSDynaBean (m_oIBDynaBean);
103
				m_oServices.createEnquiryScreen(m_oInputsMap, p_oRequest);
104
			}
105
			catch (IBSSGenericException e)
106
			{
107
				errorHandling(p_oRequest, p_oMapping, e);
113
				catch (IBSSGenericException e)
114
				{
115
					errorHandling(p_oRequest, p_oMapping, e);
116
				}
108 117
			}
109 118
		}
119
		
110 120
		return super.execute (p_oMapping, p_oForm, p_oRequest, p_oResponse);
111 121
	}
112 122
}
src/com/ib/ibss/enterprise/services/ss112_user/IBSSRetailUserCreateResultServices.java
11 11

  
12 12
package com.ib.ibss.enterprise.services.ss112_user;
13 13

  
14
import java.text.ParseException;
14 15
import java.text.SimpleDateFormat;
15 16
import java.util.Date;
16 17

  
18
import org.hibernate.Session;
19

  
17 20
import my.com.upass.MinimalConstants;
21
import my.com.upass.UPassControllerV2;
22
import my.com.upass.generic.hibernate.HibernateUtils;
18 23
import my.com.upass.maybank.MaybankFacadeImpl;
24
import my.com.upass.maybank.entities.UserProfile;
19 25
import my.com.upass.pojo.ClientApp;
20 26
import net.penril.ibss.audit.log.AuditLogConstants;
21 27
import net.penril.ibss.audit.log.USER_ACTIVITY_TYTPE;
......
122 128
			//im2u
123 129
			else if(selectedAppId.equals(ClientApp.APP_ID_IM2U))
124 130
			{
125
				wsFlag 		= getBeanMessage (IBSSUserConstants.IM2U_WS_FLAG);
126
				wsIdentCode = getBeanMessage (IBSSUserConstants.IM2U_WS_IDENT_CODE);
127
				wsMySgId 	= getBeanMessage (IBSSUserConstants.IM2U_WS_MYSG_ID);
128
				String regTimeStamp = getBeanMessage (IBSSUserConstants.IM2U_WS_REG_TIMESTAMP);
131
				try
132
				{
133
					wsFlag 		= getBeanMessage (IBSSUserConstants.IM2U_WS_FLAG);
134
					wsIdentCode = getBeanMessage (IBSSUserConstants.IM2U_WS_IDENT_CODE);
135
					wsMySgId 	= getBeanMessage (IBSSUserConstants.IM2U_WS_MYSG_ID);
136
					String regTimeStamp = getBeanMessage (IBSSUserConstants.IM2U_WS_REG_TIMESTAMP);
137
					
138
					SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
139
					wsRegTimeStamp = dateFormat.parse(regTimeStamp);
140
					
141
					UPassControllerV2 upass = new UPassControllerV2();
142
					Session session = HibernateUtils.currentSession();
143
					session.beginTransaction();
144
					UserProfile profile = upass.findProfile(adminUserAlias, adminPassword, userAlias, ClientApp.APP_ID_M2U, session);
145
					
146
					if((profile.getMinUser().getUdateCreated()).after(wsRegTimeStamp) || wsRegTimeStamp.after(new Date()))
147
					{
148
						throw IBSSErrorHandler.createBusinessException ("general.error.incorrect.", "date", new String[]{ResourcesUtils.getApplicationResourceMessage("user.ws.registration.time.stamp")});
149
					}
150
					
151
					rc 		= impl.newIm2uUser(adminUserAlias, adminPassword, userAlias, wsFlag, wsIdentCode, wsMySgId, wsRegTimeStamp);
152
				}
153
				catch (Exception e)
154
				{
155
					if(e instanceof ParseException)
156
					{
157
						throw IBSSErrorHandler.createBusinessException ("general.error.unparseable.", "date", new String[]{ResourcesUtils.getApplicationResourceMessage("user.ws.registration.time.stamp")});
158
					}
159
					IBSSErrorHandler.handleServiceError (e, c_oClass);
160
				}
129 161
				
130
				SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
131
				wsRegTimeStamp = dateFormat.parse(regTimeStamp);
132
				
133
				rc 		= impl.newIm2uUser(adminUserAlias, adminPassword, userAlias, wsFlag, wsIdentCode, wsMySgId, wsRegTimeStamp);
134 162
			}
135 163
			
136 164
			System.out.println("rc = "+rc);
src/com/ib/ibss/enterprise/services/ss112_user/IBSSRetailUserEnquiryEditResultServices.java
11 11

  
12 12
package com.ib.ibss.enterprise.services.ss112_user;
13 13

  
14
import java.text.ParseException;
14 15
import java.text.SimpleDateFormat;
15 16
import java.util.Date;
16 17
import java.util.HashMap;
......
151 152
			//IM2U
152 153
			else if(Integer.valueOf(appId).equals(ClientApp.APP_ID_IM2U))
153 154
			{
154
				Im2uUser im2uProfile = (Im2uUser) userProfile;
155
				try
156
				{
157
					String regTimeStamp = getBeanMessage (IBSSUserConstants.IM2U_WS_REG_TIMESTAMP);
158
					
159
					SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
160
					Date wsRegTimeStamp = dateFormat.parse(regTimeStamp);
161
					
162
					if((userProfile.getMinUser().getUdateCreated()).after(wsRegTimeStamp) || wsRegTimeStamp.after(new Date()))
163
					{
164
						throw IBSSErrorHandler.createBusinessException ("general.error.incorrect.", "date", new String[]{ResourcesUtils.getApplicationResourceMessage("user.ws.registration.time.stamp")});
165
					}
166
					
167
					Im2uUser im2uProfile = (Im2uUser) userProfile;
168
					
169
					Im2uUser im2uProfile2 = im2uProfile;
170
					im2uProfile2.setWsFlag(getBeanMessage(IBSSUserConstants.IM2U_WS_FLAG));
171
					im2uProfile2.setWsIdentCode(getBeanMessage(IBSSUserConstants.IM2U_WS_IDENT_CODE));
172
					im2uProfile2.setWsMySgId(getBeanMessage(IBSSUserConstants.IM2U_WS_MYSG_ID));
173
					im2uProfile2.setWsRegTimeStamp(wsRegTimeStamp);
174
					
175
					valueMap = BeanToBeanTransferUtils.convertBeanToStringForDiffValue(im2uProfile, im2uProfile2);
176
					
177
					rc = upass.updateProfileShallowly(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), im2uProfile2, session);
178
					
179
				}
180
				catch (Exception e)
181
				{
182
					if(e instanceof ParseException)
183
					{
184
						throw IBSSErrorHandler.createBusinessException ("general.error.unparseable.", "date", new String[]{ResourcesUtils.getApplicationResourceMessage("user.ws.registration.time.stamp")});
185
					}
186
					IBSSErrorHandler.handleServiceError (e, c_oClass);
187
				}
155 188
				
156
				Im2uUser im2uProfile2 = im2uProfile;
157
				im2uProfile2.setWsFlag(getBeanMessage(IBSSUserConstants.IM2U_WS_FLAG));
158
				im2uProfile2.setWsIdentCode(getBeanMessage(IBSSUserConstants.IM2U_WS_IDENT_CODE));
159
				im2uProfile2.setWsMySgId(getBeanMessage(IBSSUserConstants.IM2U_WS_MYSG_ID));
160
				
161
				SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
162
				Date wsRegTimeStamp = dateFormat.parse(getBeanMessage(IBSSUserConstants.IM2U_WS_REG_TIMESTAMP));
163
				im2uProfile2.setWsRegTimeStamp(wsRegTimeStamp);
164
				
165
				valueMap = BeanToBeanTransferUtils.convertBeanToStringForDiffValue(im2uProfile, im2uProfile2);
166
				
167
				rc = upass.updateProfileShallowly(getIBSSessionObjects().getSessionUserAlias(), getIBSSessionObjects().getSessionUserPassword(), im2uProfile2, session);
168 189
			}
169 190
			
170 191
			System.out.println("rc = "+rc);

Also available in: Unified diff