1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
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  }