01: /*
02:
03: This software is OSI Certified Open Source Software.
04: OSI Certified is a certification mark of the Open Source Initiative.
05:
06: The license (Mozilla version 1.0) can be read at the MMBase site.
07: See http://www.MMBase.org/license
08:
09: */
10: package org.mmbase.framework;
11:
12: import org.mmbase.util.functions.Parameter;
13: import org.mmbase.util.functions.Parameters;
14:
15: /**
16: * A Processor handles interaction of a {@link Block}. It is like a {@link Renderer}, but it renders
17: * nothing, it only can change the state of the block, and hence influence the renderers.
18: *
19: * The other difference is that there be several {@link Block}s in a request, which are all
20: * rendered, but at most one of them has its Processor executed.
21: *
22: * @author Michiel Meeuwissen
23: * @version $Id: Processor.java,v 1.10 2008/01/25 09:32:23 michiel Exp $
24: * @since MMBase-1.9
25: */
26: public interface Processor {
27:
28: /**
29: * Every processor processes for a certain block.
30: */
31: Block getBlock();
32:
33: /**
34: * A processor may need certain parameters. These are added to the block-parameters. This method
35: * is called on instantation of the processor.
36: */
37: Parameter[] getParameters();
38:
39: /**
40: * Process. In case of e.g. a JSPProcessor, the parameters must also contain
41: * the Http Servlet response and request, besided specific parameters for this component.
42: */
43: void process(Parameters blockParameters,
44: Parameters frameworkParameters) throws FrameworkException;
45:
46: /**
47: * An URI which may identify the implementation of this Renderer.
48: */
49:
50: java.net.URI getUri();
51:
52: }
|