Commit 901efe9f authored by ssalve's avatar ssalve

Sarita : Done changes to add transDB in xtraparams for processRequest parameters on 26DEC2017

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@177238 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a43eedcf
......@@ -1392,6 +1392,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
String userId = "", loginEmpCode = "", loginSiteCode = "", entityCode = "", profileId = "",
userType = "", chgTerm = "";
//Added by sarita on 26DEC2017
String transDB = "";
try{
E12GenericUtility genericUtility = new E12GenericUtility();
......@@ -1403,7 +1405,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
profileId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"profileId");
userType = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"userType");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"chgTerm");
//added by sarita on 26DEC2017 to insert transDB parameter
transDB = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"transDB");
System.out.println("xtraParams is @@@@@ " + xtraParams);
userInfoStr.append("<UserInfo>");
......@@ -1414,6 +1417,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
userInfoStr.append("<profileId>").append("<![CDATA["+profileId+"]]>").append("</profileId>\r\n");
userInfoStr.append("<userType>").append("<![CDATA["+userType+"]]>").append("</userType>\r\n");
userInfoStr.append("<remoteHost>").append("<![CDATA["+chgTerm+"]]>").append("</remoteHost>\r\n");
//added by sarita on 26DEC2017 to insert transDB parameter
userInfoStr.append("<transDB>").append("<![CDATA["+transDB+"]]>").append("</transDB>\r\n");
userInfoStr.append("</UserInfo>");
}
catch (Exception e){
......@@ -1428,15 +1433,17 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
String remotehost = "", entityCode = "", profileId = "", userType = "", userCountry = "", userLang="";
StringBuffer xtraParamsBuff = new StringBuffer();
String sql = "";
PreparedStatement pstmt = null ;
ResultSet rs = null;
//Added by sarita on 26DEC2017
String transDB = "";
try{
sql = "SELECT USER_TYPE,ENTITY_CODE,PROFILE_ID,USER_LANG,USER_COUNTRY FROM USERS WHERE CODE = ? ";
//added & replace by sarita on 26DEC2017 to insert transDB parameter
//sql = "SELECT USER_TYPE,ENTITY_CODE,PROFILE_ID,USER_LANG,USER_COUNTRY FROM USERS WHERE CODE = ? ";
sql = "SELECT USER_TYPE,ENTITY_CODE,PROFILE_ID,USER_LANG,USER_COUNTRY,TRANS_DB FROM USERS WHERE CODE = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,loginCode);
rs = pstmt.executeQuery();
......@@ -1447,6 +1454,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
userType = rs.getString("USER_TYPE");
userLang = rs.getString("USER_LANG");
userCountry= rs.getString("USER_COUNTRY");
//added by sarita on 26DEC2017 to insert transDB parameter
transDB= rs.getString("TRANS_DB");
}
remotehost = InetAddress.getLocalHost().getHostAddress();
......@@ -1463,7 +1472,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
xtraParamsBuff.append(XTRA_PARAMS_SEPARATOR).append("user_country=" + userCountry);
xtraParamsBuff.append(XTRA_PARAMS_SEPARATOR).append("charEnc=" + CommonConstants.ENCODING);
xtraParamsBuff.append(XTRA_PARAMS_SEPARATOR).append("termId="+remotehost);
//added by sarita on 26DEC2017 to insert transDB parameter
xtraParamsBuff.append(XTRA_PARAMS_SEPARATOR).append("transDB="+transDB);
String chgTerm = remotehost;
if(chgTerm!=null && chgTerm.length()>15){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment