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: import javax.servlet.http.HttpServletRequest;
09: import javax.servlet.http.HttpServletResponse;
10:
11: import com.sun.portal.desktop.taglib.BaseDesktopTagSupport;
12: import com.sun.portal.desktop.taglib.DesktopTaglibException;
13: import com.sun.portal.providers.Provider;
14: import com.sun.portal.providers.ProviderException;
15:
16: public class GetEditTag extends BaseDesktopTagSupport {
17: public int doStartTag() throws JspException {
18: Provider p = (Provider) getCurrentObj();
19:
20: StringBuffer sb = null;
21: try {
22: if (!(p.isEditable())) {
23: throw new ProviderException(
24: "This channel is not editable");
25: }
26: sb = p.getEdit((HttpServletRequest) pageContext
27: .getRequest(), (HttpServletResponse) pageContext
28: .getResponse());
29: } catch (ProviderException pe) {
30: throw new DesktopTaglibException(pe);
31: }
32: processResult(sb.toString());
33: return SKIP_BODY;
34: }
35: }
|