|
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.PermissionLocalServiceWrapper
public class PermissionLocalServiceWrapper
This class is a wrapper for PermissionLocalService
.
PermissionLocalService
Constructor Summary | |
---|---|
PermissionLocalServiceWrapper(PermissionLocalService permissionLocalService)
|
Method Summary | |
---|---|
void |
addGroupPermission(long groupId,
long permissionId)
|
void |
addGroupPermission(long groupId,
Permission permission)
|
void |
addGroupPermissions(long groupId,
List<Permission> Permissions)
|
void |
addGroupPermissions(long groupId,
long[] permissionIds)
|
Permission |
addPermission(long companyId,
String actionId,
long resourceId)
Adds a permission to perform the action on the resource. |
Permission |
addPermission(Permission permission)
Adds the permission to the database. |
List<Permission> |
addPermissions(long companyId,
List<String> actionIds,
long resourceId)
Adds permissions to perform the actions on the resource. |
List<Permission> |
addPermissions(long companyId,
String name,
long resourceId,
boolean portletActions)
Adds permissions to perform either the portlet resource actions or model resource actions on the resource. |
void |
addRolePermission(long roleId,
long permissionId)
|
void |
addRolePermission(long roleId,
Permission permission)
|
void |
addRolePermissions(long roleId,
List<Permission> Permissions)
|
void |
addRolePermissions(long roleId,
long[] permissionIds)
|
void |
addUserPermission(long userId,
long permissionId)
|
void |
addUserPermission(long userId,
Permission permission)
|
void |
addUserPermissions(long userId,
List<Permission> Permissions)
|
void |
addUserPermissions(long userId,
long[] permissionIds)
|
void |
addUserPermissions(long userId,
String[] actionIds,
long resourceId)
Adds user permissions to perform the actions on the resource. |
void |
checkPermissions(String name,
List<String> actionIds)
Checks to see if the actions are permitted on the named resource. |
void |
clearGroupPermissions(long groupId)
|
void |
clearRolePermissions(long roleId)
|
void |
clearUserPermissions(long userId)
|
Permission |
createPermission(long permissionId)
Creates a new permission with the primary key. |
void |
deleteGroupPermission(long groupId,
long permissionId)
|
void |
deleteGroupPermission(long groupId,
Permission permission)
|
void |
deleteGroupPermissions(long groupId,
List<Permission> Permissions)
|
void |
deleteGroupPermissions(long groupId,
long[] permissionIds)
|
Permission |
deletePermission(long permissionId)
Deletes the permission with the primary key from the database. |
Permission |
deletePermission(Permission permission)
Deletes the permission from the database. |
void |
deleteRolePermission(long roleId,
long permissionId)
|
void |
deleteRolePermission(long roleId,
Permission permission)
|
void |
deleteRolePermissions(long roleId,
List<Permission> Permissions)
|
void |
deleteRolePermissions(long roleId,
long[] permissionIds)
|
void |
deleteUserPermission(long userId,
long permissionId)
|
void |
deleteUserPermission(long userId,
Permission permission)
|
void |
deleteUserPermissions(long userId,
List<Permission> Permissions)
|
void |
deleteUserPermissions(long userId,
long[] permissionIds)
|
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. |
Permission |
fetchPermission(long permissionId)
|
List<String> |
getActions(List<Permission> permissions)
Returns the IDs of all the actions belonging to the permissions. |
String |
getBeanIdentifier()
Returns the Spring bean ID for this bean. |
List<Permission> |
getGroupPermissions(long groupId)
|
List<Permission> |
getGroupPermissions(long groupId,
int start,
int end)
|
List<Permission> |
getGroupPermissions(long groupId,
int start,
int end,
OrderByComparator orderByComparator)
|
List<Permission> |
getGroupPermissions(long groupId,
long resourceId)
Returns all the group's permissions on the resource. |
List<Permission> |
getGroupPermissions(long groupId,
long companyId,
String name,
int scope,
String primKey)
Returns all the group's permissions on the named resource with the scope and primKey. |
int |
getGroupPermissionsCount(long groupId)
|
long |
getLatestPermissionId()
Returns the primary key of the latest permission created. |
List<Permission> |
getOrgGroupPermissions(long organizationId,
long groupId,
long resourceId)
Returns all the permissions of the organization's group with respect to the resource. |
Permission |
getPermission(long permissionId)
Returns the permission with the primary key. |
List<Permission> |
getPermissions(int start,
int end)
Returns a range of all the permissions. |
List<Permission> |
getPermissions(long companyId,
String[] actionIds,
long resourceId)
Returns all the permissions to perform the actions on the resource, creating new permissions for any permissions not found. |
int |
getPermissionsCount()
Returns the number of permissions. |
PersistedModel |
getPersistedModel(Serializable primaryKeyObj)
|
List<Permission> |
getRolePermissions(long roleId)
|
List<Permission> |
getRolePermissions(long roleId,
int[] scopes)
|
List<Permission> |
getRolePermissions(long roleId,
int start,
int end)
|
List<Permission> |
getRolePermissions(long roleId,
int start,
int end,
OrderByComparator orderByComparator)
|
List<Permission> |
getRolePermissions(long roleId,
long resourceId)
Returns all the role's permissions on the resource. |
int |
getRolePermissionsCount(long roleId)
|
List<Permission> |
getUserPermissions(long userId)
|
List<Permission> |
getUserPermissions(long userId,
int start,
int end)
|
List<Permission> |
getUserPermissions(long userId,
int start,
int end,
OrderByComparator orderByComparator)
|
List<Permission> |
getUserPermissions(long userId,
long resourceId)
Returns all the user's permissions on the resource. |
List<Permission> |
getUserPermissions(long userId,
long companyId,
String name,
int scope,
String primKey)
Returns all the user's permissions on the named resource with the scope and primKey. |
int |
getUserPermissionsCount(long userId)
|
PermissionLocalService |
getWrappedPermissionLocalService()
Deprecated. Renamed to getWrappedService() |
PermissionLocalService |
getWrappedService()
|
boolean |
hasGroupPermission(long groupId,
long permissionId)
|
boolean |
hasGroupPermission(long groupId,
String actionId,
long resourceId)
Returns true if the group has permission to perform the
action on the resource. |
boolean |
hasGroupPermissions(long groupId)
|
boolean |
hasRolePermission(long roleId,
long permissionId)
|
boolean |
hasRolePermission(long roleId,
long companyId,
String name,
int scope,
String actionId)
Returns true if the role has permission to perform the
action on the named resource with the scope. |
boolean |
hasRolePermission(long roleId,
long companyId,
String name,
int scope,
String primKey,
String actionId)
Returns true if the role has permission to perform the
action on the named resource with the scope and primKey. |
boolean |
hasRolePermissions(long roleId)
|
boolean |
hasUserPermission(long userId,
long permissionId)
|
boolean |
hasUserPermission(long userId,
String actionId,
long resourceId)
Returns true if the user has permission to perform the
action on the resource. |
boolean |
hasUserPermissions(long userId)
|
boolean |
hasUserPermissions(long userId,
long groupId,
List<Resource> resources,
String actionId,
PermissionCheckerBag permissionCheckerBag)
Returns true if the user has permission to perform the
action on the resources. |
void |
setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean. |
void |
setContainerResourcePermissions(String name,
String roleName,
String actionId)
Sets the container wide permissions of either the role or the default user of each company to perform the actions on the named resource. |
void |
setGroupPermissions(long groupId,
long[] permissionIds)
|
void |
setGroupPermissions(long groupId,
String[] actionIds,
long resourceId)
Sets the group's permissions to perform the actions on the resource, replacing the group's existing permissions on the resource. |
void |
setGroupPermissions(String className,
String classPK,
long groupId,
String[] actionIds,
long resourceId)
Sets the entity's group permissions to perform the actions on the resource, replacing the entity's existing group permissions on the resource. |
void |
setOrgGroupPermissions(long organizationId,
long groupId,
String[] actionIds,
long resourceId)
Sets the organization's group permissions to perform the actions on the resource, replacing the organization's existing group permissions on the resource. |
void |
setRolePermission(long roleId,
long companyId,
String name,
int scope,
String primKey,
String actionId)
Sets the role's permissions to perform the action on the named resource, replacing the role's existing permissions on the resource. |
void |
setRolePermissions(long roleId,
long[] permissionIds)
|
void |
setRolePermissions(long roleId,
long companyId,
String name,
int scope,
String primKey,
String[] actionIds)
Sets the role's permissions to perform the actions on the named resource, replacing the role's existing permission for each of these actions on the resource. |
void |
setRolePermissions(long roleId,
String[] actionIds,
long resourceId)
Sets the role's permissions to perform the actions on the resource, replacing the role's existing permissions on the resource. |
void |
setRolesPermissions(long companyId,
Map<Long,String[]> roleIdsToActionIds,
long resourceId)
Sets the permissions of each role to perform respective actions on the resource, replacing the existing permissions of each role on the resource. |
void |
setRolesPermissions(long companyId,
Map<Long,String[]> roleIdsToActionIds,
String name,
int scope,
String primKey)
Sets the permissions of each role to perform respective actions on the named resource, replacing the existing permissions of each role on the resource. |
void |
setUserPermissions(long userId,
long[] permissionIds)
|
void |
setUserPermissions(long userId,
String[] actionIds,
long resourceId)
Sets the user's permissions to perform the actions on the resource, replacing the user's existing permissions on the resource. |
void |
setWrappedPermissionLocalService(PermissionLocalService permissionLocalService)
Deprecated. Renamed to setWrappedService(com.liferay.portal.service.PermissionLocalService) |
void |
setWrappedService(PermissionLocalService permissionLocalService)
|
void |
unsetRolePermission(long roleId,
long permissionId)
Removes the permission from the role. |
void |
unsetRolePermission(long roleId,
long companyId,
String name,
int scope,
String primKey,
String actionId)
Removes the role's permissions to perform the action on the named resource with the scope and primKey. |
void |
unsetRolePermissions(long roleId,
long companyId,
String name,
int scope,
String actionId)
Removes the role's permissions to perform the action on the named resource. |
void |
unsetUserPermissions(long userId,
String[] actionIds,
long resourceId)
Removes the user's permissions to perform the actions on the resource. |
Permission |
updatePermission(Permission permission)
Updates the permission in the database or adds it if it does not yet exist. |
Permission |
updatePermission(Permission permission,
boolean merge)
Updates the 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 PermissionLocalServiceWrapper(PermissionLocalService permissionLocalService)
Method Detail |
---|
public Permission addPermission(Permission permission) throws SystemException
addPermission
in interface PermissionLocalService
permission
- the permission
SystemException
- if a system exception occurredpublic Permission createPermission(long permissionId)
createPermission
in interface PermissionLocalService
permissionId
- the primary key for the new permission
public Permission deletePermission(long permissionId) throws PortalException, SystemException
deletePermission
in interface PermissionLocalService
permissionId
- the primary key of the permission
PortalException
- if a permission with the primary key could not be found
SystemException
- if a system exception occurredpublic Permission deletePermission(Permission permission) throws SystemException
deletePermission
in interface PermissionLocalService
permission
- the permission
SystemException
- if a system exception occurredpublic DynamicQuery dynamicQuery()
dynamicQuery
in interface PermissionLocalService
public List dynamicQuery(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery
in interface PermissionLocalService
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 PermissionLocalService
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 PermissionLocalService
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 PermissionLocalService
dynamicQuery
- the dynamic query
SystemException
- if a system exception occurredpublic Permission fetchPermission(long permissionId) throws SystemException
fetchPermission
in interface PermissionLocalService
SystemException
public Permission getPermission(long permissionId) throws PortalException, SystemException
getPermission
in interface PermissionLocalService
permissionId
- the primary key of the permission
PortalException
- if a 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 PermissionLocalService
getPersistedModel
in interface PersistedModelLocalService
PortalException
SystemException
public List<Permission> getPermissions(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.
getPermissions
in interface PermissionLocalService
start
- the lower bound of the range of permissionsend
- the upper bound of the range of permissions (not inclusive)
SystemException
- if a system exception occurredpublic int getPermissionsCount() throws SystemException
getPermissionsCount
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic Permission updatePermission(Permission permission) throws SystemException
updatePermission
in interface PermissionLocalService
permission
- the permission
SystemException
- if a system exception occurredpublic Permission updatePermission(Permission permission, boolean merge) throws SystemException
updatePermission
in interface PermissionLocalService
permission
- the permissionmerge
- whether to merge the 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 void addGroupPermission(long groupId, long permissionId) throws SystemException
addGroupPermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void addGroupPermission(long groupId, Permission permission) throws SystemException
addGroupPermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void addGroupPermissions(long groupId, long[] permissionIds) throws SystemException
addGroupPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void addGroupPermissions(long groupId, List<Permission> Permissions) throws SystemException
addGroupPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void clearGroupPermissions(long groupId) throws SystemException
clearGroupPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void deleteGroupPermission(long groupId, long permissionId) throws SystemException
deleteGroupPermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void deleteGroupPermission(long groupId, Permission permission) throws SystemException
deleteGroupPermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void deleteGroupPermissions(long groupId, long[] permissionIds) throws SystemException
deleteGroupPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void deleteGroupPermissions(long groupId, List<Permission> Permissions) throws SystemException
deleteGroupPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic List<Permission> getGroupPermissions(long groupId) throws SystemException
getGroupPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic List<Permission> getGroupPermissions(long groupId, int start, int end) throws SystemException
getGroupPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic List<Permission> getGroupPermissions(long groupId, int start, int end, OrderByComparator orderByComparator) throws SystemException
getGroupPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic int getGroupPermissionsCount(long groupId) throws SystemException
getGroupPermissionsCount
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic boolean hasGroupPermission(long groupId, long permissionId) throws SystemException
hasGroupPermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic boolean hasGroupPermissions(long groupId) throws SystemException
hasGroupPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void setGroupPermissions(long groupId, long[] permissionIds) throws SystemException
setGroupPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void addRolePermission(long roleId, long permissionId) throws SystemException
addRolePermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void addRolePermission(long roleId, Permission permission) throws SystemException
addRolePermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void addRolePermissions(long roleId, long[] permissionIds) throws SystemException
addRolePermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void addRolePermissions(long roleId, List<Permission> Permissions) throws SystemException
addRolePermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void clearRolePermissions(long roleId) throws SystemException
clearRolePermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void deleteRolePermission(long roleId, long permissionId) throws SystemException
deleteRolePermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void deleteRolePermission(long roleId, Permission permission) throws SystemException
deleteRolePermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void deleteRolePermissions(long roleId, long[] permissionIds) throws SystemException
deleteRolePermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void deleteRolePermissions(long roleId, List<Permission> Permissions) throws SystemException
deleteRolePermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic List<Permission> getRolePermissions(long roleId) throws SystemException
getRolePermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic List<Permission> getRolePermissions(long roleId, int start, int end) throws SystemException
getRolePermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic List<Permission> getRolePermissions(long roleId, int start, int end, OrderByComparator orderByComparator) throws SystemException
getRolePermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic int getRolePermissionsCount(long roleId) throws SystemException
getRolePermissionsCount
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic boolean hasRolePermission(long roleId, long permissionId) throws SystemException
hasRolePermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic boolean hasRolePermissions(long roleId) throws SystemException
hasRolePermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void setRolePermissions(long roleId, long[] permissionIds) throws SystemException
setRolePermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void addUserPermission(long userId, long permissionId) throws SystemException
addUserPermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void addUserPermission(long userId, Permission permission) throws SystemException
addUserPermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void addUserPermissions(long userId, long[] permissionIds) throws SystemException
addUserPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void addUserPermissions(long userId, List<Permission> Permissions) throws SystemException
addUserPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void clearUserPermissions(long userId) throws SystemException
clearUserPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void deleteUserPermission(long userId, long permissionId) throws SystemException
deleteUserPermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void deleteUserPermission(long userId, Permission permission) throws SystemException
deleteUserPermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void deleteUserPermissions(long userId, long[] permissionIds) throws SystemException
deleteUserPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void deleteUserPermissions(long userId, List<Permission> Permissions) throws SystemException
deleteUserPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic List<Permission> getUserPermissions(long userId) throws SystemException
getUserPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic List<Permission> getUserPermissions(long userId, int start, int end) throws SystemException
getUserPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic List<Permission> getUserPermissions(long userId, int start, int end, OrderByComparator orderByComparator) throws SystemException
getUserPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic int getUserPermissionsCount(long userId) throws SystemException
getUserPermissionsCount
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic boolean hasUserPermission(long userId, long permissionId) throws SystemException
hasUserPermission
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic boolean hasUserPermissions(long userId) throws SystemException
hasUserPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic void setUserPermissions(long userId, long[] permissionIds) throws SystemException
setUserPermissions
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic String getBeanIdentifier()
getBeanIdentifier
in interface PermissionLocalService
public void setBeanIdentifier(String beanIdentifier)
setBeanIdentifier
in interface PermissionLocalService
beanIdentifier
- the Spring bean ID for this beanpublic Permission addPermission(long companyId, String actionId, long resourceId) throws SystemException
This method will retrieve the permission of the company, action, and resource with the primary keys. The method creates the permission if it fails to retrieve it.
addPermission
in interface PermissionLocalService
companyId
- the primary key of the companyactionId
- the action's IDresourceId
- the primary key of the resource
SystemException
- if a system exception occurredpublic List<Permission> addPermissions(long companyId, List<String> actionIds, long resourceId) throws SystemException
This method will retrieve the permissions of the company, actions, and resource with the primary keys. The method creates any permissions it fails to retrieve.
addPermissions
in interface PermissionLocalService
companyId
- the primary key of the companyactionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
SystemException
- if a system exception occurredpublic List<Permission> addPermissions(long companyId, String name, long resourceId, boolean portletActions) throws SystemException
This method will retrieve the permissions of the company, actions, and resource with the primary keys. The method creates any permissions it fails to retrieve.
addPermissions
in interface PermissionLocalService
companyId
- the primary key of the companyname
- the resource nameresourceId
- the primary key of the resourceportletActions
- whether to retrieve the action primary keys from
the portlet or the model resource
SystemException
- if a system exception occurredpublic void addUserPermissions(long userId, String[] actionIds, long resourceId) throws PortalException, SystemException
addUserPermissions
in interface PermissionLocalService
userId
- the primary key of the useractionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
PortalException
- if a user with the primary key could not be found
SystemException
- if a system exception occurredpublic void checkPermissions(String name, List<String> actionIds) throws PortalException, SystemException
checkPermissions
in interface PermissionLocalService
name
- the resource nameactionIds
- the primary keys of the actions
PortalException
- if the resource company or name could not be
found or were invalid
SystemException
- if a system exception occurredpublic List<String> getActions(List<Permission> permissions)
getActions
in interface PermissionLocalService
permissions
- the permissions
public List<Permission> getGroupPermissions(long groupId, long resourceId) throws SystemException
getGroupPermissions
in interface PermissionLocalService
groupId
- the primary key of the groupresourceId
- the primary key of the resource
SystemException
- if a system exception occurredpublic List<Permission> getGroupPermissions(long groupId, long companyId, String name, int scope, String primKey) throws SystemException
getGroupPermissions
in interface PermissionLocalService
groupId
- the primary key of the groupcompanyId
- the primary key of the companyname
- the resource namescope
- the resource scopeprimKey
- the resource primKey
SystemException
- if a system exception occurredpublic long getLatestPermissionId() throws SystemException
getLatestPermissionId
in interface PermissionLocalService
SystemException
- if a system exception occurredpublic List<Permission> getOrgGroupPermissions(long organizationId, long groupId, long resourceId) throws SystemException
getOrgGroupPermissions
in interface PermissionLocalService
organizationId
- the primary key of the organizationgroupId
- the primary key of the groupresourceId
- the primary key of the resource
SystemException
- if a system exception occurredpublic List<Permission> getPermissions(long companyId, String[] actionIds, long resourceId) throws SystemException
getPermissions
in interface PermissionLocalService
companyId
- the primary key of the companyactionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
SystemException
- if a system exception occurredaddPermission(long, String, long)
public List<Permission> getRolePermissions(long roleId, int[] scopes) throws SystemException
getRolePermissions
in interface PermissionLocalService
SystemException
public List<Permission> getRolePermissions(long roleId, long resourceId) throws SystemException
getRolePermissions
in interface PermissionLocalService
roleId
- the primary key of the roleresourceId
- the primary key of the resource
SystemException
- if a system exception occurredpublic List<Permission> getUserPermissions(long userId, long resourceId) throws SystemException
getUserPermissions
in interface PermissionLocalService
userId
- the primary key of the userresourceId
- the primary key of the resource
SystemException
- if a system exception occurredpublic List<Permission> getUserPermissions(long userId, long companyId, String name, int scope, String primKey) throws SystemException
getUserPermissions
in interface PermissionLocalService
userId
- the primary key of the usercompanyId
- the primary key of the companyname
- the resource namescope
- the resource scopeprimKey
- the resource primKey
SystemException
- if a system exception occurredpublic boolean hasGroupPermission(long groupId, String actionId, long resourceId) throws SystemException
true
if the group has permission to perform the
action on the resource.
hasGroupPermission
in interface PermissionLocalService
groupId
- the primary key of the groupactionId
- the action's IDresourceId
- the primary key of the resource
true
if the group has permission to perform the
action on the resource; false
otherwise
SystemException
- if a system exception occurredpublic boolean hasRolePermission(long roleId, long companyId, String name, int scope, String actionId) throws SystemException
true
if the role has permission to perform the
action on the named resource with the scope.
hasRolePermission
in interface PermissionLocalService
roleId
- the primary key of the rolecompanyId
- the primary key of the companyname
- the resource namescope
- the resource scopeactionId
- the action's ID
true
if the role has permission to perform the
action on the named resource with the scope; false
otherwise
SystemException
- if a system exception occurredpublic boolean hasRolePermission(long roleId, long companyId, String name, int scope, String primKey, String actionId) throws SystemException
true
if the role has permission to perform the
action on the named resource with the scope and primKey.
hasRolePermission
in interface PermissionLocalService
roleId
- the primary key of the rolecompanyId
- the primary key of the companyname
- the resource namescope
- the resource scopeprimKey
- the resource primKeyactionId
- the action's ID
true
if the role has permission to perform the
action on the named resource with the scope and primKey;
false
otherwise
SystemException
- if a system exception occurredpublic boolean hasUserPermission(long userId, String actionId, long resourceId) throws SystemException
true
if the user has permission to perform the
action on the resource.
hasUserPermission
in interface PermissionLocalService
userId
- the primary key of the useractionId
- the action's IDresourceId
- the primary key of the resource
true
if the user has permission to perform the
action on the resource; false
otherwise
SystemException
- if a system exception occurredpublic boolean hasUserPermissions(long userId, long groupId, List<Resource> resources, String actionId, PermissionCheckerBag permissionCheckerBag) throws PortalException, SystemException
true
if the user has permission to perform the
action on the resources.
This method does not support resources managed by the resource block system.
hasUserPermissions
in interface PermissionLocalService
userId
- the primary key of the usergroupId
- the primary key of the group containing the resourceresources
- representations of the resource at each scope level
returned by AdvancedPermissionChecker.getResources(
long, long, String, String, String)
actionId
- the action's IDpermissionCheckerBag
- the permission checker bag
true
if the user has permission to perform the
action on the resources; false
otherwise
PortalException
- if a resource action based on any one of the
resources and the action ID could not be found
SystemException
- if a system exception occurredpublic void setContainerResourcePermissions(String name, String roleName, String actionId) throws PortalException, SystemException
setContainerResourcePermissions
in interface PermissionLocalService
name
- the resource nameroleName
- the role name. Supported role names include RoleConstants.ORGANIZATION_USER
, RoleConstants.OWNER
, and RoleConstants.SITE_MEMBER
.actionId
- the action's ID
PortalException
- if a matching role could not be found or if a
default user for the company could not be found
SystemException
- if a system exception occurredpublic void setGroupPermissions(long groupId, String[] actionIds, long resourceId) throws PortalException, SystemException
setGroupPermissions
in interface PermissionLocalService
groupId
- the primary key of the groupactionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
PortalException
- if a group with the primary key could not be
found
SystemException
- if a system exception occurredpublic void setGroupPermissions(String className, String classPK, long groupId, String[] actionIds, long resourceId) throws PortalException, SystemException
Organization
and UserGroup
class entities are supported.
setGroupPermissions
in interface PermissionLocalService
className
- the class name of an organization or user groupclassPK
- the primary key of the classgroupId
- the primary key of the groupactionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
PortalException
- if an entity with the class name and primary key
could not be found or if the entity's associated group could not
be found
SystemException
- if a system exception occurredpublic void setOrgGroupPermissions(long organizationId, long groupId, String[] actionIds, long resourceId) throws PortalException, SystemException
setOrgGroupPermissions
in interface PermissionLocalService
organizationId
- the primary key of the organizationgroupId
- the primary key of the group in which to scope the
permissionsactionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
PortalException
- if an organization with the primary key could not
be found
SystemException
- if a system exception occurredpublic void setRolePermission(long roleId, long companyId, String name, int scope, String primKey, String actionId) throws PortalException, SystemException
setRolePermission
in interface PermissionLocalService
roleId
- the primary key of the rolecompanyId
- the primary key of the companyname
- the resource namescope
- the resource scopeprimKey
- the resource primKeyactionId
- the action's ID
PortalException
- if the scope was ResourceConstants.SCOPE_INDIVIDUAL
SystemException
- if a system exception occurredpublic void setRolePermissions(long roleId, long companyId, String name, int scope, String primKey, String[] actionIds) throws PortalException, SystemException
setRolePermissions
in interface PermissionLocalService
roleId
- the primary key of the rolecompanyId
- the primary key of the companyname
- the resource namescope
- the resource scopeprimKey
- the resource primKeyactionIds
- the primary keys of the actions
PortalException
- if the scope was ResourceConstants.SCOPE_INDIVIDUAL
SystemException
- if a system exception occurredpublic void setRolePermissions(long roleId, String[] actionIds, long resourceId) throws PortalException, SystemException
setRolePermissions
in interface PermissionLocalService
roleId
- the primary key of the roleactionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
PortalException
- if a role with the primary key could not be found
SystemException
- if a system exception occurredpublic void setRolesPermissions(long companyId, Map<Long,String[]> roleIdsToActionIds, long resourceId) throws SystemException
setRolesPermissions
in interface PermissionLocalService
companyId
- the primary key of the companyroleIdsToActionIds
- the map of roles to their new actions on the
resourceresourceId
- the primary key of the resource
SystemException
- if a system exception occurredpublic void setRolesPermissions(long companyId, Map<Long,String[]> roleIdsToActionIds, String name, int scope, String primKey) throws SystemException
setRolesPermissions
in interface PermissionLocalService
companyId
- the primary key of the companyroleIdsToActionIds
- the map of roles to their new actions on the
resourcename
- the resource namescope
- the resource scopeprimKey
- the resource primKey
SystemException
- if a system exception occurredpublic void setUserPermissions(long userId, String[] actionIds, long resourceId) throws PortalException, SystemException
setUserPermissions
in interface PermissionLocalService
userId
- the primary key of the useractionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
PortalException
- if a user with the primary key could not be found
SystemException
- if a system exception occurredpublic void unsetRolePermission(long roleId, long permissionId) throws SystemException
unsetRolePermission
in interface PermissionLocalService
roleId
- the primary key of the rolepermissionId
- the primary key of the permission
SystemException
- if a system exception occurredpublic void unsetRolePermission(long roleId, long companyId, String name, int scope, String primKey, String actionId) throws SystemException
unsetRolePermission
in interface PermissionLocalService
roleId
- the primary key of the rolecompanyId
- the primary key of the companyname
- the resource namescope
- the resource scopeprimKey
- the resource primKeyactionId
- the action's ID
SystemException
- if a system exception occurredpublic void unsetRolePermissions(long roleId, long companyId, String name, int scope, String actionId) throws SystemException
unsetRolePermissions
in interface PermissionLocalService
roleId
- the primary key of the rolecompanyId
- the primary key of the companyname
- the resource namescope
- the resource scopeactionId
- the action's ID
SystemException
- if a system exception occurredpublic void unsetUserPermissions(long userId, String[] actionIds, long resourceId) throws SystemException
unsetUserPermissions
in interface PermissionLocalService
userId
- the primary key of the useractionIds
- the primary keys of the actionsresourceId
- the primary key of the resource
SystemException
- if a system exception occurredpublic PermissionLocalService getWrappedPermissionLocalService()
getWrappedService()
public void setWrappedPermissionLocalService(PermissionLocalService permissionLocalService)
setWrappedService(com.liferay.portal.service.PermissionLocalService)
public PermissionLocalService getWrappedService()
getWrappedService
in interface ServiceWrapper<PermissionLocalService>
public void setWrappedService(PermissionLocalService permissionLocalService)
setWrappedService
in interface ServiceWrapper<PermissionLocalService>
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |