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