public class PluginSettingWrapper extends BaseModelWrapper<PluginSetting> implements ModelWrapper<PluginSetting>, PluginSetting
This class is a wrapper for PluginSetting.
PluginSetting,
Serialized FormmodelPLUGIN_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.
|
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, toXmlStringgetWrappedModelclone, getAttributeGetterFunctions, getAttributeSetterBiConsumers, getExpandoBridge, getPrimaryKeyObj, isCachedModel, isEntityCacheEnabled, isEscapedModel, isFinderCacheEnabled, isNew, resetOriginalValues, setCachedModel, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setNew, setPrimaryKeyObj, toCacheModel, toEscapedModel, toUnescapedModel, toXmlStringgetModelClass, getModelClassNamepublic 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 PluginSettingpublic PluginSetting cloneWithOriginalValues()
cloneWithOriginalValues in interface BaseModel<PluginSetting>cloneWithOriginalValues in interface PluginSettingModelpublic boolean getActive()
getActive in interface PluginSettingModelpublic long getCompanyId()
getCompanyId in interface PluginSettingModelgetCompanyId in interface ShardedModelpublic long getMvccVersion()
getMvccVersion in interface MVCCModelgetMvccVersion in interface PluginSettingModelpublic String getPluginId()
getPluginId in interface PluginSettingModelpublic long getPluginSettingId()
getPluginSettingId in interface PluginSettingModelpublic String getPluginType()
getPluginType in interface PluginSettingModelpublic long getPrimaryKey()
getPrimaryKey in interface PluginSettingModelpublic String getRoles()
getRoles in interface PluginSettingModelpublic String[] getRolesArray()
getRolesArray in interface PluginSettingpublic boolean hasPermission(long userId)
true if the user has permission to use this pluginhasPermission in interface PluginSettinguserId - 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 PluginSettinguserId - 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 PluginSettingroleName - 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 PluginSettingModeltrue if this plugin setting is active; false otherwisepublic void persist()
PersistedModelpersist in interface PersistedModelpublic void setActive(boolean active)
setActive in interface PluginSettingModelactive - the active of this plugin settingpublic void setCompanyId(long companyId)
setCompanyId in interface PluginSettingModelsetCompanyId in interface ShardedModelcompanyId - the company ID of this plugin settingpublic void setMvccVersion(long mvccVersion)
setMvccVersion in interface MVCCModelsetMvccVersion in interface PluginSettingModelmvccVersion - the mvcc version of this plugin settingpublic void setPluginId(String pluginId)
setPluginId in interface PluginSettingModelpluginId - the plugin ID of this plugin settingpublic void setPluginSettingId(long pluginSettingId)
setPluginSettingId in interface PluginSettingModelpluginSettingId - the plugin setting ID of this plugin settingpublic void setPluginType(String pluginType)
setPluginType in interface PluginSettingModelpluginType - the plugin type of this plugin settingpublic void setPrimaryKey(long primaryKey)
setPrimaryKey in interface PluginSettingModelprimaryKey - the primary key of this plugin settingpublic void setRoles(String roles)
setRoles in interface PluginSettingModelroles - the roles of this plugin settingpublic void setRolesArray(String[] rolesArray)
setRolesArray in interface PluginSettingprotected PluginSettingWrapper wrap(PluginSetting pluginSetting)
wrap in class BaseModelWrapper<PluginSetting>