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.addressbook.ABStore;
10:
11: import com.sun.ssoadapter.SSOAdapter;
12:
13: import javax.mail.Address;
14: import javax.mail.Message;
15:
16: import java.io.BufferedReader;
17: import java.io.InputStreamReader;
18:
19: import java.net.HttpURLConnection;
20: import java.net.MalformedURLException;
21: import java.net.URL;
22:
23: public class NotesABURLBuilder extends URLBuilder implements ABURL {
24:
25: /**
26: * Call prior init functions and set the path to the notes operation
27: *
28: * @param SSOAdapter ssoadapter used to init everything
29: */
30: public void init(SSOAdapter ssoAdapter) {
31: super .init(ssoAdapter);
32:
33: StringBuffer pathBuf = new StringBuffer("/");
34: String mailFileName = ((ABStore) ssoAdapter.getConnection())
35: .getSession().getProperty("lotus.mailFileName");
36: if (mailFileName == null || mailFileName.length() == 0) {
37: pathBuf.append("mail/");
38: String idFileName = ((ABStore) ssoAdapter.getConnection())
39: .getSession().getProperty("lotus.sso.user");
40: if (idFileName == null || idFileName.length() == 0) {
41: idFileName = adapterProperties.getProperty("uid");
42: }
43: pathBuf.append(idFileName);
44: } else {
45: pathBuf.append(mailFileName);
46: }
47: pathBuf.append(".nsf");
48: setPath(pathBuf.toString());
49: }
50:
51: /**
52: * Lets invoking classes know if contact urls are available
53: * in this URLBuilder.
54: *
55: * @return boolean Are contact URLs available
56: */
57: public boolean allowsContactURL() {
58: return false;
59: }
60:
61: /**
62: * Return URL string for specific contact to be opened in ab client.
63: *
64: * @param Object contact
65: * @return String View URL string
66: */
67: public String getContactURL(Object contact) {
68: return getStartURL();
69: }
70:
71: }
|