// ------------------------------------------------------------------------- @GET public String getHTML() { SecurityHistoryRequest request = new SecurityHistoryRequest(data().getSecurity().getUniqueId()); SecurityHistoryResult result = data().getSecurityMaster().history(request); FlexiBean out = createRootData(); out.put("versionsResult", result); out.put("versions", result.getSecurities()); return getFreemarker().build(HTML_DIR + "securityversions.ftl", out); }
@GET @Produces(MediaType.APPLICATION_JSON) public Response getJSON( @QueryParam("pgIdx") Integer pgIdx, @QueryParam("pgNum") Integer pgNum, @QueryParam("pgSze") Integer pgSze) { PagingRequest pr = buildPagingRequest(pgIdx, pgNum, pgSze); SecurityHistoryRequest request = new SecurityHistoryRequest(data().getSecurity().getUniqueId()); request.setPagingRequest(pr); SecurityHistoryResult result = data().getSecurityMaster().history(request); FlexiBean out = createRootData(); out.put("versionsResult", result); out.put("versions", result.getSecurities()); out.put("paging", new WebPaging(result.getPaging(), data().getUriInfo())); String json = getFreemarker().build(JSON_DIR + "securityversions.ftl", out); return Response.ok(json).build(); }