01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.desktop.taglib.provider;
06:
07: import javax.servlet.jsp.JspException;
08:
09: import com.sun.portal.desktop.taglib.BaseDesktopTagSupport;
10: import com.sun.portal.desktop.taglib.DesktopTaglibException;
11: import com.sun.portal.providers.Provider;
12: import com.sun.portal.providers.ProviderException;
13:
14: public class GetDescriptionTag extends BaseDesktopTagSupport {
15: public int doStartTag() throws JspException {
16: Provider p = (Provider) getCurrentObj();
17: String description = null;
18: try {
19: description = p.getDescription();
20: } catch (Throwable t) {
21: return processException(new DesktopTaglibException(t), "");
22: }
23: //It is ok to have a portlet/channel with null description.
24: if (description == null) {
25: description = ""; //since hashtable does not allow key values to be null
26: }
27: processResult(description);
28: return SKIP_BODY;
29: }
30: }
|