01: /*
02: *
03: * Copyright 2000 Sun Microsystems, Inc. All rights reserved.
04: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
05: */
06:
07: package com.sun.portal.comm.url;
08:
09: import com.sun.ssoadapter.SSOAdapter;
10:
11: public class ExchangeABURLBuilder extends URLBuilder implements ABURL {
12:
13: /**
14: * Call prior init functions and set the path to the exchange operation
15: *
16: * @param SSOAdapter ssoadapter used to init everything
17: */
18: public void init(SSOAdapter ssoAdapter) {
19: super .init(ssoAdapter);
20: setPath(adapterProperties.getProperty("exchangeContextPath",
21: "/exchange"));
22: }
23:
24: /**
25: * Return URL string for mail client.
26: *
27: * @return String Client start URL
28: */
29: public String getStartURL() {
30: StringBuffer startURL = new StringBuffer(getBaseURL());
31: startURL.append(getPath());
32: String exchangeOperation = adapterProperties
33: .getProperty("exchangeOperation");
34: if (exchangeOperation != null) {
35: startURL.append('/');
36: startURL.append(encode(user));
37: startURL.append('/');
38: startURL.append(encode(exchangeOperation));
39: }
40: return startURL.toString();
41: }
42:
43: /**
44: * Lets invoking classes know if contact urls are available
45: * in this URLBuilder.
46: *
47: * @return boolean Are contact URLs available
48: */
49: public boolean allowsContactURL() {
50: return false;
51: }
52:
53: /**
54: * Return URL string for specific contact to be opened in ab client.
55: *
56: * @param Object contact
57: * @return String View URL string
58: */
59: public String getContactURL(Object contact) {
60: return getStartURL();
61: }
62:
63: }
|