public class PluginSettingWrapper extends BaseModelWrapper<PluginSetting> implements ModelWrapper<PluginSetting>, PluginSetting
This class is a wrapper for PluginSetting
.
PluginSetting
,
Serialized Formmodel
PLUGIN_SETTING_ID_ACCESSOR
Constructor and Description |
---|
PluginSettingWrapper(PluginSetting pluginSetting) |
Modifier and Type | Method and Description |
---|---|
void |
addRole(String role)
Adds a role to the list of roles.
|
PluginSetting |
cloneWithOriginalValues() |
boolean |
getActive()
Returns the active of this plugin setting.
|
long |
getCompanyId()
Returns the company ID of this plugin setting.
|
Map<String,Object> |
getModelAttributes() |
long |
getMvccVersion()
Returns the mvcc version of this plugin setting.
|
String |
getPluginId()
Returns the plugin ID of this plugin setting.
|
long |
getPluginSettingId()
Returns the plugin setting ID of this plugin setting.
|
String |
getPluginType()
Returns the plugin type of this plugin setting.
|
long |
getPrimaryKey()
Returns the primary key of this plugin setting.
|
String |
getRoles()
Returns the roles of this plugin setting.
|
String[] |
getRolesArray()
Returns an array of required roles of the plugin.
|
boolean |
hasPermission(long userId)
Returns
true if the user has permission to use this plugin |
boolean |
hasPermission(long userId,
long groupId)
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. |
boolean |
isActive()
Returns
true if this plugin setting is active. |
void |
persist()
Updates this model instance in the database or adds it if it does not yet
exist.
|
void |
setActive(boolean active)
Sets whether this plugin setting is active.
|
void |
setCompanyId(long companyId)
Sets the company ID of this plugin setting.
|
void |
setModelAttributes(Map<String,Object> attributes) |
void |
setMvccVersion(long mvccVersion)
Sets the mvcc version of this plugin setting.
|
void |
setPluginId(String pluginId)
Sets the plugin ID of this plugin setting.
|
void |
setPluginSettingId(long pluginSettingId)
Sets the plugin setting ID of this plugin setting.
|
void |
setPluginType(String pluginType)
Sets the plugin type of this plugin setting.
|
void |
setPrimaryKey(long primaryKey)
Sets the primary key of this plugin setting.
|
void |
setRoles(String roles)
Sets the roles of this plugin setting.
|
void |
setRolesArray(String[] rolesArray)
Sets an array of required roles of the plugin.
|
String |
toXmlString() |
protected PluginSettingWrapper |
wrap(PluginSetting pluginSetting) |
clone, compareTo, equals, getExpandoBridge, getModelClass, getModelClassName, getPrimaryKeyObj, getWrappedModel, hashCode, isCachedModel, isEntityCacheEnabled, isEscapedModel, isFinderCacheEnabled, isNew, resetOriginalValues, setCachedModel, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setNew, setPrimaryKeyObj, toCacheModel, toEscapedModel, toString, toUnescapedModel
getWrappedModel
clone, getAttributeGetterFunctions, getAttributeSetterBiConsumers, getExpandoBridge, getPrimaryKeyObj, isCachedModel, isEntityCacheEnabled, isEscapedModel, isFinderCacheEnabled, isNew, resetOriginalValues, setCachedModel, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setNew, setPrimaryKeyObj, toCacheModel, toEscapedModel, toUnescapedModel
getModelClass, getModelClassName
public PluginSettingWrapper(PluginSetting pluginSetting)
public Map<String,Object> getModelAttributes()
getModelAttributes
in interface BaseModel<PluginSetting>
public void setModelAttributes(Map<String,Object> attributes)
setModelAttributes
in interface BaseModel<PluginSetting>
public void addRole(String role)
addRole
in interface PluginSetting
public PluginSetting cloneWithOriginalValues()
cloneWithOriginalValues
in interface BaseModel<PluginSetting>
cloneWithOriginalValues
in interface PluginSettingModel
public boolean getActive()
getActive
in interface PluginSettingModel
public long getCompanyId()
getCompanyId
in interface PluginSettingModel
getCompanyId
in interface ShardedModel
public long getMvccVersion()
getMvccVersion
in interface MVCCModel
getMvccVersion
in interface PluginSettingModel
public String getPluginId()
getPluginId
in interface PluginSettingModel
public long getPluginSettingId()
getPluginSettingId
in interface PluginSettingModel
public String getPluginType()
getPluginType
in interface PluginSettingModel
public long getPrimaryKey()
getPrimaryKey
in interface PluginSettingModel
public String getRoles()
getRoles
in interface PluginSettingModel
public String[] getRolesArray()
getRolesArray
in interface PluginSetting
public boolean hasPermission(long userId)
true
if the user has permission to use this pluginhasPermission
in interface PluginSetting
userId
- the primary key of the usertrue
if the user has permission to use this pluginpublic boolean hasPermission(long userId, long groupId)
true
if the user has permission to use this pluginhasPermission
in interface PluginSetting
userId
- the primary key of the usergroupId
- the primary key of the grouptrue
if the user has permission to use this pluginpublic boolean hasRoleWithName(String roleName)
true
if the plugin has a role with the specified
name.hasRoleWithName
in interface PluginSetting
roleName
- the role nametrue
if the plugin has a role with the specified
namepublic boolean isActive()
true
if this plugin setting is active.isActive
in interface PluginSettingModel
true
if this plugin setting is active; false
otherwisepublic void persist()
PersistedModel
persist
in interface PersistedModel
public void setActive(boolean active)
setActive
in interface PluginSettingModel
active
- the active of this plugin settingpublic void setCompanyId(long companyId)
setCompanyId
in interface PluginSettingModel
setCompanyId
in interface ShardedModel
companyId
- the company ID of this plugin settingpublic void setMvccVersion(long mvccVersion)
setMvccVersion
in interface MVCCModel
setMvccVersion
in interface PluginSettingModel
mvccVersion
- the mvcc version of this plugin settingpublic void setPluginId(String pluginId)
setPluginId
in interface PluginSettingModel
pluginId
- the plugin ID of this plugin settingpublic void setPluginSettingId(long pluginSettingId)
setPluginSettingId
in interface PluginSettingModel
pluginSettingId
- the plugin setting ID of this plugin settingpublic void setPluginType(String pluginType)
setPluginType
in interface PluginSettingModel
pluginType
- the plugin type of this plugin settingpublic void setPrimaryKey(long primaryKey)
setPrimaryKey
in interface PluginSettingModel
primaryKey
- the primary key of this plugin settingpublic void setRoles(String roles)
setRoles
in interface PluginSettingModel
roles
- the roles of this plugin settingpublic void setRolesArray(String[] rolesArray)
setRolesArray
in interface PluginSetting
public String toXmlString()
toXmlString
in interface PluginSettingModel
protected PluginSettingWrapper wrap(PluginSetting pluginSetting)
wrap
in class BaseModelWrapper<PluginSetting>