Commit 35c6ccae authored by sbade's avatar sbade

Added validation for edit case save action.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93110 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 90bf5f7d
...@@ -5,7 +5,6 @@ import ibase.webitm.ejb.ValidatorEJB; ...@@ -5,7 +5,6 @@ import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.GenericUtility; import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
...@@ -13,245 +12,263 @@ import java.sql.SQLException; ...@@ -13,245 +12,263 @@ import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import javax.ejb.Stateless; import javax.ejb.Stateless;
@Stateless @Stateless
public class LoanPartyBank extends ValidatorEJB implements LoanPartyBankLocal, LoanPartyBankRemote { public class LoanPartyBank extends ValidatorEJB implements LoanPartyBankLocal,
public LoanPartyBank() { LoanPartyBankRemote {
System.out.println("inside loanparty"); public LoanPartyBank() {
} System.out.println("inside loanparty");
}
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException, ITMException { public String wfValData(String xmlString, String xmlString1,
Document dom = null; String xmlString2, String objContext, String editFlag,
Document dom1 = null; String xtraParams) throws RemoteException, ITMException {
Document dom2 = null; Document dom = null;
String errString = ""; Document dom1 = null;
Document dom2 = null;
String errString = "";
NodeList parentNodeList = null; NodeList parentNodeList = null;
NodeList childNodeList = null; NodeList childNodeList = null;
Node parentNode = null; Node parentNode = null;
Node childNode = null; Node childNode = null;
String childNodeName = ""; String childNodeName = "";
try { try {
dom = parseString(xmlString); dom = parseString(xmlString);
dom1 = parseString(xmlString1); dom1 = parseString(xmlString1);
if (xmlString2.trim().length() > 0) { if (xmlString2.trim().length() > 0) {
dom2 = parseString("<Root>" + xmlString2 + "</Root>"); dom2 = parseString("<Root>" + xmlString2 + "</Root>");
} }
if (objContext != null && Integer.parseInt(objContext) == 1) { if (objContext != null && Integer.parseInt(objContext) == 1) {
parentNodeList = dom2.getElementsByTagName("Header0"); parentNodeList = dom2.getElementsByTagName("Header0");
parentNode = parentNodeList.item(1); parentNode = parentNodeList.item(1);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
for (int x = 0; x < childNodeList.getLength(); x++) { for (int x = 0; x < childNodeList.getLength(); x++) {
childNode = childNodeList.item(x); childNode = childNodeList.item(x);
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
if (childNodeName.equalsIgnoreCase("Detail1")) { if (childNodeName.equalsIgnoreCase("Detail1")) {
errString = wfValData(dom, dom1, dom2, "1", editFlag, xtraParams); errString = wfValData(dom, dom1, dom2, "1", editFlag,
if (errString != null && errString.trim().length() > 0) xtraParams);
break; if (errString != null && errString.trim().length() > 0)
} else if (childNodeName.equalsIgnoreCase("Detail2")) { break;
errString = wfValData(dom, dom1, dom2, "2", editFlag, xtraParams); } else if (childNodeName.equalsIgnoreCase("Detail2")) {
break; errString = wfValData(dom, dom1, dom2, "2", editFlag,
} xtraParams);
} break;
} }
}
}
else { else {
errString = wfValData(dom, dom1, dom2, objContext, editFlag, xtraParams); errString = wfValData(dom, dom1, dom2, objContext, editFlag,
} xtraParams);
} catch (Exception e) { }
System.out.println("Exception : Inside wfValData Method ..> " + e.getMessage()); } catch (Exception e) {
throw new ITMException(e); System.out.println("Exception : Inside wfValData Method ..> "
+ e.getMessage());
throw new ITMException(e);
}
return (errString);
} }
return (errString);
}
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException, ITMException { public String wfValData(Document dom, Document dom1, Document dom2,
GenericUtility genericUtility; String objContext, String editFlag, String xtraParams)
NodeList parentNodeList = null; throws RemoteException, ITMException {
NodeList childNodeList = null; GenericUtility genericUtility;
Node parentNode = null; NodeList parentNodeList = null;
Node childNode = null; NodeList childNodeList = null;
int ctr = 0, currentFormNo = 0, childNodeListLength = 0, cnt = 0; Node parentNode = null;
String childNodeName = null; Node childNode = null;
String errString = ""; int ctr = 0, currentFormNo = 0, childNodeListLength = 0, cnt = 0;
String errCode = ""; String childNodeName = null;
Connection conn = null; String errString = "";
PreparedStatement pStmt = null; String errCode = "";
ResultSet rs = null; Connection conn = null;
String sql = ""; PreparedStatement pStmt = null;
String userId = ""; ResultSet rs = null;
String partyCode=""; String sql = "";
String userId = "";
//SimpleDateFormat simpleDateFormat; String partyCode = "";
try {
ConnDriver connDriver = new ConnDriver();
try { conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
genericUtility = GenericUtility.getInstance();
// simpleDateFormat = new
// SimpleDateFormat(genericUtility.getApplDateFormat());
if (objContext != null && objContext.trim().length() > 0) {
currentFormNo = Integer.parseInt(objContext);
}
switch (currentFormNo) {
case 1:
parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
childNodeListLength = childNodeList.getLength();
ConnDriver connDriver = new ConnDriver(); for (ctr = 0; ctr < childNodeListLength; ctr++) {
conn = connDriver.getConnectDB("DriverITM"); childNode = childNodeList.item(ctr);
conn.setAutoCommit(false); childNodeName = childNode.getNodeName();
connDriver = null; if (childNodeName.equalsIgnoreCase("party_code")) {
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); partyCode = genericUtility.getColumnValue("party_code",
genericUtility = GenericUtility.getInstance(); dom);
//simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat()); partyCode = partyCode == null ? "" : partyCode.trim();
if (objContext != null && objContext.trim().length() > 0) { if (partyCode.length() == 0) {
currentFormNo = Integer.parseInt(objContext); errCode = "VTLPCDNL";
} errString = getErrorString("party_code", errCode,
switch (currentFormNo) { userId);
case 1: break;
parentNodeList = dom.getElementsByTagName("Detail1"); } else {
parentNode = parentNodeList.item(0); sql = "select count(1) from loanparty where party_code = ?";
childNodeList = parentNode.getChildNodes(); pStmt = conn.prepareStatement(sql);
childNodeListLength = childNodeList.getLength(); pStmt.setString(1, partyCode);
rs = pStmt.executeQuery();
for (ctr = 0; ctr < childNodeListLength; ctr++) { if (rs.next()) {
childNode = childNodeList.item(ctr); cnt = rs.getInt(1);
childNodeName = childNode.getNodeName(); }
if (childNodeName.equalsIgnoreCase("party_code")) { rs.close();
partyCode = genericUtility.getColumnValue("party_code", dom); rs = null;
partyCode = partyCode == null ? "" : partyCode.trim(); pStmt.close();
if (partyCode.length() == 0) { pStmt = null;
errCode = "VTLPCDNL"; if (cnt == 0) {
errString = getErrorString("party_code", errCode, userId); errCode = "VTLPCDNF";
break; errString = getErrorString("party_code",
} else { errCode, userId);
sql = "select count(1) from loanparty where party_code = ?"; break;
pStmt = conn.prepareStatement(sql); }
pStmt.setString(1, partyCode); }
rs = pStmt.executeQuery(); } else if (childNodeName.equalsIgnoreCase("bank_code__ben")) {
String bankCodeBen = genericUtility.getColumnValue(
"bank_code__ben", dom);
partyCode = genericUtility.getColumnValue("party_code",
dom);
bankCodeBen = bankCodeBen == null ? "" : bankCodeBen
.trim();
System.out.println("EditFlag-->"+editFlag);
if (bankCodeBen.length() == 0) {
errCode = "VTBCBNNL";
errString = getErrorString("bank_code__ben",
errCode, userId);
break;
}
else if(!editFlag.trim().equalsIgnoreCase("E")) {
sql = "select count(1) from loanparty_bank where "
+" party_code = ? and bank_code__ben= ? ";
pStmt = conn.prepareStatement(sql);
pStmt.setString(1, partyCode);
pStmt.setString(2, bankCodeBen);
rs = pStmt.executeQuery();
if (rs.next()) { if (rs.next()) {
cnt = rs.getInt(1); cnt = rs.getInt(1);
} }
rs.close(); rs.close();
rs = null; rs = null;
pStmt.close(); pStmt.close();
pStmt = null; pStmt = null;
if (cnt == 0) { if (cnt > 0) {
errCode = "VTLPCDNF"; errCode = "VMLPCABCE";
errString = getErrorString("party_code", errCode, userId); errString = getErrorString("party_code",
break; errCode, userId);
} break;
} }
} else if (childNodeName.equalsIgnoreCase("bank_code__ben")) { }
String bankCodeBen = genericUtility.getColumnValue("bank_code__ben", dom);
partyCode = genericUtility.getColumnValue("party_code", dom);
bankCodeBen = bankCodeBen == null ? "" : bankCodeBen.trim();
if (bankCodeBen.length() == 0)
{
errCode = "VTBCBNNL";
errString = getErrorString("bank_code__ben", errCode, userId);
break;
}
else
{
sql = "select count(1) from loanparty_bank where party_code = ? and bank_code__ben= ? ";
pStmt = conn.prepareStatement(sql);
pStmt.setString(1, partyCode);
pStmt.setString(2, bankCodeBen);
rs = pStmt.executeQuery();
if (rs.next()) { } else if (childNodeName.equalsIgnoreCase("bank_name__ben")) {
cnt = rs.getInt(1); String bankNameBen = genericUtility.getColumnValue(
} "bank_name__ben", dom);
rs.close(); bankNameBen = bankNameBen == null ? "" : bankNameBen
rs = null; .trim();
pStmt.close(); if (bankNameBen.length() == 0) {
pStmt = null; errCode = "VTBNBNNL";
if (cnt > 0) { errString = getErrorString("bank_name__ben",
errCode = "VMLPCABCE"; errCode, userId);
errString = getErrorString("party_code", errCode, userId); break;
break; }
} } else if (childNodeName
} .equalsIgnoreCase("bank_acct_no__ben")) {
String bankActNo = genericUtility.getColumnValue(
}else if (childNodeName.equalsIgnoreCase("bank_name__ben")) { "bank_acct_no__ben", dom);
String bankNameBen = genericUtility.getColumnValue("bank_name__ben", dom);
bankNameBen = bankNameBen == null ? "" : bankNameBen.trim();
if (bankNameBen.length() == 0) {
errCode = "VTBNBNNL";
errString = getErrorString("bank_name__ben", errCode, userId);
break;
}
}else if (childNodeName.equalsIgnoreCase("bank_acct_no__ben")) {
String bankActNo = genericUtility.getColumnValue("bank_acct_no__ben", dom);
bankActNo = bankActNo == null ? "" : bankActNo.trim(); bankActNo = bankActNo == null ? "" : bankActNo.trim();
if (bankActNo.length() == 0) { if (bankActNo.length() == 0) {
errCode = "VTBANNL"; errCode = "VTBANNL";
errString = getErrorString("bank_acct_no__ben", errCode, userId); errString = getErrorString("bank_acct_no__ben",
break; errCode, userId);
} break;
}else if (childNodeName.equalsIgnoreCase("active_yn")) { }
String active = genericUtility.getColumnValue("active_yn", dom); } else if (childNodeName.equalsIgnoreCase("active_yn")) {
active = active == null ? "" : active.trim(); String active = genericUtility.getColumnValue(
if (active.length() == 0) { "active_yn", dom);
errCode = "VTACTNL"; active = active == null ? "" : active.trim();
errString = getErrorString("active_yn", errCode, userId); if (active.length() == 0) {
break; errCode = "VTACTNL";
} errString = getErrorString("active_yn", errCode,
}else if (childNodeName.equalsIgnoreCase("confirmed")) { userId);
String confirmed = genericUtility.getColumnValue("confirmed", dom); break;
confirmed = confirmed == null ? "" : confirmed.trim(); }
if (confirmed.length() == 0) { }
errCode = "VTCONNL";
errString = getErrorString("confirmed", errCode, userId); }// end of for
break; }// end of switch
} } catch (Exception e) {
e.printStackTrace();
System.out.println("Exception ..> " + e.getMessage());
errString = e.getMessage();
throw new ITMException(e);
} finally {
try {
if (conn != null) {
conn.close();
} }
}//end of for conn = null;
}//end of switch } catch (Exception d) {
} catch (Exception e) { d.printStackTrace();
e.printStackTrace(); System.out.println("Exception ..> " + d);
errString = e.getMessage(); }
throw new ITMException(e);
} finally {
try {
if (conn != null) {
conn.close();
} }
conn = null; return errString;
} catch (Exception d) {
d.printStackTrace();
}
} }
return errString;
} // /CHANGES FOR ITMCHANGE
///CHANGES FOR ITMCHANGE public String itemChanged(String xmlString, String xmlString1,
String xmlString2, String objContext, String currentColumn,
public String itemChanged(String xmlString,String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException String editFlag, String xtraParams) throws RemoteException,
{ ITMException {
System.out.println("------------------ itemChanged called------------------"); System.out
.println("------------------ itemChanged called------------------");
Document dom = null; Document dom = null;
Document dom1 = null; Document dom1 = null;
Document dom2 = null; Document dom2 = null;
String valueXmlString = ""; String valueXmlString = "";
try try {
{
dom = parseString(xmlString); dom = parseString(xmlString);
dom1 = parseString(xmlString1); dom1 = parseString(xmlString1);
dom2 = parseString(xmlString2); dom2 = parseString(xmlString2);
valueXmlString = itemChanged(dom,dom1,dom2,objContext,currentColumn,editFlag,xtraParams); valueXmlString = itemChanged(dom, dom1, dom2, objContext,
} currentColumn, editFlag, xtraParams);
catch(Exception e) } catch (Exception e) {
{ System.out .println("Exception : [LoanPartyBank ][itemChanged] :==>\n"
System.out.println("Exception : [SiteLoanParty ][itemChanged(String,String)] :==>\n"+e.getMessage()); + e.getMessage());
} }
return valueXmlString; return valueXmlString;
} }
public String itemChanged(Document dom, Document dom1,Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException public String itemChanged(Document dom, Document dom1, Document dom2,
{ String objContext, String currentColumn, String editFlag,
String xtraParams) throws RemoteException, ITMException {
System.out.println("@@@@@@@ itemChanged called"); System.out.println("@@@@@@@ itemChanged called");
StringBuffer valueXmlString = new StringBuffer(); StringBuffer valueXmlString = new StringBuffer();
...@@ -260,186 +277,129 @@ public class LoanPartyBank extends ValidatorEJB implements LoanPartyBankLocal, L ...@@ -260,186 +277,129 @@ public class LoanPartyBank extends ValidatorEJB implements LoanPartyBankLocal, L
Node parentNode = null; Node parentNode = null;
Node childNode = null; Node childNode = null;
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null,pstmt1 = null; PreparedStatement pstmt = null, pstmt1 = null;
ResultSet rs = null,rs1 = null ; ResultSet rs = null, rs1 = null;
String childNodeName = null; String childNodeName = null;
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
String sql="",sql1=""; String sql = "", sql1 = "";
int currentFormNo =0; int currentFormNo = 0;
String columnValue="",siteCode="",salesPerson="",chgTerm="",chgUser="",siteCodePay="",firstname="",lastname=""; String columnValue = "", siteCode = "", salesPerson = "";
String banknameben="",add1="",add2="",add3="",city="",pin="",statecode="",acctcode="",swiftcode="",countcode=""; String chgTerm = "", chgUser = "", siteCodePay = "", firstname = "", lastname = "";
String banknameinter="",add1int="",add2int="",add3int="",cityint="",pinint="",statecodeint="",countcodeint="",swiftcodeint=""; String banknameben = "", add1 = "", add2 = "", add3 = "", city = "", pin = "";
String siteCodePayDescr="",salesPersonName="",PartyCode="",PartyName="",currcode=""; String statecode = "", acctcode = "", swiftcode = "", countcode = "";
int ctr=0; String banknameinter = "", add1int = "", add2int = "", add3int = "";
String cityint = "", pinint = "", statecodeint = "", countcodeint = "";
try String siteCodePayDescr = "", salesPersonName = "", PartyCode = "";
{ String PartyName = "", currcode = "", swiftcodeint = "";
int ctr = 0;
try {
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false); connDriver = null;
connDriver=null; if (objContext != null && objContext.trim().length() > 0) {
if(objContext != null && objContext.trim().length()>0)
{
currentFormNo = Integer.parseInt(objContext.trim()); currentFormNo = Integer.parseInt(objContext.trim());
} }
valueXmlString = new StringBuffer("<?xml version=\"1.0\"?><Root><header><editFlag>"); valueXmlString = new StringBuffer(
"<?xml version=\"1.0\"?><Root><header><editFlag>");
valueXmlString.append(editFlag).append("</editFlag></header>"); valueXmlString.append(editFlag).append("</editFlag></header>");
chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "chg_term"); chgTerm = genericUtility.getValueFromXTRA_PARAMS(xtraParams,
chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "chg_user"); "chg_term");
System.out.println("-------- currentFormNo : "+currentFormNo); chgUser = genericUtility.getValueFromXTRA_PARAMS(xtraParams,
switch(currentFormNo) "chg_user");
{ System.out.println("-------- currentFormNo : " + currentFormNo);
switch (currentFormNo) {
case 1 :
case 1:
parentNodeList = dom.getElementsByTagName("Detail1"); parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
ctr = 0; ctr = 0;
valueXmlString.append("<Detail1>"); valueXmlString.append("<Detail1>");
int childNodeListLength = childNodeList.getLength(); int childNodeListLength = childNodeList.getLength();
do
{ if (currentColumn.trim().equalsIgnoreCase("itm_default")) {
childNode = childNodeList.item(ctr); System.out .println("------------@@@@@@@@in itm_default---");
childNodeName = childNode.getNodeName();
if(childNodeName.equals(currentColumn))
{
if (childNode.getFirstChild()!= null)
{
columnValue = childNode.getFirstChild().getNodeValue().trim();
}
}
ctr++;
}
while(ctr < childNodeListLength && !childNodeName.equals(currentColumn));
System.out.println("[" + currentColumn + "] ==> '" + columnValue + "'");
if( currentColumn.trim().equalsIgnoreCase( "itm_default" ) )
{
System.out.println("------------@@@@@@@@in itm_default@@@@@@@@@---------");
Calendar currentDate = Calendar.getInstance(); Calendar currentDate = Calendar.getInstance();
SimpleDateFormat simpleDateFormatObj = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat simpleDateFormatObj = new SimpleDateFormat(
String systemDate = simpleDateFormatObj.format(currentDate.getTime()); genericUtility.getApplDateFormat());
String systemDate = simpleDateFormatObj.format(currentDate
.getTime());
System.out.println("Now the date is :=> " + systemDate); System.out.println("Now the date is :=> " + systemDate);
valueXmlString.append("<site_code>").append("").append("</site_code>"); valueXmlString.append("<site_code>").append("")
valueXmlString.append("<chg_date><![CDATA[").append(systemDate).append("]]></chg_date>\r\n"); .append("</site_code>");
valueXmlString.append("<chg_term><![CDATA[").append(chgTerm).append("]]></chg_term>"); valueXmlString.append("<chg_date><![CDATA[")
valueXmlString.append("<chg_user><![CDATA[").append(chgUser).append("]]></chg_user>"); .append(systemDate).append("]]></chg_date>\r\n");
valueXmlString.append("<chg_term><![CDATA[")
.append(chgTerm).append("]]></chg_term>");
valueXmlString.append("<chg_user><![CDATA[")
.append(chgUser).append("]]></chg_user>");
} }
if ((currentColumn.trim().equalsIgnoreCase("party_code"))) {
if((currentColumn.trim().equalsIgnoreCase("party_code"))) String partyCode = genericUtility.getColumnValue(
{ "party_code", dom);
String partyCode = genericUtility.getColumnValue("party_code",dom); System.out.println("party_code ------>> " + partyCode);
System.out.println("party_code ------>> "+partyCode); if (partyCode != null && partyCode.trim().length() > 0) {
if(partyCode != null && partyCode.trim().length()>0 ) sql = " SELECT PARTY_CODE,PARTY_NAME FROM loanparty WHERE "
{ +" party_code = ? ";
sql = "SELECT PARTY_CODE,PARTY_NAME FROM loanparty WHERE party_code = ? "; pstmt = conn.prepareStatement(sql);
pstmt= conn.prepareStatement(sql); pstmt.setString(1, partyCode);
pstmt.setString(1,partyCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
while(rs.next()) while (rs.next()) {
{ PartyName = rs.getString(1) == null ? "" : rs
PartyName = rs.getString(1) == null ? "" : rs.getString(1); .getString(1);
PartyCode = rs.getString(2) == null ? "" : rs.getString(2); PartyCode = rs.getString(2) == null ? "" : rs
.getString(2);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append("<party_name>").append("<![CDATA[" + PartyName +" "+ PartyCode + "]]>").append("</party_name>"); valueXmlString
// valueXmlString.append("<last_name>").append("<![CDATA[" + lastname + "]]>").append("</last_name>"); .append("<party_name>")
.append("<![CDATA[" + PartyName + " "
+ PartyCode + "]]>")
} .append("</party_name>");
else
{ } else {
valueXmlString.append("<party_name>").append("<![CDATA[]]>").append("</party_name>"); valueXmlString.append("<party_name>")
//valueXmlString.append("<last_name>").append("<![CDATA[]]>").append("</last_name>"); .append("<![CDATA[]]>").append("</party_name>");
} }
} }
valueXmlString.append("</Detail1>"); valueXmlString.append("</Detail1>");
}// end switch }// end switch
valueXmlString.append("</Root>"); valueXmlString.append("</Root>");
} } catch (Exception e) {
catch(Exception e)
{
e.printStackTrace(); e.printStackTrace();
System.out.println("Exception ::"+e.getMessage()); System.out.println("Exception ::" + e.getMessage());
throw new ITMException(e); throw new ITMException(e);
} } finally {
finally try {
{ if (conn != null) {
try if (rs != null) {
{
if(conn!=null)
{
if(rs != null)
{
rs.close(); rs.close();
rs = null; rs = null;
} }
if(pstmt != null) if (pstmt != null) {
{
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
conn.close(); conn.close();
conn = null; conn = null;
} }
} catch (Exception d) {
d.printStackTrace();
System.out.println("Exception ..> " + d.getMessage());
} }
catch(Exception d)
{
d.printStackTrace();
}
} }
return valueXmlString.toString(); return valueXmlString.toString();
} }
///CHANGES FOR ITMCHANGE
public String wfValData() throws RemoteException, ITMException {
return "";
}
public String wfValData(Document dom, Document dom1, String objContext, String editFlag, String xtraParams) throws RemoteException, ITMException {
return "";
}
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag) throws RemoteException, ITMException {
return "";
}
public String itemChanged() throws RemoteException, ITMException {
return "";
}
public String itemChanged(Document dom, Document dom1, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException {
return "";
}
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag) throws RemoteException, ITMException {
return "";
}
} }
\ No newline at end of file
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