Liferay 6.1.2-ce-ga3

com.liferay.portal.model.impl
Class ResourcePermissionImpl

java.lang.Object
  extended by com.liferay.portal.model.impl.BaseModelImpl<ResourcePermission>
      extended by com.liferay.portal.model.impl.ResourcePermissionModelImpl
          extended by com.liferay.portal.model.impl.ResourcePermissionBaseImpl
              extended by com.liferay.portal.model.impl.ResourcePermissionImpl
All Implemented Interfaces:
BaseModel<ResourcePermission>, ClassedModel, PersistedModel, ResourcePermission, ResourcePermissionModel, Serializable, Cloneable, Comparable<ResourcePermission>

public class ResourcePermissionImpl
extends ResourcePermissionBaseImpl

Stores the permissions assigned to roles under permissions version 6. A resource permission gives a role the ability to perform a set of actions on certain resources.

The type of resource a permission applies to is specified by the name attribute. It will either be the numeric ID of a portlet, or the fully qualified class name of a model (such as a layout or document library folder).

These permissions can apply in one of four scopes: company, group, group-template, or individual. The scope of a permission determines how broadly it applies to resources in the portal. Company scope is the broadest, and grants a user with the role permissions for every resource of the type within the company. Likewise, group scope gives users with the role permissions for every resource within the specified group, and individual scope only applies to a single resource of the type. Group-template scope is similar to group scope, except that it does not automatically apply to a specific group. A user must be a member of a group (generally either a site or an organization), and they must have been given the role within that group before they are granted its permissions.

Note: Lacking permission to perform an action on a resource at one scope does not necessarily mean that a role does not have permission to perform that action. For instance, a message boards moderator role will not have individual scope permissions to edit every post, but it will have edit permissions at the group or company level, which is sufficient. Every scope must be checked.

The scope of the resource permission also determines the meaning of the primKey attribute. Its different uses are listed below:

The actionIds attribute stores the bitwise IDs of all the actions allowed by this permission.

See Also:
ResourceActionImpl, Serialized Form

Field Summary
 
Fields inherited from class com.liferay.portal.model.impl.ResourcePermissionModelImpl
ACTIONIDS_COLUMN_BITMASK, COLUMN_BITMASK_ENABLED, COMPANYID_COLUMN_BITMASK, DATA_SOURCE, ENTITY_CACHE_ENABLED, FINDER_CACHE_ENABLED, LOCK_EXPIRATION_TIME, NAME_COLUMN_BITMASK, OWNERID_COLUMN_BITMASK, PRIMKEY_COLUMN_BITMASK, ROLEID_COLUMN_BITMASK, SCOPE_COLUMN_BITMASK, SESSION_FACTORY, TABLE_COLUMNS, TABLE_NAME, TABLE_SQL_CREATE, TABLE_SQL_DROP, TX_MANAGER
 
Constructor Summary
ResourcePermissionImpl()
           
 
Method Summary
 boolean hasActionId(String actionId)
           
 
Methods inherited from class com.liferay.portal.model.impl.ResourcePermissionBaseImpl
persist
 
Methods inherited from class com.liferay.portal.model.impl.ResourcePermissionModelImpl
clone, compareTo, equals, getActionIds, getColumnBitmask, getCompanyId, getExpandoBridge, getModelAttributes, getModelClass, getModelClassName, getName, getOriginalActionIds, getOriginalCompanyId, getOriginalName, getOriginalOwnerId, getOriginalPrimKey, getOriginalRoleId, getOriginalScope, getOwnerId, getPrimaryKey, getPrimaryKeyObj, getPrimKey, getResourcePermissionId, getRoleId, getScope, hashCode, resetOriginalValues, setActionIds, setCompanyId, setExpandoBridgeAttributes, setModelAttributes, setName, setOwnerId, setPrimaryKey, setPrimaryKeyObj, setPrimKey, setResourcePermissionId, setRoleId, setScope, toCacheModel, toEscapedModel, toModel, toModels, toString, toUnescapedModel, toXmlString
 
Methods inherited from class com.liferay.portal.model.impl.BaseModelImpl
getLocale, isCachedModel, isEscapedModel, isNew, setCachedModel, setNew
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.liferay.portal.model.ResourcePermissionModel
clone, compareTo, getActionIds, getCompanyId, getExpandoBridge, getName, getOwnerId, getPrimaryKey, getPrimaryKeyObj, getPrimKey, getResourcePermissionId, getRoleId, getScope, hashCode, isCachedModel, isEscapedModel, isNew, setActionIds, setCachedModel, setCompanyId, setExpandoBridgeAttributes, setName, setNew, setOwnerId, setPrimaryKey, setPrimaryKeyObj, setPrimKey, setResourcePermissionId, setRoleId, setScope, toCacheModel, toEscapedModel, toString, toUnescapedModel, toXmlString
 
Methods inherited from interface com.liferay.portal.model.BaseModel
getModelAttributes, resetOriginalValues, setModelAttributes
 
Methods inherited from interface com.liferay.portal.model.ClassedModel
getModelClass, getModelClassName
 

Constructor Detail

ResourcePermissionImpl

public ResourcePermissionImpl()
Method Detail

hasActionId

public boolean hasActionId(String actionId)

Liferay 6.1.2-ce-ga3