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.model.BaseModel;
018    
019    import java.util.HashMap;
020    import java.util.Map;
021    
022    /**
023     * @author Sergio Gonz??lez
024     */
025    public class BreadcrumbEntry {
026    
027            public BaseModel<?> getBaseModel() {
028                    return _baseModel;
029            }
030    
031            public Map<String, Object> getData() {
032                    return _data;
033            }
034    
035            public Object getData(String key) {
036                    return _data.get(key);
037            }
038    
039            public String getTitle() {
040                    return _title;
041            }
042    
043            public String getURL() {
044                    return _url;
045            }
046    
047            public boolean isBrowsable() {
048                    return _browsable;
049            }
050    
051            public void putData(String key, Object value) {
052                    if (_data == null) {
053                            _data = new HashMap<>();
054                    }
055    
056                    _data.put(key, value);
057            }
058    
059            public void setBaseModel(BaseModel<?> baseModel) {
060                    _baseModel = baseModel;
061            }
062    
063            public void setBrowsable(boolean browsable) {
064                    _browsable = browsable;
065            }
066    
067            public void setData(Map<String, Object> data) {
068                    _data = data;
069            }
070    
071            public void setTitle(String title) {
072                    _title = title;
073            }
074    
075            public void setURL(String url) {
076                    _url = url;
077            }
078    
079            private BaseModel<?> _baseModel;
080            private boolean _browsable = true;
081            private Map<String, Object> _data;
082            private String _title;
083            private String _url;
084    
085    }