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, ...@@ -1392,6 +1392,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
String userId = "", loginEmpCode = "", loginSiteCode = "", entityCode = "", profileId = "", String userId = "", loginEmpCode = "", loginSiteCode = "", entityCode = "", profileId = "",
userType = "", chgTerm = ""; userType = "", chgTerm = "";
//Added by sarita on 26DEC2017
String transDB = "";
try{ try{
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
...@@ -1403,7 +1405,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote, ...@@ -1403,7 +1405,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
profileId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"profileId"); profileId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"profileId");
userType = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"userType"); userType = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"userType");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"chgTerm"); 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); System.out.println("xtraParams is @@@@@ " + xtraParams);
userInfoStr.append("<UserInfo>"); userInfoStr.append("<UserInfo>");
...@@ -1414,6 +1417,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote, ...@@ -1414,6 +1417,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
userInfoStr.append("<profileId>").append("<![CDATA["+profileId+"]]>").append("</profileId>\r\n"); userInfoStr.append("<profileId>").append("<![CDATA["+profileId+"]]>").append("</profileId>\r\n");
userInfoStr.append("<userType>").append("<![CDATA["+userType+"]]>").append("</userType>\r\n"); userInfoStr.append("<userType>").append("<![CDATA["+userType+"]]>").append("</userType>\r\n");
userInfoStr.append("<remoteHost>").append("<![CDATA["+chgTerm+"]]>").append("</remoteHost>\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>"); userInfoStr.append("</UserInfo>");
} }
catch (Exception e){ catch (Exception e){
...@@ -1432,11 +1437,13 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote, ...@@ -1432,11 +1437,13 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
String sql = ""; String sql = "";
PreparedStatement pstmt = null ; PreparedStatement pstmt = null ;
ResultSet rs = null; ResultSet rs = null;
//Added by sarita on 26DEC2017
String transDB = "";
try{ try{
//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 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 = conn.prepareStatement(sql);
pstmt.setString(1,loginCode); pstmt.setString(1,loginCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -1447,6 +1454,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote, ...@@ -1447,6 +1454,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote,
userType = rs.getString("USER_TYPE"); userType = rs.getString("USER_TYPE");
userLang = rs.getString("USER_LANG"); userLang = rs.getString("USER_LANG");
userCountry= rs.getString("USER_COUNTRY"); userCountry= rs.getString("USER_COUNTRY");
//added by sarita on 26DEC2017 to insert transDB parameter
transDB= rs.getString("TRANS_DB");
} }
remotehost = InetAddress.getLocalHost().getHostAddress(); remotehost = InetAddress.getLocalHost().getHostAddress();
...@@ -1463,7 +1472,8 @@ public class GenTaskDemoIC extends ValidatorEJB implements GenTaskDemoICRemote, ...@@ -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("user_country=" + userCountry);
xtraParamsBuff.append(XTRA_PARAMS_SEPARATOR).append("charEnc=" + CommonConstants.ENCODING); xtraParamsBuff.append(XTRA_PARAMS_SEPARATOR).append("charEnc=" + CommonConstants.ENCODING);
xtraParamsBuff.append(XTRA_PARAMS_SEPARATOR).append("termId="+remotehost); 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; String chgTerm = remotehost;
if(chgTerm!=null && chgTerm.length()>15){ 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