001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.taglib.ui;
016    
017    import com.liferay.taglib.util.IncludeTag;
018    
019    import javax.servlet.http.HttpServletRequest;
020    
021    /**
022     * @author     Iliyan Peychev
023     * @author     Sergio Gonz??lez
024     * @deprecated As of 7.0.0, with no direct replacement
025     */
026    @Deprecated
027    public class ProgressTag extends IncludeTag {
028    
029            public void setHeight(int height) {
030                    _height = height;
031            }
032    
033            public void setId(String id) {
034                    _id = id;
035            }
036    
037            public void setMessage(String message) {
038                    _message = message;
039            }
040    
041            public void setSessionKey(String sessionKey) {
042                    _sessionKey = sessionKey;
043            }
044    
045            public void setUpdatePeriod(Integer updatePeriod) {
046                    _updatePeriod = updatePeriod;
047            }
048    
049            @Override
050            protected void cleanUp() {
051                    _height = 25;
052                    _id = null;
053                    _message = null;
054                    _sessionKey = null;
055                    _updatePeriod = 1000;
056            }
057    
058            @Override
059            protected String getPage() {
060                    return _PAGE;
061            }
062    
063            @Override
064            protected void setAttributes(HttpServletRequest request) {
065                    request.setAttribute("liferay-ui:progress:id", _id);
066                    request.setAttribute("liferay-ui:progress:height", _height);
067                    request.setAttribute("liferay-ui:progress:message", _message);
068                    request.setAttribute("liferay-ui:progress:sessionKey", _sessionKey);
069                    request.setAttribute("liferay-ui:progress:updatePeriod", _updatePeriod);
070            }
071    
072            private static final String _PAGE = "/html/taglib/ui/progress/page.jsp";
073    
074            private Integer _height;
075            private String _id;
076            private String _message;
077            private String _sessionKey;
078            private Integer _updatePeriod;
079    
080    }