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.plugin;
016    
017    import com.liferay.portal.kernel.util.Accessor;
018    
019    import java.io.Serializable;
020    
021    /**
022     * @author Jorge Ferrer
023     */
024    public class License implements Serializable {
025    
026            public static final Accessor<License, String> NAME_ACCESSOR =
027    
028                    new Accessor<License, String>() {
029    
030                            @Override
031                            public String get(License license) {
032                                    return license.getName();
033                            }
034    
035                            @Override
036                            public Class<String> getAttributeClass() {
037                                    return String.class;
038                            }
039    
040                            @Override
041                            public Class<License> getTypeClass() {
042                                    return License.class;
043                            }
044    
045                    };
046    
047            public String getName() {
048                    return _name;
049            }
050    
051            public String getUrl() {
052                    return _url;
053            }
054    
055            public boolean isOsiApproved() {
056                    return _osiApproved;
057            }
058    
059            public void setName(String name) {
060                    _name = name;
061            }
062    
063            public void setOsiApproved(boolean osiApproved) {
064                    _osiApproved = osiApproved;
065            }
066    
067            public void setUrl(String url) {
068                    _url = url;
069            }
070    
071            private String _name;
072            private boolean _osiApproved;
073            private String _url;
074    
075    }