Commit 6c68668c authored by kshinde's avatar kshinde

Added ItemChange component for Reverse Charge Invoice Gp no Generation[F17DSUN004]


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@106403 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 49de8715
package ibase.webitm.ejb.gstclient;
import java.rmi.RemoteException;
import java.text.*;
import java.sql.*;
import org.w3c.dom.*;
import javax.ejb.*;
import ibase.system.config.*;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.ITMDBAccessEJB;
//import ibase.webitm.ejb.ProcessEJB;
import ibase.webitm.utility.*;
import javax.ejb.Stateless;
@Stateless
public class ReverseChargeInvoiceGpGenIC extends ValidatorEJB implements ReverseChargeInvoiceGpGenICRemote,ReverseChargeInvoiceGpGenICLocal
{
public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException
{
String resultString = "";
Document dom = null,dom1 = null,dom2 = null;
E12GenericUtility genericUtility = new E12GenericUtility();
try{
if(xmlString != null){
dom = genericUtility.parseString(xmlString);
}
if(xmlString1 != null){
dom1 = genericUtility.parseString(xmlString1);
}
if(xmlString2 != null){
dom2 = genericUtility.parseString(xmlString2);
}
resultString = itemChanged(dom,dom1,dom2,objContext,currentColumn,editFlag,xtraParams);
}
catch(ITMException e)
{
System.out.println("ITMException "+e);
e.printStackTrace();
throw e;
}
catch(Exception e)
{
System.out.println("Exception in itemchange "+e);
e.printStackTrace();
throw new ITMException(e);
}
return resultString;
}
public String itemChanged(Document dom,Document dom1,Document dom2,String objContext, String currentColumn, String editFlag, String xtraParams) throws ITMException
{
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql="";
ConnDriver connDriver = new ConnDriver();
String siteCode="";
StringBuffer valueXmlString;
E12GenericUtility genericUtility = new E12GenericUtility();
try
{
conn=getConnection();
siteCode=genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSite");
System.out.println("SiteCode["+siteCode+"]");
valueXmlString = new StringBuffer("<?xml version=\"1.0\"?><Root><header><editFlag>");
valueXmlString.append(editFlag).append("</editFlag></header>");
valueXmlString.append("<Detail1>");
if(currentColumn.equalsIgnoreCase("itm_default"))
{
valueXmlString.append("<site_code><![CDATA[" + siteCode+ "]]></site_code>");
}
valueXmlString.append("</Detail1>");
valueXmlString.append("</Root>");
}
catch(Exception e)
{
System.out.println(":::" + getClass().getSimpleName() + "::"+ e.getMessage());
throw new ITMException(e);
}
finally
{
try
{
if(conn != null)
{
conn.close();
conn = null;
}
}catch(Exception e2){}
}
return valueXmlString.toString();
}
}
package ibase.webitm.ejb.gstclient;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import javax.ejb.Local;
import org.w3c.dom.Document;
@Local
public interface ReverseChargeInvoiceGpGenICLocal extends ValidatorLocal
{
public String itemChanged(String xmlString, String xmlString1, String xmlString2, 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 ITMException ;
}
package ibase.webitm.ejb.gstclient;
import ibase.webitm.ejb.ValidatorRemote;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import javax.ejb.Remote;
import org.w3c.dom.Document;
@Remote
public interface ReverseChargeInvoiceGpGenICRemote extends ValidatorRemote
{
public String itemChanged(String xmlString, String xmlString1, String xmlString2, 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 ITMException;
}
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