@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_PortletFilter_ApiActionFilter_initAction1 */
/* Details: "The init(FilterConfig): method is called when an */
/* ActionFilter is configured" */
TestResult tr0 =
tcd.getTestResultFailed(V2FILTERTESTS_PORTLETFILTER_APIACTIONFILTER_INITACTION1);
if (initCalled == true) {
tr0.setTcSuccess(true);
}
tr0.writeTo(writer);
/* TestCase: V2FilterTests_PortletFilter_ApiActionFilter_initAction2 */
/* Details: "The init(FilterConfig): method for an ActionFilter is */
/* passed a FilterConfig object" */
TestResult tr1 =
tcd.getTestResultFailed(V2FILTERTESTS_PORTLETFILTER_APIACTIONFILTER_INITACTION2);
if (this.filterConfig != null) {
tr1.setTcSuccess(true);
}
tr1.writeTo(writer);
portletReq.getPortletSession().setAttribute(
Constants.RESULT_ATTR_PREFIX + "FilterTests_PortletFilter_ApiActionFilter",
writer.toString(), APPLICATION_SCOPE);
chain.doFilter(portletReq, portletResp);
}
FilterTests_PortletFilter_ApiActionFilter_filter.java 文件源码
java
阅读 15
收藏 0
点赞 0
评论 0
项目:portals-pluto
作者:
评论列表
文章目录