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 void setId(String id) {
30          _id = id;
31      }
32  
33      public void setIframeSrc(String iframeSrc) {
34          _iframeSrc = iframeSrc;
35      }
36  
37      public void setMessage(String message) {
38          _message = message;
39      }
40  
41      public void setRedirect(String redirect) {
42          _redirect = redirect;
43      }
44  
45      protected void cleanUp() {
46          _id = null;
47          _iframeSrc = null;
48          _message = null;
49          _redirect = null;
50      }
51  
52      protected String getPage() {
53          return _PAGE;
54      }
55  
56      protected void setAttributes(HttpServletRequest request) {
57          request.setAttribute("liferay-ui:upload-progress:id", _id);
58          request.setAttribute(
59              "liferay-ui:upload-progress:iframe-src", _iframeSrc);
60          request.setAttribute("liferay-ui:upload-progress:message", _message);
61          request.setAttribute("liferay-ui:upload-progress:redirect", _redirect);
62      }
63  
64      private static final String _PAGE =
65          "/html/taglib/ui/upload_progress/page.jsp";
66  
67      private String _id;
68      private String _iframeSrc;
69      private String _message;
70      private String _redirect;
71  
72  }