|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portal.service.ResourcePermissionLocalServiceWrapper
public class ResourcePermissionLocalServiceWrapper
This class is a wrapper for ResourcePermissionLocalService
.
ResourcePermissionLocalService
Constructor Summary | |
---|---|
ResourcePermissionLocalServiceWrapper(ResourcePermissionLocalService resourcePermissionLocalService)
|
Method Summary | |
---|---|
void |
addResourcePermission(long companyId,
String name,
int scope,
String primKey,
long roleId,
String actionId)
Grants the role permission at the scope to perform the action on resources of the type. |
ResourcePermission |
addResourcePermission(ResourcePermission resourcePermission)
Adds the resource permission to the database. |
void |
addResourcePermissions(String resourceName,
String roleName,
int scope,
long resourceActionBitwiseValue)
Grants the role permissions at the scope to perform the actions on all resources of the type. |
ResourcePermission |
createResourcePermission(long resourcePermissionId)
Creates a new resource permission with the primary key. |
ResourcePermission |
deleteResourcePermission(long resourcePermissionId)
Deletes the resource permission with the primary key from the database. |
ResourcePermission |
deleteResourcePermission(ResourcePermission resourcePermission)
Deletes the resource permission from the database. |
void |
deleteResourcePermissions(long companyId,
String name,
int scope,
long primKey)
Deletes all resource permissions at the scope to resources of the type. |
void |
deleteResourcePermissions(long companyId,
String name,
int scope,
String primKey)
Deletes all resource permissions at the scope to resources of the type. |
DynamicQuery |
dynamicQuery()
|
List |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows. |
List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows. |
List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows. |
long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows that match the dynamic query. |
ResourcePermission |
fetchResourcePermission(long resourcePermissionId)
|
Map<Long,Set<String>> |
getAvailableResourcePermissionActionIds(long companyId,
String name,
int scope,
String primKey,
long[] roleIds,
Collection<String> actionIds)
|
List<String> |
getAvailableResourcePermissionActionIds(long companyId,
String name,
int scope,
String primKey,
long roleId,
Collection<String> actionIds)
Returns the intersection of action IDs the role has permission at the scope to perform on resources of the type. |
String |
getBeanIdentifier()
Returns the Spring bean ID for this bean. |
PersistedModel |
getPersistedModel(Serializable primaryKeyObj)
|
ResourcePermission |
getResourcePermission(long resourcePermissionId)
Returns the resource permission with the primary key. |
ResourcePermission |
getResourcePermission(long companyId,
String name,
int scope,
String primKey,
long roleId)
Returns the resource permission for the role at the scope to perform the actions on resources of the type. |
List<ResourcePermission> |
getResourcePermissions(int start,
int end)
Returns a range of all the resource permissions. |
List<ResourcePermission> |
getResourcePermissions(long companyId,
String name,
int scope,
String primKey)
Returns all the resource permissions at the scope of the type. |
int |
getResourcePermissionsCount()
Returns the number of resource permissions. |
int |
getResourcePermissionsCount(long companyId,
String name,
int scope,
String primKey)
Returns the number of resource permissions at the scope of the type. |
List<ResourcePermission> |
getResourceResourcePermissions(long companyId,
long groupId,
String name,
String primKey)
Returns the resource permissions that apply to the resource. |
List<ResourcePermission> |
getRoleResourcePermissions(long roleId)
Returns all the resource permissions for the role. |
List<ResourcePermission> |
getRoleResourcePermissions(long roleId,
int[] scopes,
int start,
int end)
Returns a range of all the resource permissions for the role at the scopes. |
List<ResourcePermission> |
getScopeResourcePermissions(int[] scopes)
Returns all the resource permissions where scope = any ?. |
ResourcePermissionLocalService |
getWrappedResourcePermissionLocalService()
Deprecated. Renamed to getWrappedService() |
ResourcePermissionLocalService |
getWrappedService()
|
boolean |
hasActionId(ResourcePermission resourcePermission,
ResourceAction resourceAction)
Returns true if the resource permission grants permission to
perform the resource action. |
boolean |
hasResourcePermission(List<Resource> resources,
long[] roleIds,
String actionId)
Returns true if the roles have permission at the scope to
perform the action on the resources. |
boolean |
hasResourcePermission(long companyId,
String name,
int scope,
String primKey,
long[] roleIds,
String actionId)
Returns true if the roles have permission at the scope to
perform the action on resources of the type. |
boolean |
hasResourcePermission(long companyId,
String name,
int scope,
String primKey,
long roleId,
String actionId)
Returns true if the role has permission at the scope to
perform the action on resources of the type. |
boolean[] |
hasResourcePermissions(long companyId,
String name,
int scope,
String primKey,
long[] roleIds,
String actionId)
|
boolean |
hasScopeResourcePermission(long companyId,
String name,
int scope,
long roleId,
String actionId)
Returns true if the role has permission at the scope to
perform the action on the resource. |
void |
mergePermissions(long fromRoleId,
long toRoleId)
Reassigns all the resource permissions from the source role to the destination role, and deletes the source role. |
void |
reassignPermissions(long resourcePermissionId,
long toRoleId)
Grants the role default permissions to all the resources of the type and at the scope stored in the resource permission, deletes the resource permission, and deletes the resource permission's role if it has no permissions remaining. |
void |
removeResourcePermission(long companyId,
String name,
int scope,
String primKey,
long roleId,
String actionId)
Revokes permission at the scope from the role to perform the action on resources of the type. |
void |
removeResourcePermissions(long companyId,
String name,
int scope,
long roleId,
String actionId)
Revokes all permissions at the scope from the role to perform the action on resources of the type. |
void |
setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean. |
void |
setOwnerResourcePermissions(long companyId,
String name,
int scope,
String primKey,
long roleId,
long ownerId,
String[] actionIds)
Updates the role's permissions at the scope, setting the actions that can be performed on resources of the type, also setting the owner of any newly created resource permissions. |
void |
setResourcePermissions(long companyId,
String name,
int scope,
String primKey,
long roleId,
String[] actionIds)
Updates the role's permissions at the scope, setting the actions that can be performed on resources of the type. |
void |
setResourcePermissions(long companyId,
String name,
int scope,
String primKey,
Map<Long,String[]> roleIdsToActionIds)
Updates the role's permissions at the scope, setting the actions that can be performed on resources of the type. |
void |
setWrappedResourcePermissionLocalService(ResourcePermissionLocalService resourcePermissionLocalService)
Deprecated. Renamed to setWrappedService(com.liferay.portal.service.ResourcePermissionLocalService) |
void |
setWrappedService(ResourcePermissionLocalService resourcePermissionLocalService)
|
ResourcePermission |
updateResourcePermission(ResourcePermission resourcePermission)
Updates the resource permission in the database or adds it if it does not yet exist. |
ResourcePermission |
updateResourcePermission(ResourcePermission resourcePermission,
boolean merge)
Updates the resource permission in the database or adds it if it does not yet exist. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourcePermissionLocalServiceWrapper(ResourcePermissionLocalService resourcePermissionLocalService)
Method Detail |
---|
public ResourcePermission addResourcePermission(ResourcePermission resourcePermission) throws SystemException
addResourcePermission
in interface ResourcePermissionLocalService
resourcePermission
- the resource permission
SystemException
- if a system exception occurredpublic ResourcePermission createResourcePermission(long resourcePermissionId)
createResourcePermission
in interface ResourcePermissionLocalService
resourcePermissionId
- the primary key for the new resource permission
public ResourcePermission deleteResourcePermission(long resourcePermissionId) throws PortalException, SystemException
deleteResourcePermission
in interface ResourcePermissionLocalService
resourcePermissionId
- the primary key of the resource permission
PortalException
- if a resource permission with the primary key could not be found
SystemException
- if a system exception occurredpublic ResourcePermission deleteResourcePermission(ResourcePermission resourcePermission) throws SystemException
deleteResourcePermission
in interface ResourcePermissionLocalService
resourcePermission
- the resource permission
SystemException
- if a system exception occurredpublic DynamicQuery dynamicQuery()
dynamicQuery
in interface ResourcePermissionLocalService
public List dynamicQuery(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery
in interface ResourcePermissionLocalService
dynamicQuery
- the dynamic query
SystemException
- if a system exception occurredpublic List dynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
dynamicQuery
in interface ResourcePermissionLocalService
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)
SystemException
- if a system exception occurredpublic List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
dynamicQuery
in interface ResourcePermissionLocalService
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic long dynamicQueryCount(DynamicQuery dynamicQuery) throws SystemException
dynamicQueryCount
in interface ResourcePermissionLocalService
dynamicQuery
- the dynamic query
SystemException
- if a system exception occurredpublic ResourcePermission fetchResourcePermission(long resourcePermissionId) throws SystemException
fetchResourcePermission
in interface ResourcePermissionLocalService
SystemException
public ResourcePermission getResourcePermission(long resourcePermissionId) throws PortalException, SystemException
getResourcePermission
in interface ResourcePermissionLocalService
resourcePermissionId
- the primary key of the resource permission
PortalException
- if a resource permission with the primary key could not be found
SystemException
- if a system exception occurredpublic PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException, SystemException
getPersistedModel
in interface PersistedModelLocalService
getPersistedModel
in interface ResourcePermissionLocalService
PortalException
SystemException
public List<ResourcePermission> getResourcePermissions(int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
getResourcePermissions
in interface ResourcePermissionLocalService
start
- the lower bound of the range of resource permissionsend
- the upper bound of the range of resource permissions (not inclusive)
SystemException
- if a system exception occurredpublic int getResourcePermissionsCount() throws SystemException
getResourcePermissionsCount
in interface ResourcePermissionLocalService
SystemException
- if a system exception occurredpublic ResourcePermission updateResourcePermission(ResourcePermission resourcePermission) throws SystemException
updateResourcePermission
in interface ResourcePermissionLocalService
resourcePermission
- the resource permission
SystemException
- if a system exception occurredpublic ResourcePermission updateResourcePermission(ResourcePermission resourcePermission, boolean merge) throws SystemException
updateResourcePermission
in interface ResourcePermissionLocalService
resourcePermission
- the resource permissionmerge
- whether to merge the resource permission with the current session. See BatchSession.update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)
for an explanation.
SystemException
- if a system exception occurredpublic String getBeanIdentifier()
getBeanIdentifier
in interface ResourcePermissionLocalService
public void setBeanIdentifier(String beanIdentifier)
setBeanIdentifier
in interface ResourcePermissionLocalService
beanIdentifier
- the Spring bean ID for this beanpublic void addResourcePermission(long companyId, String name, int scope, String primKey, long roleId, String actionId) throws PortalException, SystemException
This method cannot be used to grant individual scope permissions, but is only intended for adding permissions at the company, group, and group-template scopes. For example, this method could be used to grant a company scope permission to edit message board posts.
If a company scope permission is granted to resources that the role already had group scope permissions to, the group scope permissions are deleted. Likewise, if a group scope permission is granted to resources that the role already had company scope permissions to, the company scope permissions are deleted. Be aware that this latter behavior can result in an overall reduction in permissions for the role.
Depending on the scope, the value of primKey
will have
different meanings. For more information, see ResourcePermissionImpl
.
addResourcePermission
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scope. This method only supports company, group, and
group-template scope.primKey
- the primary keyroleId
- the primary key of the roleactionId
- the action ID
PortalException
- if scope was set to individual scope or if a role
with the primary key or a resource action with the name and
action ID could not be found
SystemException
- if a system exception occurredpublic void addResourcePermissions(String resourceName, String roleName, int scope, long resourceActionBitwiseValue) throws SystemException
This method should only be used to add default permissions to existing resources en masse during upgrades or while verifying permissions. For example, this method could be used to grant site members individual scope permissions to view all blog posts.
addResourcePermissions
in interface ResourcePermissionLocalService
resourceName
- the resource's name, which can be either a class
name or a portlet IDroleName
- the role's namescope
- the scoperesourceActionBitwiseValue
- the bitwise IDs of the actions
SystemException
- if a system exception occurredpublic void deleteResourcePermissions(long companyId, String name, int scope, long primKey) throws PortalException, SystemException
removeResourcePermission
methods, as its purpose is very
different. This method should only be used for deleting resource
permissions that refer to a resource when that resource is deleted. For
example this method could be used to delete all individual scope
permissions to a blog post when it is deleted.
Depending on the scope, the value of primKey
will have
different meanings. For more information, see ResourcePermissionImpl
.
deleteResourcePermissions
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scopeprimKey
- the primary key
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic void deleteResourcePermissions(long companyId, String name, int scope, String primKey) throws PortalException, SystemException
removeResourcePermission
methods, as its purpose is very
different. This method should only be used for deleting resource
permissions that refer to a resource when that resource is deleted. For
example this method could be used to delete all individual scope
permissions to a blog post when it is deleted.
Depending on the scope, the value of primKey
will have
different meanings. For more information, see ResourcePermissionImpl
.
deleteResourcePermissions
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scopeprimKey
- the primary key
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic List<String> getAvailableResourcePermissionActionIds(long companyId, String name, int scope, String primKey, long roleId, Collection<String> actionIds) throws PortalException, SystemException
getAvailableResourcePermissionActionIds
in interface ResourcePermissionLocalService
companyId
- he primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scopeprimKey
- the primary keyroleId
- the primary key of the roleactionIds
- the action IDs
PortalException
- if a resouce action could not be found for any
one of the actions on the resource
SystemException
- if a system exception occurredpublic Map<Long,Set<String>> getAvailableResourcePermissionActionIds(long companyId, String name, int scope, String primKey, long[] roleIds, Collection<String> actionIds) throws PortalException, SystemException
getAvailableResourcePermissionActionIds
in interface ResourcePermissionLocalService
PortalException
SystemException
public ResourcePermission getResourcePermission(long companyId, String name, int scope, String primKey, long roleId) throws PortalException, SystemException
getResourcePermission
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scopeprimKey
- the primary keyroleId
- the primary key of the role
PortalException
- if no matching resources could be found
SystemException
- if a system exception occurredpublic List<ResourcePermission> getResourcePermissions(long companyId, String name, int scope, String primKey) throws SystemException
getResourcePermissions
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scopeprimKey
- the primary key
SystemException
- if a system exception occurredpublic int getResourcePermissionsCount(long companyId, String name, int scope, String primKey) throws SystemException
getResourcePermissionsCount
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scopeprimKey
- the primary key
SystemException
- if a system exception occurredpublic List<ResourcePermission> getResourceResourcePermissions(long companyId, long groupId, String name, String primKey) throws SystemException
getResourceResourcePermissions
in interface ResourcePermissionLocalService
companyId
- the primary key of the resource's companygroupId
- the primary key of the resource's groupname
- the resource's name, which can be either a class name or a
portlet IDprimKey
- the primary key of the resource
SystemException
- if a system exception occurredpublic List<ResourcePermission> getRoleResourcePermissions(long roleId) throws SystemException
getRoleResourcePermissions
in interface ResourcePermissionLocalService
roleId
- the primary key of the role
SystemException
- if a system exception occurredpublic List<ResourcePermission> getRoleResourcePermissions(long roleId, int[] scopes, int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end -
start
instances. start
and end
are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full
result set.
getRoleResourcePermissions
in interface ResourcePermissionLocalService
roleId
- the primary key of the rolescopes
- the scopesstart
- the lower bound of the range of resultsend
- the upper bound of the range of results (not inclusive)
SystemException
- if a system exception occurredpublic List<ResourcePermission> getScopeResourcePermissions(int[] scopes) throws SystemException
Useful when paginating results. Returns a maximum of end -
start
instances. start
and end
are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full
result set.
getScopeResourcePermissions
in interface ResourcePermissionLocalService
scopes
- the scopes
SystemException
- if a system exception occurredpublic boolean hasActionId(ResourcePermission resourcePermission, ResourceAction resourceAction)
true
if the resource permission grants permission to
perform the resource action. Note that this method does not ensure that
the resource permission refers to the same type of resource as the
resource action.
hasActionId
in interface ResourcePermissionLocalService
resourcePermission
- the resource permissionresourceAction
- the resource action
true
if the resource permission grants permission to
perform the resource actionpublic boolean hasResourcePermission(List<Resource> resources, long[] roleIds, String actionId) throws PortalException, SystemException
true
if the roles have permission at the scope to
perform the action on the resources.
Depending on the scope, the value of primKey
will have
different meanings. For more information, see ResourcePermissionImpl
.
hasResourcePermission
in interface ResourcePermissionLocalService
resources
- the resourcesroleIds
- the primary keys of the rolesactionId
- the action ID
true
if any one of the roles has permission to
perform the action on any one of the resources;
false
otherwise
PortalException
- if any one of the roles with the primary keys
could not be found or if a resource action with the name and
action ID could not be found
SystemException
- if a system exception occurredpublic boolean hasResourcePermission(long companyId, String name, int scope, String primKey, long roleId, String actionId) throws PortalException, SystemException
true
if the role has permission at the scope to
perform the action on resources of the type.
Depending on the scope, the value of primKey
will have
different meanings. For more information, see ResourcePermissionImpl
.
hasResourcePermission
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scopeprimKey
- the primary keyroleId
- the primary key of the roleactionId
- the action ID
true
if the role has permission to perform the
action on the resource; false
otherwise
PortalException
- if a role with the primary key or a resource
action with the name and action ID could not be found
SystemException
- if a system exception occurredpublic boolean hasResourcePermission(long companyId, String name, int scope, String primKey, long[] roleIds, String actionId) throws PortalException, SystemException
true
if the roles have permission at the scope to
perform the action on resources of the type.
Depending on the scope, the value of primKey
will have
different meanings. For more information, see ResourcePermissionImpl
.
hasResourcePermission
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scopeprimKey
- the primary keyroleIds
- the primary keys of the rolesactionId
- the action ID
true
if any one of the roles has permission to
perform the action on the resource; false
otherwise
PortalException
- if any one of the roles with the primary keys
could not be found or if a resource action with the name and
action ID could not be found
SystemException
- if a system exception occurredpublic boolean[] hasResourcePermissions(long companyId, String name, int scope, String primKey, long[] roleIds, String actionId) throws PortalException, SystemException
hasResourcePermissions
in interface ResourcePermissionLocalService
PortalException
SystemException
public boolean hasScopeResourcePermission(long companyId, String name, int scope, long roleId, String actionId) throws PortalException, SystemException
true
if the role has permission at the scope to
perform the action on the resource.
Depending on the scope, the value of primKey
will have
different meanings. For more information, see ResourcePermissionImpl
.
hasScopeResourcePermission
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scoperoleId
- the primary key of the roleactionId
- the action ID
true
if the role has permission to perform the
action on the resource; false
otherwise
PortalException
- if a role with the primary key or a resource
action with the name and action ID could not be found
SystemException
- if a system exception occurredpublic void mergePermissions(long fromRoleId, long toRoleId) throws PortalException, SystemException
mergePermissions
in interface ResourcePermissionLocalService
fromRoleId
- the primary key of the source roletoRoleId
- the primary key of the destination role
PortalException
- if a role with the primary key could not be found
SystemException
- if a system exception occurredpublic void reassignPermissions(long resourcePermissionId, long toRoleId) throws PortalException, SystemException
reassignPermissions
in interface ResourcePermissionLocalService
resourcePermissionId
- the primary key of the resource permissiontoRoleId
- the primary key of the role
PortalException
- if a resource permission or role with the primary
key could not be found
SystemException
- if a system exception occurredpublic void removeResourcePermission(long companyId, String name, int scope, String primKey, long roleId, String actionId) throws PortalException, SystemException
Depending on the scope, the value of primKey
will have
different meanings. For more information, see ResourcePermissionImpl
.
removeResourcePermission
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scopeprimKey
- the primary keyroleId
- the primary key of the roleactionId
- the action ID
PortalException
- if a role with the primary key or a resource
action with the name and action ID could not be found
SystemException
- if a system exception occurredpublic void removeResourcePermissions(long companyId, String name, int scope, long roleId, String actionId) throws PortalException, SystemException
removeResourcePermissions
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scoperoleId
- the primary key of the roleactionId
- the action ID
PortalException
- if a role with the primary key or a resource
action with the name and action ID could not be found
SystemException
- if a system exception occurredpublic void setOwnerResourcePermissions(long companyId, String name, int scope, String primKey, long roleId, long ownerId, String[] actionIds) throws PortalException, SystemException
This method can be used to set permissions at any scope, but it is generally only used at the individual scope. For example, it could be used to set the guest permissions on a blog post.
Depending on the scope, the value of primKey
will have
different meanings. For more information, see ResourcePermissionImpl
.
setOwnerResourcePermissions
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scopeprimKey
- the primary keyroleId
- the primary key of the roleownerId
- the primary key of the owner (generally the user that
created the resource)actionIds
- the action IDs of the actions
PortalException
- if a role with the primary key or a resource
action with the name and action ID could not be found
SystemException
- if a system exception occurredpublic void setResourcePermissions(long companyId, String name, int scope, String primKey, long roleId, String[] actionIds) throws PortalException, SystemException
This method can be used to set permissions at any scope, but it is generally only used at the individual scope. For example, it could be used to set the guest permissions on a blog post.
Depending on the scope, the value of primKey
will have
different meanings. For more information, see ResourcePermissionImpl
.
setResourcePermissions
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scopeprimKey
- the primary keyroleId
- the primary key of the roleactionIds
- the action IDs of the actions
PortalException
- if a role with the primary key or a resource
action with the name and action ID could not be found
SystemException
- if a system exception occurredpublic void setResourcePermissions(long companyId, String name, int scope, String primKey, Map<Long,String[]> roleIdsToActionIds) throws PortalException, SystemException
This method can be used to set permissions at any scope, but it is generally only used at the individual scope. For example, it could be used to set the guest permissions on a blog post.
Depending on the scope, the value of primKey
will have
different meanings. For more information, see ResourcePermissionImpl
.
setResourcePermissions
in interface ResourcePermissionLocalService
companyId
- the primary key of the companyname
- the resource's name, which can be either a class name or a
portlet IDscope
- the scopeprimKey
- the primary keyroleIdsToActionIds
- a map of role IDs to action IDs of the actions
PortalException
- if a role with the primary key or a resource
action with the name and action ID could not be found
SystemException
- if a system exception occurredpublic ResourcePermissionLocalService getWrappedResourcePermissionLocalService()
getWrappedService()
public void setWrappedResourcePermissionLocalService(ResourcePermissionLocalService resourcePermissionLocalService)
setWrappedService(com.liferay.portal.service.ResourcePermissionLocalService)
public ResourcePermissionLocalService getWrappedService()
getWrappedService
in interface ServiceWrapper<ResourcePermissionLocalService>
public void setWrappedService(ResourcePermissionLocalService resourcePermissionLocalService)
setWrappedService
in interface ServiceWrapper<ResourcePermissionLocalService>
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |