1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.taglib.ui;
16  
17  import com.liferay.taglib.util.IncludeTag;
18  
19  import javax.servlet.http.HttpServletRequest;
20  
21  /**
22   * <a href="UploadProgressTag.java.html"><b><i>View Source</i></b></a>
23   *
24   * @author Brian Wing Shun Chan
25   * @author Keith R. Davis
26   */
27  public class UploadProgressTag extends IncludeTag {
28  
29      public int doStartTag() {
30          HttpServletRequest request =
31              (HttpServletRequest)pageContext.getRequest();
32  
33          request.setAttribute("liferay-ui:upload-progress:id", _id);
34          request.setAttribute(
35              "liferay-ui:upload-progress:iframe-src", _iframeSrc);
36          request.setAttribute("liferay-ui:upload-progress:redirect", _redirect);
37          request.setAttribute("liferay-ui:upload-progress:message", _message);
38  
39          return EVAL_BODY_BUFFERED;
40      }
41  
42      public void setId(String id) {
43          _id = id;
44      }
45  
46      public void setIframeSrc(String iframeSrc) {
47          _iframeSrc = iframeSrc;
48      }
49  
50      public void setRedirect(String redirect) {
51          _redirect = redirect;
52      }
53  
54      public void setMessage(String message) {
55          _message = message;
56      }
57  
58      protected String getDefaultPage() {
59          return _PAGE;
60      }
61  
62      private static final String _PAGE =
63          "/html/taglib/ui/upload_progress/page.jsp";
64  
65      private String _id;
66      private String _iframeSrc;
67      private String _redirect;
68      private String _message;
69  
70  }