FilterTests_FilterChain_ApiActionFilter_filter2.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:portals-pluto 作者:
@Override
public void doFilter(ActionRequest portletReq, ActionResponse portletResp, FilterChain chain)
    throws IOException, PortletException {

  StringWriter writer = new StringWriter();

  // now do the tests and write output

  JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();

  // Create result objects for the tests

  /* TestCase: V2FilterTests_FilterChain_ApiActionFilter_invokeActionFilter */
  /* Details: "Invoking doFilter(ActionRequest, ActionResponse): causes */
  /* next filter to be invoked" */
  TestResult tr0 =
      tcd.getTestResultFailed(V2FILTERTESTS_FILTERCHAIN_APIACTIONFILTER_INVOKEACTIONFILTER);
  if (FilterTests_FilterChain_ApiActionFilter_filter.tr0_success) {
    tr0.setTcSuccess(true);
  }
  tr0.writeTo(writer);

  /* TestCase: V2FilterTests_FilterChain_ApiActionFilter_invokeActionFilter2 */
  /* Details: "Invoking doFilter(ActionRequest, ActionResponse): causes */
  /* portlet action method to be invoked" */
  FilterTests_FilterChain_ApiActionFilter_filter2.tr1_success = true;

  PortletSession ps = portletReq.getPortletSession();
  String msg =
      (String) ps.getAttribute(RESULT_ATTR_PREFIX + "FilterTests_FilterChain_ApiActionFilter",
          APPLICATION_SCOPE);
  portletReq.getPortletSession().setAttribute(
      Constants.RESULT_ATTR_PREFIX + "FilterTests_FilterChain_ApiActionFilter",
      msg + writer.toString(), APPLICATION_SCOPE);

  chain.doFilter(portletReq, portletResp);

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号