1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.apache.struts2.components;
23
24 import java.io.Writer;
25
26 /***
27 * Implementations of this interface are responsible for rendering/creating URLs for a specific
28 * environment (e.g. Servlet, Portlet).
29 *
30 */
31 public interface UrlRenderer {
32
33 /***
34 * Preprocessing step
35 * @param urlComponent
36 */
37 void beforeRenderUrl(URL urlComponent);
38
39 /***
40 * Render a URL.
41 * @param writer A writer that the implementation can use to write the result to.
42 * @param urlComponent The {@link URL} component that "owns" this renderer.
43 */
44 void renderUrl(Writer writer, URL urlComponent);
45
46 /***
47 * Render a Form URL.
48 * @param formComponent The {@link Form} component that "owns" this renderer.
49 */
50 void renderFormUrl(Form formComponent);
51
52 }