Commit 741f9d3b authored by manohar's avatar manohar

This commit was generated by cvs2svn to compensate for changes in r111,

which included commits to RCS files with non-trunk default branches.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91176 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 95c988c5
package ibase.webitm.ejb.dis;
import ibase.system.config.ConnDriver;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.ITMDBAccessEJB;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.GregorianCalendar;
//import javax.ejb.CreateException;
//import javax.ejb.SessionBean;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import javax.ejb.*;
import javax.ejb.Stateless; // added for ejb3
@Stateless // added for ejb3
public class BenefitDisItm extends ValidatorEJB implements BenefitDisItmLocal,BenefitDisItmRemote //SessionBean
{
/*public void ejbCreate() throws RemoteException, CreateException
{
//return "";
}
public void ejbRemove()
{
}
public void ejbActivate()
{
}
public void ejbPassivate()
{
}
public String wfValData() throws RemoteException,ITMException
{
return "";
}
*/
public String itemChanged() throws RemoteException,ITMException
{
System.out.println("In item change ,.............");
return "";
}
public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException
{
Document dom = null;
Document dom1 = null;
Document dom2 = null;
String valueXmlString = "";
try
{
dom = parseString(xmlString);
dom1 = parseString(xmlString1);
if (xmlString2.trim().length() > 0 )
{
dom2 = parseString(xmlString2);
}
valueXmlString = itemChanged(dom,dom1,dom2,objContext,currentColumn,editFlag,xtraParams);
}
catch(Exception e)
{
}
return valueXmlString;
}
public String itemChanged(Document dom, Document dom1,Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException
{
StringBuffer valueXmlString = new StringBuffer();
NodeList parentNodeList = null;
NodeList childNodeList = null;
Node parentNode = null;
Node childNode = null;
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null ;
int ctr = 0;
String childNodeName = null;
String columnValue = null,confirmed="";
String Col_name = "";
int currentFormNo = 0 ,cnt = 0;
String tranId="",deptCode = "", roleCodePrfmer = "", siteCode = "", empCode = "";
String sql = "",descr = "",empFName = "", empMName = "", empLName = "",roleCodeAprv="";
ConnDriver connDriver = new ConnDriver();
Timestamp tranDate =null;
String disptNo ="";
Timestamp disptDate =null;
String InvcNo ="";
Timestamp InvcDate = null;
String exciseRef ="";
Timestamp exciseRefDate =null;
Timestamp exciseDateNew =null;
String benefitType = "";
String var =".00000000" ;
try
{
GenericUtility genericUtility = GenericUtility.getInstance();
conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false);
connDriver=null;
if(objContext != null && objContext.trim().length()>0)
{
currentFormNo = Integer.parseInt(objContext);
}
valueXmlString = new StringBuffer("<?xml version=\"1.0\"?><Root><header><editFlag>");
valueXmlString.append(editFlag).append("</editFlag></header>");
switch(currentFormNo)
{
case 1 :
parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
ctr = 0;
valueXmlString.append("<Detail1>");
int childNodeListLength = childNodeList.getLength();
do
{
childNode = childNodeList.item(ctr);
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("xtraParams>>>>>>>>>>>>>"+xtraParams);
if(currentColumn.trim().equalsIgnoreCase( "itm_default" ) )
{
benefitType =genericUtility.getColumnValue("benefit_type",dom);
benefitType = benefitType == null ?"":benefitType;
if(benefitType.trim().equalsIgnoreCase("AL"))
{
valueXmlString.append("<exchange_rate>").append("<![CDATA[.000000]]>").append("</exchange_rate>");
}
else
{
valueXmlString.append("<exchange_rate protect =\"1\">").append("<![CDATA[1.0000]]>").append("</exchange_rate>");
}
}//end of itm default
}
valueXmlString.append("</Detail1>");
valueXmlString.append("</Root>");
}//END OF TRY
catch(Exception e)
{
e.printStackTrace();
System.out.println("Exception ::"+e.getMessage());
throw new ITMException(e);
}
finally
{
try
{
System.out.println("Closing Connection.........");
conn.close();
conn = null;
}catch(Exception e){}
}
System.out.println("valueXmlString>>>>>>>>>>>"+valueXmlString);
return valueXmlString.toString();
}//END OF ITEMCHANGE
}// END OF MAIN CLASS
\ No newline at end of file
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
import org.w3c.dom.*;
//import javax.ejb.EJBObject;
import java.sql.*;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import javax.ejb.Local; // added for ejb3
@Local // added for ejb3
public interface BenefitDisItmLocal extends ValidatorLocal//,EJBObject
{
public String wfValData() throws RemoteException,ITMException;
public String wfValData(String xmlString, String xmlString1,String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(Document dom, Document dom1,Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged() throws RemoteException,ITMException;
}
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
import org.w3c.dom.*;
//import javax.ejb.EJBObject;
import java.sql.*;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import javax.ejb.Remote; // added for ejb3
@Remote // added for ejb3
public interface BenefitDisItmRemote extends ValidatorRemote //,EJBObject
{
public String wfValData() throws RemoteException,ITMException;
public String wfValData(String xmlString, String xmlString1,String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(Document dom, Document dom1,Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged() throws RemoteException,ITMException;
}
This diff is collapsed.
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
//import javax.ejb.EJBObject;
import org.w3c.dom.*;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import javax.xml.parsers.*;
import ibase.webitm.ejb.ProcessLocal;
import ibase.webitm.utility.ITMException;
import javax.ejb.Local; // added for ejb3
@Local // added for ejb3
public interface BenefitDisPrcLocal extends ProcessLocal //,EJBObject
{
public String process() throws RemoteException,ITMException;
public String process(String string1, String string2, String windowName, String xtraParams) throws RemoteException,ITMException;
}
\ No newline at end of file
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
//import javax.ejb.EJBObject;
import org.w3c.dom.*;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import javax.xml.parsers.*;
import ibase.webitm.ejb.ProcessRemote;
import ibase.webitm.utility.ITMException;
import javax.ejb.Remote; // added for ejb3
@Remote // added for ejb3
public interface BenefitDisPrcRemote extends ProcessRemote //,EJBObject
{
public String process() throws RemoteException,ITMException;
public String process(String string1, String string2, String windowName, String xtraParams) throws RemoteException,ITMException;
}
\ No newline at end of file
package ibase.webitm.ejb.dis;
import ibase.system.config.ConnDriver;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.ITMDBAccessEJB;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.GregorianCalendar;
//import javax.ejb.CreateException;
//import javax.ejb.SessionBean;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import javax.ejb.Stateless; // added for ejb3
@Stateless // added for ejb3
public class BenefitItm extends ValidatorEJB implements BenefitItmLocal,BenefitItmRemote //SessionBean
{
/*public void ejbCreate() throws RemoteException, CreateException
{
//return "";
}
public void ejbRemove()
{
}
public void ejbActivate()
{
}
public void ejbPassivate()
{
}*/
public String wfValData() throws RemoteException,ITMException
{
return "";
}
public String itemChanged() throws RemoteException,ITMException
{
System.out.println("In item change ,.............");
return "";
}
public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException
{
Document dom = null;
Document dom1 = null;
Document dom2 = null;
String valueXmlString = "";
try
{
dom = parseString(xmlString);
dom1 = parseString(xmlString1);
if (xmlString2.trim().length() > 0 )
{
dom2 = parseString(xmlString2);
}
valueXmlString = itemChanged(dom,dom1,dom2,objContext,currentColumn,editFlag,xtraParams);
}
catch(Exception e)
{
}
return valueXmlString;
}
public String itemChanged(Document dom, Document dom1,Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException
{
StringBuffer valueXmlString = new StringBuffer();
NodeList parentNodeList = null;
NodeList childNodeList = null;
Node parentNode = null;
Node childNode = null;
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null ;
int ctr = 0;
String childNodeName = null;
String columnValue = null,confirmed="";
String Col_name = "";
int currentFormNo = 0 ,cnt = 0;
String tranId="",deptCode = "", roleCodePrfmer = "", siteCode = "", empCode = "";
String sql = "",descr = "",empFName = "", empMName = "", empLName = "",roleCodeAprv="";
ConnDriver connDriver = new ConnDriver();
Timestamp tranDate =null;
String disptNo ="";
Timestamp disptDate =null;
String InvcNo ="";
Timestamp InvcDate = null;
String exciseRef ="";
Timestamp exciseRefDate =null;
Timestamp exciseDateNew =null;
String benefitType = "";
String var =".00000000" ;
try
{
GenericUtility genericUtility = GenericUtility.getInstance();
conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false);
connDriver=null;
if(objContext != null && objContext.trim().length()>0)
{
currentFormNo = Integer.parseInt(objContext);
}
valueXmlString = new StringBuffer("<?xml version=\"1.0\"?><Root><header><editFlag>");
valueXmlString.append(editFlag).append("</editFlag></header>");
switch(currentFormNo)
{
case 1 :
parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
ctr = 0;
valueXmlString.append("<Detail1>");
int childNodeListLength = childNodeList.getLength();
do
{
childNode = childNodeList.item(ctr);
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("xtraParams>>>>>>>>>>>>>"+xtraParams);
if(currentColumn.trim().equalsIgnoreCase( "itm_default" ) )
{
benefitType =genericUtility.getColumnValue("benefit_type",dom);
benefitType = benefitType == null ?"":benefitType;
if(benefitType.trim().equalsIgnoreCase("AL"))
{
//valueXmlString.append("<exchange_rate>").append("<![CDATA[.000000]]>").append("</exchange_rate>");
valueXmlString.append("<exchange_rate protect =\"0\">").append("<![CDATA[ .000000]]>").append("</exchange_rate>"); // initial
}
else
{
valueXmlString.append("<exchange_rate protect =\"1\">").append("<![CDATA[1.0000]]>").append("</exchange_rate>"); // initial
//valueXmlString.append("<exchange_rate protect =\"1\">").append("<![CDATA[1.0000]]>").append("</exchange_rate>");
}
}//end of itm default
}
valueXmlString.append("</Detail1>");
valueXmlString.append("</Root>");
}//END OF TRY
catch(Exception e)
{
e.printStackTrace();
System.out.println("Exception ::"+e.getMessage());
throw new ITMException(e);
}
finally
{
try
{
System.out.println("Closing Connection.........");
conn.close();
conn = null;
}catch(Exception e){}
}
System.out.println("valueXmlString>>>>>>>>>>>"+valueXmlString);
return valueXmlString.toString();
}//END OF ITEMCHANGE
}// END OF MAIN CLASS
\ No newline at end of file
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
import org.w3c.dom.*;
//import javax.ejb.EJBObject;
import java.sql.*;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import javax.ejb.Local; // added for ejb3
@Local // added for ejb3
public interface BenefitItmLocal extends ValidatorLocal //,EJBObject
{
public String wfValData() throws RemoteException,ITMException;
public String wfValData(String xmlString, String xmlString1,String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(Document dom, Document dom1,Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged() throws RemoteException,ITMException;
}
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
import org.w3c.dom.*;
//import javax.ejb.EJBObject;
import java.sql.*;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.ITMException;
import javax.ejb.Remote; // added for ejb3
@Remote // added for ejb3
public interface BenefitItmRemote extends ValidatorRemote //,EJBObject
{
public String wfValData() throws RemoteException,ITMException;
public String wfValData(String xmlString, String xmlString1,String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(Document dom, Document dom1,Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged() throws RemoteException,ITMException;
}
This diff is collapsed.
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
//import javax.ejb.EJBObject;
import org.w3c.dom.*;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import javax.xml.parsers.*;
import ibase.webitm.ejb.ProcessLocal;
import ibase.webitm.utility.ITMException;
import javax.ejb.Local; // added for ejb3
@Local // added for ejb3
public interface BenefitPrcLocal extends ProcessLocal //,EJBObject
{
public String process() throws RemoteException,ITMException;
public String process(String string1, String string2, String windowName, String xtraParams) throws RemoteException,ITMException;
}
\ No newline at end of file
package ibase.webitm.ejb.dis;
import java.rmi.RemoteException;
//import javax.ejb.EJBObject;
import org.w3c.dom.*;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import javax.xml.parsers.*;
import ibase.webitm.ejb.ProcessRemote;
import ibase.webitm.utility.ITMException;
import javax.ejb.Remote; // added for ejb3
@Remote // added for ejb3
public interface BenefitPrcRemote extends ProcessRemote //,EJBObject
{
public String process() throws RemoteException,ITMException;
public String process(String string1, String string2, String windowName, String xtraParams) throws RemoteException,ITMException;
}
\ 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