com.liferay.portal.model.impl
Class ResourceTypePermissionImpl
java.lang.Object
com.liferay.portal.model.impl.BaseModelImpl<ResourceTypePermission>
com.liferay.portal.model.impl.ResourceTypePermissionModelImpl
com.liferay.portal.model.impl.ResourceTypePermissionBaseImpl
com.liferay.portal.model.impl.ResourceTypePermissionImpl
- All Implemented Interfaces:
- BaseModel<ResourceTypePermission>, ClassedModel, PersistedModel, ResourceTypePermission, ResourceTypePermissionModel, Serializable, Cloneable, Comparable<ResourceTypePermission>
public class ResourceTypePermissionImpl
- extends ResourceTypePermissionBaseImpl
Stores the actions a role has permission to perform on all resources of the
type within the group/company.
Resource type permissions can exist at either company or group scope. They
are roughly equivalent to resource permissions with company, group, or
group-template scope. However, resource type permissions make no distinction
between company and group-template scope, storing both as company scope
permissions. The reason for this simplification is that regular roles cannot
have group-template scope permissions, and site/organization roles can only
have group-template scope permissions. Therefore, resource type permissions
depend on the type of their associated role to distinguish between the two
scopes.
Do not confuse resource type permissions with resource block permissions;
they serve very different purposes. Resource block permissions store the
permissions on a single resource block, and are simply a representation of
who can do what to the resources within the block. Resource type permissions
grant permissions to perform actions on all resources of a type within a
group or company. Any permissions granted to a role with a resource type
permission are automatically added to all the resource blocks for that
resource type within the group/company.
For example, if a company scope resource type permission is granted to a role
to edit blog entries, all the resource blocks within the company for blog
entries are modified to grant the role permission to edit the blog entries
they contain. Thus, granting and revoking resource type permissions will also
cause those same permissions to be granted/revoked at the resource block
permission level.
Copying permissions from the company and group scope to the resource block
scope eliminates the need to check multiple scopes when determining if a role
has permission to perform an action on a resource. All the necessary
information is cached at the most granular level.
Rather than using a separate "scope" attribute as resource permissions do, company scope resource type
permissions simply have a groupId
of 0
The type of resource the permission grants access to is specified by the
name
attribute, which must be the fully qualified class name of
a model (such as a blog entry).
The actionIds
attribute stores the bitwise IDs of all the
actions allowed by this permission.
- See Also:
- Serialized Form
Fields inherited from class com.liferay.portal.model.impl.ResourceTypePermissionModelImpl |
COLUMN_BITMASK_ENABLED, COMPANYID_COLUMN_BITMASK, DATA_SOURCE, ENTITY_CACHE_ENABLED, FINDER_CACHE_ENABLED, GROUPID_COLUMN_BITMASK, LOCK_EXPIRATION_TIME, NAME_COLUMN_BITMASK, ROLEID_COLUMN_BITMASK, SESSION_FACTORY, TABLE_COLUMNS, TABLE_NAME, TABLE_SQL_CREATE, TABLE_SQL_DROP, TX_MANAGER |
Methods inherited from class com.liferay.portal.model.impl.ResourceTypePermissionModelImpl |
clone, compareTo, equals, getActionIds, getColumnBitmask, getCompanyId, getExpandoBridge, getGroupId, getModelAttributes, getModelClass, getModelClassName, getName, getOriginalCompanyId, getOriginalGroupId, getOriginalName, getOriginalRoleId, getPrimaryKey, getPrimaryKeyObj, getResourceTypePermissionId, getRoleId, hashCode, resetOriginalValues, setActionIds, setCompanyId, setExpandoBridgeAttributes, setGroupId, setModelAttributes, setName, setPrimaryKey, setPrimaryKeyObj, setResourceTypePermissionId, setRoleId, toCacheModel, toEscapedModel, toString, toUnescapedModel, toXmlString |
Methods inherited from interface com.liferay.portal.model.ResourceTypePermissionModel |
clone, compareTo, getActionIds, getCompanyId, getExpandoBridge, getGroupId, getName, getPrimaryKey, getPrimaryKeyObj, getResourceTypePermissionId, getRoleId, hashCode, isCachedModel, isEscapedModel, isNew, setActionIds, setCachedModel, setCompanyId, setExpandoBridgeAttributes, setGroupId, setName, setNew, setPrimaryKey, setPrimaryKeyObj, setResourceTypePermissionId, setRoleId, toCacheModel, toEscapedModel, toString, toUnescapedModel, toXmlString |
ResourceTypePermissionImpl
public ResourceTypePermissionImpl()
isCompanyScope
public boolean isCompanyScope()
isGroupScope
public boolean isGroupScope()