com.liferay.portal.model.impl
Class PluginSettingImpl
java.lang.Object
com.liferay.portal.model.impl.BaseModelImpl<PluginSetting>
com.liferay.portal.model.impl.PluginSettingModelImpl
com.liferay.portal.model.impl.PluginSettingImpl
- All Implemented Interfaces:
- BaseModel<PluginSetting>, PluginSetting, PluginSettingModel, Serializable, Cloneable, Comparable<PluginSetting>
public class PluginSettingImpl
- extends PluginSettingModelImpl
- implements PluginSetting
- See Also:
- Serialized Form
Method Summary |
void |
addRole(String role)
Adds a role to the list of roles. |
String[] |
getRolesArray()
Gets an array of required roles of the plugin. |
boolean |
hasPermission(long userId)
Returns true if the user has permission to use this plugin |
boolean |
hasRoleWithName(String roleName)
Returns true if the plugin has a role with the specified
name. |
void |
setRoles(String roles)
Sets a string of ordered comma delimited plugin ids. |
void |
setRolesArray(String[] rolesArray)
Sets an array of required roles of the plugin. |
Methods inherited from class com.liferay.portal.model.impl.PluginSettingModelImpl |
clone, compareTo, equals, getActive, getCompanyId, getExpandoBridge, getOriginalCompanyId, getOriginalPluginId, getOriginalPluginType, getPluginId, getPluginSettingId, getPluginType, getPrimaryKey, getPrimaryKeyObj, getRoles, hashCode, isActive, setActive, setCompanyId, setExpandoBridgeAttributes, setPluginId, setPluginSettingId, setPluginType, setPrimaryKey, toEscapedModel, toModel, toModels, toString, toXmlString |
Methods inherited from interface com.liferay.portal.model.PluginSettingModel |
clone, compareTo, getActive, getCompanyId, getExpandoBridge, getPluginId, getPluginSettingId, getPluginType, getPrimaryKey, getPrimaryKeyObj, getRoles, hashCode, isActive, isCachedModel, isEscapedModel, isNew, setActive, setCachedModel, setCompanyId, setEscapedModel, setExpandoBridgeAttributes, setNew, setPluginId, setPluginSettingId, setPluginType, setPrimaryKey, toEscapedModel, toString, toXmlString |
PluginSettingImpl
public PluginSettingImpl()
PluginSettingImpl
public PluginSettingImpl(PluginSetting pluginSetting)
addRole
public void addRole(String role)
- Adds a role to the list of roles.
- Specified by:
addRole
in interface PluginSetting
setRoles
public void setRoles(String roles)
- Sets a string of ordered comma delimited plugin ids.
- Specified by:
setRoles
in interface PluginSetting
- Specified by:
setRoles
in interface PluginSettingModel
- Overrides:
setRoles
in class PluginSettingModelImpl
- Parameters:
roles
- the roles of this plugin setting
getRolesArray
public String[] getRolesArray()
- Gets an array of required roles of the plugin.
- Specified by:
getRolesArray
in interface PluginSetting
- Returns:
- an array of required roles of the plugin
setRolesArray
public void setRolesArray(String[] rolesArray)
- Sets an array of required roles of the plugin.
- Specified by:
setRolesArray
in interface PluginSetting
hasRoleWithName
public boolean hasRoleWithName(String roleName)
- Returns
true
if the plugin has a role with the specified
name.
- Specified by:
hasRoleWithName
in interface PluginSetting
- Returns:
true
if the plugin has a role with the specified
name
hasPermission
public boolean hasPermission(long userId)
- Returns
true
if the user has permission to use this plugin
- Specified by:
hasPermission
in interface PluginSetting
- Returns:
true
if the user has permission to use this plugin