01: /**
02: * $Id: FolderTag.java,v 1.6 2005/02/08 06:26:39 sm140826 Exp $
03: * Copyright 2002 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 iPlanet
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.wireless.taglibs.mail;
14:
15: import com.sun.portal.wireless.taglibs.base.*;
16:
17: /**
18: *
19: * @version 1.0
20: * @see com.sun.portal.wireless.taglibs.base.BeanTag
21: */
22:
23: public class FolderTag extends BeanTag {
24: private String foldername = null;
25:
26: public Object newBean() throws Exception {
27: if (foldername == null) {
28: return new FolderBean();
29: } else {
30: MailContext mc = MailContext.getContext(pageContext);
31: if (foldername.equals("")) {
32: foldername = "INBOX";
33: }
34: return new FolderBean(mc.getMailStore().getFolder(
35: foldername));
36: }
37: }
38:
39: public Object findBean() throws Exception {
40: return super .findBean();
41: }
42:
43: /**
44: * Set the folder name attribute
45: *
46: * @param set the folder name attribute
47: */
48:
49: public void setFoldername(String name) {
50: foldername = evalAttribute(name);
51: }
52:
53: /**
54: * Get folder name
55: *
56: * @return the full name of the folder
57: */
58:
59: public String getFoldername() {
60: return foldername;
61: }
62:
63: }
|