FilterTests_ResourceFilter_ApiResourceFilter_filter2.java 文件源码

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

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

  PrintWriter writer = portletResp.getWriter();

  JSR286ApiTestCaseDetails tcd = new JSR286ApiTestCaseDetails();

  /* TestCase: V2FilterTests_ResourceFilter_ApiResourceFilter_canBeConfigured2 */
  /* Details: "Multiple ResourceFilter classes can be configured in the */
  /* portlet descriptor" */
  TestResult tr1 =
      tcd.getTestResultFailed(V2FILTERTESTS_RESOURCEFILTER_APIRESOURCEFILTER_CANBECONFIGURED2);
  tr1.setTcSuccess(true);
  tr1.writeTo(writer);

  /* TestCase: V2FilterTests_ResourceFilter_ApiResourceFilter_doFilterIsCalled */
  /* Details: "The doFilter(ResourceRequest, ResourceResponse, */
  /* FilterChain): method is called before the processResource method */
  /* for the portlet" */
  tr2_success = true;

  /* TestCase: V2FilterTests_ResourceFilter_ApiResourceFilter_doFilterProcessResource1 */
  /* Details: "After the doFilter(ResourceRequest, ResourceResponse, */
  /* FilterChain): method has sucessfully completed and invokes the */
  /* next filter, the processResourceMethod is called" */
  tr3_success = true;

  /* TestCase: V2FilterTests_ResourceFilter_ApiResourceFilter_doFilterProcessResource2 */
  /* Details: "After the doFilter(ResourceRequest, ResourceResponse, */
  /* FilterChain): method has sucessfully completed and invokes the */
  /* next filter, the next filter in the chain is called if multiple */
  /* filters are defined" */
  TestResult tr4 = tcd.getTestResultFailed(
      V2FILTERTESTS_RESOURCEFILTER_APIRESOURCEFILTER_DOFILTERPROCESSRESOURCE2);
  if (FilterTests_ResourceFilter_ApiResourceFilter_filter.tr4_success) {
    tr4.setTcSuccess(true);
  }
  tr4.writeTo(writer);

  chain.doFilter(portletReq, portletResp);

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号