Commit e49d66ea authored by ssalve's avatar ssalve

Sarita : Done changes by sarita to get loginCode,loginEmpCode,loginSiteCode...

Sarita : Done changes by sarita to get loginCode,loginEmpCode,loginSiteCode and profileId as input on 24 SEP 2018

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@191139 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 54e9d226
...@@ -36,10 +36,20 @@ public class GenVal ...@@ -36,10 +36,20 @@ public class GenVal
//HashMap<String, String> errorMap=new HashMap<String, String>(); //HashMap<String, String> errorMap=new HashMap<String, String>();
String formNo=""; String formNo="";
int Ctr=0; int Ctr=0;
String xtraParams = "";
//end added by msalam on 22/11/07 for appending log in jboss log //end added by msalam on 22/11/07 for appending log in jboss log
//Added by Santosh on 15/12/2016 to return list of error codes instead of HashMap //Added by Santosh on 15/12/2016 to return list of error codes instead of HashMap
ArrayList<HashMap<String,String>> errList = new ArrayList<HashMap<String,String>>(); ArrayList<HashMap<String,String>> errList = new ArrayList<HashMap<String,String>>();
//Done changes by sarita for rquest id A18ESUN010 => To Set loginCode,loginSiteCode,loginEmpCode & progileId to be used as sql input for generalized validation on 06 SEP 2018<= [START]
HashMap<String,String> xtraparamsValMap = new HashMap<>();
public GenVal(HashMap<String,String> xtraparamsValues)
{
xtraparamsValMap = xtraparamsValues;
}
//Done changes by sarita for rquest id A18ESUN010 => To Set loginCode,loginSiteCode,loginEmpCode & progileId to be used as sql input for generalized validation on 06 SEP 2018<= [END]
//Changed by Santosh on 15/12/2016 to return list of error codes instead of HashMap //Changed by Santosh on 15/12/2016 to return list of error codes instead of HashMap
//public HashMap genVal(String modName ,String objContext,Document data ) //public HashMap genVal(String modName ,String objContext,Document data )
public ArrayList<HashMap<String,String>> genVal(String modName ,String objContext,Document data ) public ArrayList<HashMap<String,String>> genVal(String modName ,String objContext,Document data )
...@@ -838,6 +848,8 @@ public class GenVal ...@@ -838,6 +848,8 @@ public class GenVal
String colValue=""; String colValue="";
//Added by Santosh on 15/12/2016 to add trace in error string //Added by Santosh on 15/12/2016 to add trace in error string
String traceNodeStr = ""; String traceNodeStr = "";
boolean isValExistInMap = false;
String colNameInput = "";
try try
{ {
writeLog( filePtr, "Mod Name :::" + modName, true ); writeLog( filePtr, "Mod Name :::" + modName, true );
...@@ -883,8 +895,34 @@ public class GenVal ...@@ -883,8 +895,34 @@ public class GenVal
{ {
for(int ctr=0; ctr < sqlInputVec.size(); ctr++) for(int ctr=0; ctr < sqlInputVec.size(); ctr++)
{ {
isValExistInMap = false;
String colName = (String)sqlInputVec.get( ctr ); String colName = (String)sqlInputVec.get( ctr );
System.out.println("colName is 121["+colName+"]");
//added on 310107 //added on 310107
//Done changes by sarita for request id A18ESUN010 => To Set loginCode,loginSiteCode,loginEmpCode & progileId to be used as sql input for generalized validation on 06 SEP 2018<= [START]
System.out.println("Values in HashMap :: ["+xtraparamsValMap+"]");
if((colName != null && colName.trim().length() > 0) && (colName.indexOf( "." ) != -1))
{
colNameInput = colName.substring( colName.indexOf( "." ) + 1 );
colNameInput = colNameInput.replaceAll( ",", " " );
colNameInput = colNameInput.trim();
System.out.println("colNameInput is ["+colNameInput+"]");
}
for (String keys : xtraparamsValMap.keySet())
{
if(colNameInput.equalsIgnoreCase(keys))
{
colType = "String";
colValue = xtraparamsValMap.get(keys);
System.out.println("colType ["+colType+"] \t colValue ["+colValue+"]");
isValExistInMap = true;
}
}
if(!isValExistInMap)
{
//Done changes by sarita for request id A18ESUN010 => To Set loginCode,loginSiteCode,loginEmpCode & progileId to be used as sql input for generalized validation on 06 SEP 2018<= [END]
int objContextInt = Integer.parseInt( colName.substring( 0, colName.indexOf( "." ) ) ); int objContextInt = Integer.parseInt( colName.substring( 0, colName.indexOf( "." ) ) );
objContextInt++; objContextInt++;
String objContext1 = new Integer( objContextInt ).toString(); String objContext1 = new Integer( objContextInt ).toString();
...@@ -909,6 +947,7 @@ public class GenVal ...@@ -909,6 +947,7 @@ public class GenVal
{ {
colValue = getValueFromDom( dom, colName1, objContext1); colValue = getValueFromDom( dom, colName1, objContext1);
} }
}
writeLog( filePtr, "colValue form dom===[" + colValue + "]" + " Col Type [" + colType + "]", true ); writeLog( filePtr, "colValue form dom===[" + colValue + "]" + " Col Type [" + colType + "]", true );
......
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