Commit 396e016e authored by btambade's avatar btambade

Clean - Removed unwanted code

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@205096 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 70891b96
package ibase.dashboard.metadata.servlet;
import ibase.dashboard.metadata.ejb.DashboardParentEJB;
import ibase.dashboard.metadata.ejb.DashboardParentEJBRemote;
import ibase.system.config.AppConnectParm;
import ibase.utility.UserInfoBean;
import ibase.webitm.bean.PopUpBean;
import ibase.webitm.utility.ITMException;
import java.io.IOException;
import java.io.OutputStream;
import java.util.StringTokenizer;
import javax.naming.InitialContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import ibase.dashboard.metadata.ejb.DashboardParentEJB;
import ibase.utility.UserInfoBean;
import ibase.webitm.bean.PopUpBean;
import ibase.webitm.utility.ITMException;
public class DashboardFilterServlet extends HttpServlet
{
private static final long serialVersionUID = 1L;
......@@ -35,7 +34,6 @@ public class DashboardFilterServlet extends HttpServlet
StringTokenizer st = null;
HttpSession session = request.getSession(true);
String transDB ="";
//DashboardParentEJBRemote dashboardParentEJBRemote = null;
DashboardParentEJB dashboardParentEJBRemote = null;
try
{
......@@ -44,19 +42,12 @@ public class DashboardFilterServlet extends HttpServlet
fieldName = fieldName.trim();
objName = request.getParameter("OBJ_NAME");
transDB = userInfo.getTransDB();
//keyString = request.getParameter("KEYSTRING");
//Add new code By birendra on dated 23/6/2015
InitialContext ctx = getInitialContext();
//dashboardParentEJBRemote = (DashboardParentEJBRemote)ctx.lookup("ibase/DashboardParentEJB/remote");
dashboardParentEJBRemote = new DashboardParentEJB();
keyString = dashboardParentEJBRemote.getKeyString("W_" + objName, fieldName, transDB);
//Add new code By Birendra on dated 23/6/2015
int pos = fieldName.lastIndexOf(".");
fieldName = fieldName.substring(pos + 1, fieldName.length());
//Add new code By Birendra Pandey on dated 27/06/2014
if (objName != null && (objName != (String) session.getAttribute("OBJ_NAME")))
{
......@@ -123,7 +114,7 @@ public class DashboardFilterServlet extends HttpServlet
outputStreampop.close();
} catch (Exception e)
{
System.out.println("Exception : SalesPerfrmncFilterServlet :doPost(HttpServletRequest request, HttpServletResponse response) :" + e.getMessage());
System.out.println("Exception : DashboardFilterServlet :doPost(HttpServletRequest request, HttpServletResponse response) :" + e.getMessage());
try
{
throw new ITMException(e);
......@@ -133,93 +124,4 @@ public class DashboardFilterServlet extends HttpServlet
}
}
}
//Add new method for get sql input string from pophel table by Birendra Pandey on dated:
private InitialContext getInitialContext()throws ITMException
{
InitialContext ctx = null;
try
{
AppConnectParm appConnect = new AppConnectParm();
ctx = new InitialContext(appConnect.getProperty());
}
catch(ITMException itme)
{
System.out.println("ITMException :RequestHandlerServlet :getInitialContext :==>");
throw itme;
}
catch(Exception e)
{
System.out.println("Exception :RequestHandlerServlet :getInitialContext :==>");
throw new ITMException(e);
}
return ctx;
}
//
/*public String getKeyString(String modName, String fieldName, UserInfoBean userInfo)
{
ConnDriver connDriver = new ConnDriver();
Statement statement = null;
ResultSet resultSet = null;
String keyString = "";
Connection connection = null;
String transDB = "";
try
{
transDB = userInfo.getTransDB();
dashboardUtility = new DashboardUtility();
if (transDB != null && !"null".equalsIgnoreCase(transDB.trim()) && transDB.trim().length() > 0)
{
connection = connDriver.getConnectDB(transDB);
}
else
{
connection = connDriver.getConnectDB("DriverITM");
}
statement = connection.createStatement();
String query = "SELECT SQL_INPUT FROM POPHELP WHERE MOD_NAME ='" + modName + "' AND FIELD_NAME = '" + fieldName.toUpperCase() + "'";
System.out.println("modName is ="+modName+ " fieldName is= "+fieldName + " and query " +query);
resultSet = statement.executeQuery(query);
if (resultSet.next())
{
keyString = dashboardUtility.checkNull(resultSet.getString("SQL_INPUT"));
}
} catch (Exception e)
{
e.printStackTrace();
} finally
{
try
{
resultSet.close();
resultSet = null;
statement.close();
statement = null;
connection.close();
connection = null;
} catch (Exception ex)
{
System.out.println("Finally Exception : DashboardFilterServlet: getKeyString()" + ex.getMessage());
ex.printStackTrace();
}
}
return keyString;
}
*/
//end the getKeyString method
}
\ 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