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.model;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.annotation.ImplementationClassName;
020    import com.liferay.portal.kernel.util.Accessor;
021    
022    /**
023     * The extended model interface for the PluginSetting service. Represents a row in the "PluginSetting" database table, with each column mapped to a property of this class.
024     *
025     * @author Brian Wing Shun Chan
026     * @see PluginSettingModel
027     * @see com.liferay.portal.model.impl.PluginSettingImpl
028     * @see com.liferay.portal.model.impl.PluginSettingModelImpl
029     * @generated
030     */
031    @ImplementationClassName("com.liferay.portal.model.impl.PluginSettingImpl")
032    @ProviderType
033    public interface PluginSetting extends PluginSettingModel, PersistedModel {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this interface directly. Add methods to {@link com.liferay.portal.model.impl.PluginSettingImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
038             */
039            public static final Accessor<PluginSetting, Long> PLUGIN_SETTING_ID_ACCESSOR =
040                    new Accessor<PluginSetting, Long>() {
041                            @Override
042                            public Long get(PluginSetting pluginSetting) {
043                                    return pluginSetting.getPluginSettingId();
044                            }
045    
046                            @Override
047                            public Class<Long> getAttributeClass() {
048                                    return Long.class;
049                            }
050    
051                            @Override
052                            public Class<PluginSetting> getTypeClass() {
053                                    return PluginSetting.class;
054                            }
055                    };
056    
057            /**
058            * Adds a role to the list of roles.
059            */
060            public void addRole(java.lang.String role);
061    
062            /**
063            * Returns an array of required roles of the plugin.
064            *
065            * @return an array of required roles of the plugin
066            */
067            public java.lang.String[] getRolesArray();
068    
069            /**
070            * Returns <code>true</code> if the user has permission to use this plugin
071            *
072            * @param userId the primary key of the user
073            * @return <code>true</code> if the user has permission to use this plugin
074            */
075            public boolean hasPermission(long userId);
076    
077            /**
078            * Returns <code>true</code> if the plugin has a role with the specified
079            * name.
080            *
081            * @param roleName the role name
082            * @return <code>true</code> if the plugin has a role with the specified
083            name
084            */
085            public boolean hasRoleWithName(java.lang.String roleName);
086    
087            /**
088            * Sets an array of required roles of the plugin.
089            */
090            public void setRolesArray(java.lang.String[] rolesArray);
091    }