Commit 5a025e13 authored by kpandey's avatar kpandey

Removed saveExploreReport and getExploreReport function

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@196134 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7c704047
......@@ -109,93 +109,6 @@ public class DashboardService {
System.out.println("dashboard service final data "+dashboardMetadata.toString());
return dashboardMetadata.toString();
}
//Added By Saitej D on [26 Dec 2018] To [Save Explore Report] START
@POST
@Path("/saveExploreReport/{reportName}")
@Produces(MediaType.APPLICATION_JSON)
@Consumes({ "application/json" })
public Response saveExploreReport( @PathParam("reportName") String reportName, String reportConfig ) throws Exception
{
System.out.println("In saveExploreReport ["+reportName+"] reportConfig"+reportConfig);
JSONObject respJsonObject = new JSONObject();
UserInfoBean userInfo = getUserInfo();
try
{
if( userInfo != null )
{
DashboardUtil util = new DashboardUtil();
String loginCode = userInfo.getLoginCode();
util.saveExploreReport(loginCode, reportName, reportConfig);
}
}
catch (Exception e)
{
e.printStackTrace();
respJsonObject.put("result", "failure" );
}
return Response.status(200).entity( respJsonObject.toString() ).build();
}
@GET
@Path("/getExploreReport/{reportName}")
@Produces(MediaType.APPLICATION_JSON)
@Consumes({ "application/json" })
public Response getExploreReport( @PathParam("reportName") String reportName ) throws Exception
{
System.out.println("In getExploreReport ["+reportName+"]");
JSONObject respJsonObject = new JSONObject();
UserInfoBean userInfo = getUserInfo();
try
{
if( userInfo != null )
{
DashboardUtil util = new DashboardUtil();
String loginCode = userInfo.getLoginCode();
JSONObject reportConfig = util.getExploreReport(loginCode, reportName);
if(reportConfig != null)
{
respJsonObject.put("result", "success");
respJsonObject.put("report", reportConfig);
}
else
{
respJsonObject.put("result", "failure" );
}
}
}
catch (Exception e)
{
e.printStackTrace();
respJsonObject.put("result", "failure" );
}
return Response.status(200).entity( respJsonObject.toString() ).build();
}
private UserInfoBean getUserInfo()
{
UserInfoBean userInfo = null;
HttpSession session = request.getSession();
Object userObj = session.getAttribute( "USER_INFO" );
if(userObj != null)
{
try
{
userInfo = new UserInfoBean( userObj.toString() );
}
catch (BaseException e)
{
e.printStackTrace();
}
}
return userInfo;
}
//Added By Saitej D on [26 Dec 2018] To [Save Explore Report] END
}
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