Liferay 6.1.2-ce-ga3

Class ResourceTypePermissionImpl

  extended by com.liferay.portal.model.impl.BaseModelImpl<ResourceTypePermission>
      extended by com.liferay.portal.model.impl.ResourceTypePermissionModelImpl
          extended by com.liferay.portal.model.impl.ResourceTypePermissionBaseImpl
              extended by 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

Field Summary
Fields inherited from class com.liferay.portal.model.impl.ResourceTypePermissionModelImpl
Constructor Summary
Method Summary
 boolean isCompanyScope()
 boolean isGroupScope()
Methods inherited from class com.liferay.portal.model.impl.ResourceTypePermissionBaseImpl
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 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.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
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


public ResourceTypePermissionImpl()
Method Detail


public boolean isCompanyScope()


public boolean isGroupScope()

Liferay 6.1.2-ce-ga3