01: // Copyright © 2004-2007 ASERT. Released under the Canoo Webtest license.
02: package com.canoo.webtest.steps;
03:
04: import com.canoo.webtest.engine.ContextHelper;
05: import com.canoo.webtest.interfaces.IContentFilter;
06:
07: /**
08: * Helper class for filters.
09: * @author Paul King
10: * @author Marc Guillemot
11: */
12: public abstract class AbstractFilter extends Step implements
13: IContentFilter {
14: private static final String DUMMY_FILTER_URLSTR = "http://dummyFilterUrl";
15:
16: /**
17: * Place the content as the current response
18: * @param text
19: * @param contentType
20: * @throws Exception
21: */
22: protected void defineAsCurrentResponse(final String text,
23: final String contentType) throws Exception {
24: ContextHelper.defineAsCurrentResponse(getContext(), text,
25: contentType, DUMMY_FILTER_URLSTR);
26: }
27: }
|