01: /*
02: * Created on Feb 8, 2005
03: */
04: package uk.org.ponder.webapputil;
05:
06: /**
07: * Request information stored about a consumer of this service. NB - some
08: * fields will vary per-request.
09: * @author Antranig Basman (antranig@caret.cam.ac.uk)
10: *
11: */
12: public class ConsumerInfo {
13: public String consumerid; // also called "consumerprefix"
14: public String consumername;
15: /** The FULL URL for requests made to the consumer's Information Servlet */
16: public String informationbase;
17: /** A string identifying the type of consumer. Supported currently are
18: * "coursework" and "sakai". If this field is left null, it is assumed there
19: * is no consumer.
20: */
21: public String consumertype;
22: // NB - urlbase, extraparameters and externalURL may vary between resources
23: // for the same consumer. We expect everything else to be consumer-static.
24: /** The URL base required
25: * for URLs holding dynamic content written to a remote consumer during
26: * this request cycle. This URL includes a trailing slash.
27: */
28: public String urlbase;
29: /** Any other parameters required, together with urlbase, to render a
30: * correct consumer-side URL. This begins with an ampersand and
31: * consists of fully-encoded parameter pairs ready to be postpended
32: * to a parameter string.*/
33: public String extraparameters;
34:
35: /** The URL to be issued by a user out in the wild to navigate the hosting
36: * environment to the point where the tool instance corresponding to this
37: * resource is visible. If this is null, the tool URL itself is presumed
38: * to be valid (as per Coursework). This URL may be incomplete/invalid in
39: * various ways, as a result of a "private arrangement" between the forwarder
40: * and the UltimateURLRenderer in use. */
41: public String externalURL;
42: /** The URL base required
43: * for statically served resource URLs written to a remote consumer
44: * during this request cycle. Note that this may not refer to the same
45: * webapp or machine as the URL base above. We don't expect requests
46: * for these URLs to pass through the dispatch of the remote consumer,
47: * but be resolved directly.
48: */
49: public String resourceurlbase;
50:
51: /** A method useful to breach proxy boundaries. Call if using this object
52: * from an application-scope bean.
53: */
54: public ConsumerInfo get() {
55: return this;
56: }
57:
58: }
|