01: /*
02: * Created on Jan 6, 2005
03: */
04: package uk.org.ponder.rsf.viewstate;
05:
06: import java.util.Map;
07:
08: /**
09: * Provides primitive functionality for mapping view states to URLs, and issuing
10: * redirects.
11: *
12: * @author Antranig Basman (antranig@caret.cam.ac.uk)
13: *
14: */
15: public interface ViewStateHandler {
16: /** Return a "complete" URL suitable for rendering to our upstream consumer for
17: * a link to the view specified in these parameters. This URL may not be valid
18: * for any external purposes. This form of URL is also to be used for issuing
19: * redirects.
20: */
21: public String getFullURL(ViewParameters viewparams);
22:
23: /** Return a "complete" URL suitable for rendering to our upstream consumer for
24: * triggering an "action" - in HTML, as applied to the "action" attribute of
25: * <code>form</code>. This omits all state that might enter attributes,
26: * which is supplied by getActionMap().
27: */
28: public String getActionURL(ViewParameters viewparams);
29:
30: /** Return a new, unshared map of all state from these ViewParameters that will
31: * be mapped into attribute state.
32: */
33: public Map getAttrMap(ViewParameters viewparams);
34:
35: /** The equivalent of getFullURL for static resources that are not necessarily
36: * under our control. These e.g. start with /content/...
37: */
38: public String encodeResourceURL(String resourcepath);
39:
40: /** Return a "fully resolved" complete URL linking to the view specified, which
41: * is a valid URL resolvable on the internet at large.
42: */
43: public String getUltimateURL(ViewParameters viewparams);
44: }
|