01: /*
02: * Created on 14 Aug 2006
03: */
04: package uk.org.ponder.rsf.viewstate.support;
05:
06: import uk.org.ponder.rsf.viewstate.BaseURLProvider;
07: import uk.org.ponder.rsf.viewstate.ContextURLProvider;
08: import uk.org.ponder.webapputil.ConsumerInfo;
09:
10: public class CRIContextURLProvider implements ContextURLProvider {
11:
12: private BaseURLProvider bup;
13: private ConsumerInfo ciproxy;
14:
15: public void setBaseURLProvider(BaseURLProvider bup) {
16: this .bup = bup;
17: }
18:
19: public void setConsumerInfo(ConsumerInfo ci) {
20: this .ciproxy = ci;
21: }
22:
23: public String getContextBaseURL() {
24: ConsumerInfo ci = ciproxy.get();
25: String useresurl = bup.getResourceBaseURL();
26: if (ci.resourceurlbase != null) {
27: useresurl = ci.resourceurlbase;
28: }
29: return useresurl;
30: }
31:
32: }
|