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.portal.kernel.servlet.taglib.ui;
016    
017    import com.liferay.portal.kernel.util.StringBundler;
018    import com.liferay.portal.kernel.util.Validator;
019    
020    /**
021     * @author Eudaldo Alonso
022     */
023    public class QuickAccessEntry {
024    
025            public String getContent() {
026                    if (Validator.isNotNull(_label)) {
027                            return _label;
028                    }
029    
030                    return _body.toString();
031            }
032    
033            public String getData() {
034                    return _data;
035            }
036    
037            public String getId() {
038                    return _id;
039            }
040    
041            public String getLabel() {
042                    return _label;
043            }
044    
045            public String getOnClick() {
046                    return _onClick;
047            }
048    
049            public String getURL() {
050                    if (Validator.isNull(_url)) {
051                            return "javascript:;";
052                    }
053    
054                    return _url;
055            }
056    
057            public void setBody(StringBundler body) {
058                    _body = body;
059            }
060    
061            public void setData(String data) {
062                    _data = data;
063            }
064    
065            public void setId(String id) {
066                    _id = id;
067            }
068    
069            public void setLabel(String label) {
070                    _label = label;
071            }
072    
073            public void setOnClick(String onClick) {
074                    _onClick = onClick;
075            }
076    
077            public void setURL(String url) {
078                    _url = url;
079            }
080    
081            private StringBundler _body;
082            private String _data;
083            private String _id;
084            private String _label;
085            private String _onClick;
086            private String _url;
087    
088    }