01: /**
02: * $Id: WSRPWindowChannelURLFactory.java,v 1.5 2005/02/08 06:39:36 sm140826 Exp $
03: * Copyright 2003 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.wsrp.consumer.wsrpwindow;
14:
15: import com.sun.portal.container.ChannelURLFactory;
16: import com.sun.portal.container.ChannelURL;
17:
18: import javax.servlet.http.HttpServletRequest;
19: import javax.servlet.http.HttpServletResponse;
20:
21: //
22: // secure thing
23: // fragment
24: //
25:
26: public class WSRPWindowChannelURLFactory implements ChannelURLFactory {
27:
28: private String _providerDesktopURLPrefix = null;
29: private String _securityErrorURL = null;
30:
31: public WSRPWindowChannelURLFactory(String providerDesktopURLPrefix,
32: String securityErrorURL) {
33: _providerDesktopURLPrefix = providerDesktopURLPrefix;
34: _securityErrorURL = securityErrorURL;
35: }
36:
37: public ChannelURL createChannelURL() {
38: return new WSRPWindowChannelURL(_providerDesktopURLPrefix);
39: }
40:
41: public String getProviderDesktopURLPrefix() {
42: return _providerDesktopURLPrefix;
43: }
44:
45: public String encodeURL(HttpServletRequest request,
46: HttpServletResponse response, String url) {
47: //return response.encodeURL( url );
48: // not implemented
49: return null;
50: }
51:
52: public String getRenderTemplate() {
53: WSRPWindowChannelURL channelURL = new WSRPWindowChannelURL(
54: getProviderDesktopURLPrefix());
55: return channelURL.getTemplate(ChannelURL.RENDER_URL_TYPE);
56: }
57:
58: public String getActionTemplate() {
59: WSRPWindowChannelURL channelURL = new WSRPWindowChannelURL(
60: getProviderDesktopURLPrefix());
61: return channelURL.getTemplate(ChannelURL.ACTION_URL_TYPE);
62: }
63:
64: public String getSecurityErrorURL() {
65: return _securityErrorURL;
66: }
67:
68: }
|