Liferay 6.1.2-ce-ga3

com.liferay.portal.service
Class PermissionLocalServiceWrapper

java.lang.Object
  extended by com.liferay.portal.service.PermissionLocalServiceWrapper
All Implemented Interfaces:
BaseLocalService, PermissionLocalService, PersistedModelLocalService, ServiceWrapper<PermissionLocalService>

public class PermissionLocalServiceWrapper
extends Object
implements PermissionLocalService, ServiceWrapper<PermissionLocalService>

This class is a wrapper for PermissionLocalService.

See Also:
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

PermissionLocalServiceWrapper

public PermissionLocalServiceWrapper(PermissionLocalService permissionLocalService)
Method Detail

addPermission

public Permission addPermission(Permission permission)
                         throws SystemException
Adds the permission to the database. Also notifies the appropriate model listeners.

Specified by:
addPermission in interface PermissionLocalService
Parameters:
permission - the permission
Returns:
the permission that was added
Throws:
SystemException - if a system exception occurred

createPermission

public Permission createPermission(long permissionId)
Creates a new permission with the primary key. Does not add the permission to the database.

Specified by:
createPermission in interface PermissionLocalService
Parameters:
permissionId - the primary key for the new permission
Returns:
the new permission

deletePermission

public Permission deletePermission(long permissionId)
                            throws PortalException,
                                   SystemException
Deletes the permission with the primary key from the database. Also notifies the appropriate model listeners.

Specified by:
deletePermission in interface PermissionLocalService
Parameters:
permissionId - the primary key of the permission
Returns:
the permission that was removed
Throws:
PortalException - if a permission with the primary key could not be found
SystemException - if a system exception occurred

deletePermission

public Permission deletePermission(Permission permission)
                            throws SystemException
Deletes the permission from the database. Also notifies the appropriate model listeners.

Specified by:
deletePermission in interface PermissionLocalService
Parameters:
permission - the permission
Returns:
the permission that was removed
Throws:
SystemException - if a system exception occurred

dynamicQuery

public DynamicQuery dynamicQuery()
Specified by:
dynamicQuery in interface PermissionLocalService

dynamicQuery

public List dynamicQuery(DynamicQuery dynamicQuery)
                  throws SystemException
Performs a dynamic query on the database and returns the matching rows.

Specified by:
dynamicQuery in interface PermissionLocalService
Parameters:
dynamicQuery - the dynamic query
Returns:
the matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public List dynamicQuery(DynamicQuery dynamicQuery,
                         int start,
                         int end)
                  throws SystemException
Performs a dynamic query on the database and returns a range of the matching rows.

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.

Specified by:
dynamicQuery in interface PermissionLocalService
Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
Returns:
the range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public List dynamicQuery(DynamicQuery dynamicQuery,
                         int start,
                         int end,
                         OrderByComparator orderByComparator)
                  throws SystemException
Performs a dynamic query on the database and returns an ordered range of the matching rows.

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.

Specified by:
dynamicQuery in interface PermissionLocalService
Parameters:
dynamicQuery - the dynamic query
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

public long dynamicQueryCount(DynamicQuery dynamicQuery)
                       throws SystemException
Returns the number of rows that match the dynamic query.

Specified by:
dynamicQueryCount in interface PermissionLocalService
Parameters:
dynamicQuery - the dynamic query
Returns:
the number of rows that match the dynamic query
Throws:
SystemException - if a system exception occurred

fetchPermission

public Permission fetchPermission(long permissionId)
                           throws SystemException
Specified by:
fetchPermission in interface PermissionLocalService
Throws:
SystemException

getPermission

public Permission getPermission(long permissionId)
                         throws PortalException,
                                SystemException
Returns the permission with the primary key.

Specified by:
getPermission in interface PermissionLocalService
Parameters:
permissionId - the primary key of the permission
Returns:
the permission
Throws:
PortalException - if a permission with the primary key could not be found
SystemException - if a system exception occurred

getPersistedModel

public PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                 throws PortalException,
                                        SystemException
Specified by:
getPersistedModel in interface PermissionLocalService
Specified by:
getPersistedModel in interface PersistedModelLocalService
Throws:
PortalException
SystemException

getPermissions

public List<Permission> getPermissions(int start,
                                       int end)
                                throws SystemException
Returns a range of all the permissions.

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.

Specified by:
getPermissions in interface PermissionLocalService
Parameters:
start - the lower bound of the range of permissions
end - the upper bound of the range of permissions (not inclusive)
Returns:
the range of permissions
Throws:
SystemException - if a system exception occurred

getPermissionsCount

public int getPermissionsCount()
                        throws SystemException
Returns the number of permissions.

Specified by:
getPermissionsCount in interface PermissionLocalService
Returns:
the number of permissions
Throws:
SystemException - if a system exception occurred

updatePermission

public Permission updatePermission(Permission permission)
                            throws SystemException
Updates the permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Specified by:
updatePermission in interface PermissionLocalService
Parameters:
permission - the permission
Returns:
the permission that was updated
Throws:
SystemException - if a system exception occurred

updatePermission

public Permission updatePermission(Permission permission,
                                   boolean merge)
                            throws SystemException
Updates the permission in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Specified by:
updatePermission in interface PermissionLocalService
Parameters:
permission - the permission
merge - 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.
Returns:
the permission that was updated
Throws:
SystemException - if a system exception occurred

addGroupPermission

public void addGroupPermission(long groupId,
                               long permissionId)
                        throws SystemException
Specified by:
addGroupPermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

addGroupPermission

public void addGroupPermission(long groupId,
                               Permission permission)
                        throws SystemException
Specified by:
addGroupPermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

addGroupPermissions

public void addGroupPermissions(long groupId,
                                long[] permissionIds)
                         throws SystemException
Specified by:
addGroupPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

addGroupPermissions

public void addGroupPermissions(long groupId,
                                List<Permission> Permissions)
                         throws SystemException
Specified by:
addGroupPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

clearGroupPermissions

public void clearGroupPermissions(long groupId)
                           throws SystemException
Specified by:
clearGroupPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

deleteGroupPermission

public void deleteGroupPermission(long groupId,
                                  long permissionId)
                           throws SystemException
Specified by:
deleteGroupPermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

deleteGroupPermission

public void deleteGroupPermission(long groupId,
                                  Permission permission)
                           throws SystemException
Specified by:
deleteGroupPermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

deleteGroupPermissions

public void deleteGroupPermissions(long groupId,
                                   long[] permissionIds)
                            throws SystemException
Specified by:
deleteGroupPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

deleteGroupPermissions

public void deleteGroupPermissions(long groupId,
                                   List<Permission> Permissions)
                            throws SystemException
Specified by:
deleteGroupPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getGroupPermissions

public List<Permission> getGroupPermissions(long groupId)
                                     throws SystemException
Specified by:
getGroupPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getGroupPermissions

public List<Permission> getGroupPermissions(long groupId,
                                            int start,
                                            int end)
                                     throws SystemException
Specified by:
getGroupPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getGroupPermissions

public List<Permission> getGroupPermissions(long groupId,
                                            int start,
                                            int end,
                                            OrderByComparator orderByComparator)
                                     throws SystemException
Specified by:
getGroupPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getGroupPermissionsCount

public int getGroupPermissionsCount(long groupId)
                             throws SystemException
Specified by:
getGroupPermissionsCount in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

hasGroupPermission

public boolean hasGroupPermission(long groupId,
                                  long permissionId)
                           throws SystemException
Specified by:
hasGroupPermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

hasGroupPermissions

public boolean hasGroupPermissions(long groupId)
                            throws SystemException
Specified by:
hasGroupPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

setGroupPermissions

public void setGroupPermissions(long groupId,
                                long[] permissionIds)
                         throws SystemException
Specified by:
setGroupPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

addRolePermission

public void addRolePermission(long roleId,
                              long permissionId)
                       throws SystemException
Specified by:
addRolePermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

addRolePermission

public void addRolePermission(long roleId,
                              Permission permission)
                       throws SystemException
Specified by:
addRolePermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

addRolePermissions

public void addRolePermissions(long roleId,
                               long[] permissionIds)
                        throws SystemException
Specified by:
addRolePermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

addRolePermissions

public void addRolePermissions(long roleId,
                               List<Permission> Permissions)
                        throws SystemException
Specified by:
addRolePermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

clearRolePermissions

public void clearRolePermissions(long roleId)
                          throws SystemException
Specified by:
clearRolePermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

deleteRolePermission

public void deleteRolePermission(long roleId,
                                 long permissionId)
                          throws SystemException
Specified by:
deleteRolePermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

deleteRolePermission

public void deleteRolePermission(long roleId,
                                 Permission permission)
                          throws SystemException
Specified by:
deleteRolePermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

deleteRolePermissions

public void deleteRolePermissions(long roleId,
                                  long[] permissionIds)
                           throws SystemException
Specified by:
deleteRolePermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

deleteRolePermissions

public void deleteRolePermissions(long roleId,
                                  List<Permission> Permissions)
                           throws SystemException
Specified by:
deleteRolePermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getRolePermissions

public List<Permission> getRolePermissions(long roleId)
                                    throws SystemException
Specified by:
getRolePermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getRolePermissions

public List<Permission> getRolePermissions(long roleId,
                                           int start,
                                           int end)
                                    throws SystemException
Specified by:
getRolePermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getRolePermissions

public List<Permission> getRolePermissions(long roleId,
                                           int start,
                                           int end,
                                           OrderByComparator orderByComparator)
                                    throws SystemException
Specified by:
getRolePermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getRolePermissionsCount

public int getRolePermissionsCount(long roleId)
                            throws SystemException
Specified by:
getRolePermissionsCount in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

hasRolePermission

public boolean hasRolePermission(long roleId,
                                 long permissionId)
                          throws SystemException
Specified by:
hasRolePermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

hasRolePermissions

public boolean hasRolePermissions(long roleId)
                           throws SystemException
Specified by:
hasRolePermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

setRolePermissions

public void setRolePermissions(long roleId,
                               long[] permissionIds)
                        throws SystemException
Specified by:
setRolePermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

addUserPermission

public void addUserPermission(long userId,
                              long permissionId)
                       throws SystemException
Specified by:
addUserPermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

addUserPermission

public void addUserPermission(long userId,
                              Permission permission)
                       throws SystemException
Specified by:
addUserPermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

addUserPermissions

public void addUserPermissions(long userId,
                               long[] permissionIds)
                        throws SystemException
Specified by:
addUserPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

addUserPermissions

public void addUserPermissions(long userId,
                               List<Permission> Permissions)
                        throws SystemException
Specified by:
addUserPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

clearUserPermissions

public void clearUserPermissions(long userId)
                          throws SystemException
Specified by:
clearUserPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

deleteUserPermission

public void deleteUserPermission(long userId,
                                 long permissionId)
                          throws SystemException
Specified by:
deleteUserPermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

deleteUserPermission

public void deleteUserPermission(long userId,
                                 Permission permission)
                          throws SystemException
Specified by:
deleteUserPermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

deleteUserPermissions

public void deleteUserPermissions(long userId,
                                  long[] permissionIds)
                           throws SystemException
Specified by:
deleteUserPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

deleteUserPermissions

public void deleteUserPermissions(long userId,
                                  List<Permission> Permissions)
                           throws SystemException
Specified by:
deleteUserPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getUserPermissions

public List<Permission> getUserPermissions(long userId)
                                    throws SystemException
Specified by:
getUserPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getUserPermissions

public List<Permission> getUserPermissions(long userId,
                                           int start,
                                           int end)
                                    throws SystemException
Specified by:
getUserPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getUserPermissions

public List<Permission> getUserPermissions(long userId,
                                           int start,
                                           int end,
                                           OrderByComparator orderByComparator)
                                    throws SystemException
Specified by:
getUserPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getUserPermissionsCount

public int getUserPermissionsCount(long userId)
                            throws SystemException
Specified by:
getUserPermissionsCount in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

hasUserPermission

public boolean hasUserPermission(long userId,
                                 long permissionId)
                          throws SystemException
Specified by:
hasUserPermission in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

hasUserPermissions

public boolean hasUserPermissions(long userId)
                           throws SystemException
Specified by:
hasUserPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

setUserPermissions

public void setUserPermissions(long userId,
                               long[] permissionIds)
                        throws SystemException
Specified by:
setUserPermissions in interface PermissionLocalService
Throws:
SystemException - if a system exception occurred

getBeanIdentifier

public String getBeanIdentifier()
Returns the Spring bean ID for this bean.

Specified by:
getBeanIdentifier in interface PermissionLocalService
Returns:
the Spring bean ID for this bean

setBeanIdentifier

public void setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean.

Specified by:
setBeanIdentifier in interface PermissionLocalService
Parameters:
beanIdentifier - the Spring bean ID for this bean

addPermission

public Permission addPermission(long companyId,
                                String actionId,
                                long resourceId)
                         throws SystemException
Adds a permission to perform the action on the resource.

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.

Specified by:
addPermission in interface PermissionLocalService
Parameters:
companyId - the primary key of the company
actionId - the action's ID
resourceId - the primary key of the resource
Returns:
the permission of the company, action, and resource with the primary keys
Throws:
SystemException - if a system exception occurred

addPermissions

public List<Permission> addPermissions(long companyId,
                                       List<String> actionIds,
                                       long resourceId)
                                throws SystemException
Adds permissions to perform the actions on the resource.

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.

Specified by:
addPermissions in interface PermissionLocalService
Parameters:
companyId - the primary key of the company
actionIds - the primary keys of the actions
resourceId - the primary key of the resource
Returns:
the permissions to perform the actions on the resource
Throws:
SystemException - if a system exception occurred

addPermissions

public List<Permission> addPermissions(long companyId,
                                       String name,
                                       long resourceId,
                                       boolean portletActions)
                                throws SystemException
Adds permissions to perform either the portlet resource actions or model resource actions on the resource.

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.

Specified by:
addPermissions in interface PermissionLocalService
Parameters:
companyId - the primary key of the company
name - the resource name
resourceId - the primary key of the resource
portletActions - whether to retrieve the action primary keys from the portlet or the model resource
Returns:
the permissions to perform the actions on the resource
Throws:
SystemException - if a system exception occurred

addUserPermissions

public void addUserPermissions(long userId,
                               String[] actionIds,
                               long resourceId)
                        throws PortalException,
                               SystemException
Adds user permissions to perform the actions on the resource.

Specified by:
addUserPermissions in interface PermissionLocalService
Parameters:
userId - the primary key of the user
actionIds - the primary keys of the actions
resourceId - the primary key of the resource
Throws:
PortalException - if a user with the primary key could not be found
SystemException - if a system exception occurred

checkPermissions

public void checkPermissions(String name,
                             List<String> actionIds)
                      throws PortalException,
                             SystemException
Checks to see if the actions are permitted on the named resource.

Specified by:
checkPermissions in interface PermissionLocalService
Parameters:
name - the resource name
actionIds - the primary keys of the actions
Throws:
PortalException - if the resource company or name could not be found or were invalid
SystemException - if a system exception occurred

getActions

public List<String> getActions(List<Permission> permissions)
Returns the IDs of all the actions belonging to the permissions.

Specified by:
getActions in interface PermissionLocalService
Parameters:
permissions - the permissions
Returns:
the IDs of all the actions belonging to the permissions

getGroupPermissions

public List<Permission> getGroupPermissions(long groupId,
                                            long resourceId)
                                     throws SystemException
Returns all the group's permissions on the resource.

Specified by:
getGroupPermissions in interface PermissionLocalService
Parameters:
groupId - the primary key of the group
resourceId - the primary key of the resource
Returns:
the group's permissions on the resource
Throws:
SystemException - if a system exception occurred

getGroupPermissions

public List<Permission> getGroupPermissions(long groupId,
                                            long companyId,
                                            String name,
                                            int scope,
                                            String primKey)
                                     throws SystemException
Returns all the group's permissions on the named resource with the scope and primKey.

Specified by:
getGroupPermissions in interface PermissionLocalService
Parameters:
groupId - the primary key of the group
companyId - the primary key of the company
name - the resource name
scope - the resource scope
primKey - the resource primKey
Returns:
the group's permissions on the named resource with the scope and primKey
Throws:
SystemException - if a system exception occurred

getLatestPermissionId

public long getLatestPermissionId()
                           throws SystemException
Returns the primary key of the latest permission created.

Specified by:
getLatestPermissionId in interface PermissionLocalService
Returns:
the primary key of the latest permission created
Throws:
SystemException - if a system exception occurred

getOrgGroupPermissions

public List<Permission> getOrgGroupPermissions(long organizationId,
                                               long groupId,
                                               long resourceId)
                                        throws SystemException
Returns all the permissions of the organization's group with respect to the resource.

Specified by:
getOrgGroupPermissions in interface PermissionLocalService
Parameters:
organizationId - the primary key of the organization
groupId - the primary key of the group
resourceId - the primary key of the resource
Returns:
the permissions of the organization's group with respect to the resource
Throws:
SystemException - if a system exception occurred

getPermissions

public List<Permission> getPermissions(long companyId,
                                       String[] actionIds,
                                       long resourceId)
                                throws SystemException
Returns all the permissions to perform the actions on the resource, creating new permissions for any permissions not found.

Specified by:
getPermissions in interface PermissionLocalService
Parameters:
companyId - the primary key of the company
actionIds - the primary keys of the actions
resourceId - the primary key of the resource
Returns:
the permissions to perform the actions on the resource
Throws:
SystemException - if a system exception occurred
See Also:
addPermission(long, String, long)

getRolePermissions

public List<Permission> getRolePermissions(long roleId,
                                           int[] scopes)
                                    throws SystemException
Specified by:
getRolePermissions in interface PermissionLocalService
Throws:
SystemException

getRolePermissions

public List<Permission> getRolePermissions(long roleId,
                                           long resourceId)
                                    throws SystemException
Returns all the role's permissions on the resource.

Specified by:
getRolePermissions in interface PermissionLocalService
Parameters:
roleId - the primary key of the role
resourceId - the primary key of the resource
Returns:
the role's permissions on the resource
Throws:
SystemException - if a system exception occurred

getUserPermissions

public List<Permission> getUserPermissions(long userId,
                                           long resourceId)
                                    throws SystemException
Returns all the user's permissions on the resource.

Specified by:
getUserPermissions in interface PermissionLocalService
Parameters:
userId - the primary key of the user
resourceId - the primary key of the resource
Returns:
the user's permissions on the resource
Throws:
SystemException - if a system exception occurred

getUserPermissions

public List<Permission> getUserPermissions(long userId,
                                           long companyId,
                                           String name,
                                           int scope,
                                           String primKey)
                                    throws SystemException
Returns all the user's permissions on the named resource with the scope and primKey.

Specified by:
getUserPermissions in interface PermissionLocalService
Parameters:
userId - the primary key of the user
companyId - the primary key of the company
name - the resource name
scope - the resource scope
primKey - the resource primKey
Returns:
the user permissions of the resource name, scope, and primKey
Throws:
SystemException - if a system exception occurred

hasGroupPermission

public boolean hasGroupPermission(long groupId,
                                  String actionId,
                                  long resourceId)
                           throws SystemException
Returns true if the group has permission to perform the action on the resource.

Specified by:
hasGroupPermission in interface PermissionLocalService
Parameters:
groupId - the primary key of the group
actionId - the action's ID
resourceId - the primary key of the resource
Returns:
true if the group has permission to perform the action on the resource; false otherwise
Throws:
SystemException - if a system exception occurred

hasRolePermission

public boolean hasRolePermission(long roleId,
                                 long companyId,
                                 String name,
                                 int scope,
                                 String actionId)
                          throws SystemException
Returns true if the role has permission to perform the action on the named resource with the scope.

Specified by:
hasRolePermission in interface PermissionLocalService
Parameters:
roleId - the primary key of the role
companyId - the primary key of the company
name - the resource name
scope - the resource scope
actionId - the action's ID
Returns:
true if the role has permission to perform the action on the named resource with the scope; false otherwise
Throws:
SystemException - if a system exception occurred

hasRolePermission

public boolean hasRolePermission(long roleId,
                                 long companyId,
                                 String name,
                                 int scope,
                                 String primKey,
                                 String actionId)
                          throws SystemException
Returns true if the role has permission to perform the action on the named resource with the scope and primKey.

Specified by:
hasRolePermission in interface PermissionLocalService
Parameters:
roleId - the primary key of the role
companyId - the primary key of the company
name - the resource name
scope - the resource scope
primKey - the resource primKey
actionId - the action's ID
Returns:
true if the role has permission to perform the action on the named resource with the scope and primKey; false otherwise
Throws:
SystemException - if a system exception occurred

hasUserPermission

public boolean hasUserPermission(long userId,
                                 String actionId,
                                 long resourceId)
                          throws SystemException
Returns true if the user has permission to perform the action on the resource.

Specified by:
hasUserPermission in interface PermissionLocalService
Parameters:
userId - the primary key of the user
actionId - the action's ID
resourceId - the primary key of the resource
Returns:
true if the user has permission to perform the action on the resource; false otherwise
Throws:
SystemException - if a system exception occurred

hasUserPermissions

public boolean hasUserPermissions(long userId,
                                  long groupId,
                                  List<Resource> resources,
                                  String actionId,
                                  PermissionCheckerBag permissionCheckerBag)
                           throws PortalException,
                                  SystemException
Returns 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.

Specified by:
hasUserPermissions in interface PermissionLocalService
Parameters:
userId - the primary key of the user
groupId - the primary key of the group containing the resource
resources - representations of the resource at each scope level returned by AdvancedPermissionChecker.getResources( long, long, String, String, String)
actionId - the action's ID
permissionCheckerBag - the permission checker bag
Returns:
true if the user has permission to perform the action on the resources; false otherwise
Throws:
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 occurred

setContainerResourcePermissions

public void setContainerResourcePermissions(String name,
                                            String roleName,
                                            String actionId)
                                     throws PortalException,
                                            SystemException
Sets the container wide permissions of either the role or the default user of each company to perform the actions on the named resource.

Specified by:
setContainerResourcePermissions in interface PermissionLocalService
Parameters:
name - the resource name
roleName - the role name. Supported role names include RoleConstants.ORGANIZATION_USER, RoleConstants.OWNER, and RoleConstants.SITE_MEMBER.
actionId - the action's ID
Throws:
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 occurred

setGroupPermissions

public void setGroupPermissions(long groupId,
                                String[] actionIds,
                                long resourceId)
                         throws PortalException,
                                SystemException
Sets the group's permissions to perform the actions on the resource, replacing the group's existing permissions on the resource.

Specified by:
setGroupPermissions in interface PermissionLocalService
Parameters:
groupId - the primary key of the group
actionIds - the primary keys of the actions
resourceId - the primary key of the resource
Throws:
PortalException - if a group with the primary key could not be found
SystemException - if a system exception occurred

setGroupPermissions

public void setGroupPermissions(String className,
                                String classPK,
                                long groupId,
                                String[] actionIds,
                                long resourceId)
                         throws PortalException,
                                SystemException
Sets the entity's group permissions to perform the actions on the resource, replacing the entity's existing group permissions on the resource. Only Organization and UserGroup class entities are supported.

Specified by:
setGroupPermissions in interface PermissionLocalService
Parameters:
className - the class name of an organization or user group
classPK - the primary key of the class
groupId - the primary key of the group
actionIds - the primary keys of the actions
resourceId - the primary key of the resource
Throws:
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 occurred

setOrgGroupPermissions

public void setOrgGroupPermissions(long organizationId,
                                   long groupId,
                                   String[] actionIds,
                                   long resourceId)
                            throws PortalException,
                                   SystemException
Sets the organization's group permissions to perform the actions on the resource, replacing the organization's existing group permissions on the resource.

Specified by:
setOrgGroupPermissions in interface PermissionLocalService
Parameters:
organizationId - the primary key of the organization
groupId - the primary key of the group in which to scope the permissions
actionIds - the primary keys of the actions
resourceId - the primary key of the resource
Throws:
PortalException - if an organization with the primary key could not be found
SystemException - if a system exception occurred

setRolePermission

public void setRolePermission(long roleId,
                              long companyId,
                              String name,
                              int scope,
                              String primKey,
                              String actionId)
                       throws PortalException,
                              SystemException
Sets the role's permissions to perform the action on the named resource, replacing the role's existing permissions on the resource.

Specified by:
setRolePermission in interface PermissionLocalService
Parameters:
roleId - the primary key of the role
companyId - the primary key of the company
name - the resource name
scope - the resource scope
primKey - the resource primKey
actionId - the action's ID
Throws:
PortalException - if the scope was ResourceConstants.SCOPE_INDIVIDUAL
SystemException - if a system exception occurred

setRolePermissions

public void setRolePermissions(long roleId,
                               long companyId,
                               String name,
                               int scope,
                               String primKey,
                               String[] actionIds)
                        throws PortalException,
                               SystemException
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.

Specified by:
setRolePermissions in interface PermissionLocalService
Parameters:
roleId - the primary key of the role
companyId - the primary key of the company
name - the resource name
scope - the resource scope
primKey - the resource primKey
actionIds - the primary keys of the actions
Throws:
PortalException - if the scope was ResourceConstants.SCOPE_INDIVIDUAL
SystemException - if a system exception occurred

setRolePermissions

public void setRolePermissions(long roleId,
                               String[] actionIds,
                               long resourceId)
                        throws PortalException,
                               SystemException
Sets the role's permissions to perform the actions on the resource, replacing the role's existing permissions on the resource.

Specified by:
setRolePermissions in interface PermissionLocalService
Parameters:
roleId - the primary key of the role
actionIds - the primary keys of the actions
resourceId - the primary key of the resource
Throws:
PortalException - if a role with the primary key could not be found
SystemException - if a system exception occurred

setRolesPermissions

public void setRolesPermissions(long companyId,
                                Map<Long,String[]> roleIdsToActionIds,
                                long resourceId)
                         throws SystemException
Sets the permissions of each role to perform respective actions on the resource, replacing the existing permissions of each role on the resource.

Specified by:
setRolesPermissions in interface PermissionLocalService
Parameters:
companyId - the primary key of the company
roleIdsToActionIds - the map of roles to their new actions on the resource
resourceId - the primary key of the resource
Throws:
SystemException - if a system exception occurred

setRolesPermissions

public void setRolesPermissions(long companyId,
                                Map<Long,String[]> roleIdsToActionIds,
                                String name,
                                int scope,
                                String primKey)
                         throws SystemException
Sets the permissions of each role to perform respective actions on the named resource, replacing the existing permissions of each role on the resource.

Specified by:
setRolesPermissions in interface PermissionLocalService
Parameters:
companyId - the primary key of the company
roleIdsToActionIds - the map of roles to their new actions on the resource
name - the resource name
scope - the resource scope
primKey - the resource primKey
Throws:
SystemException - if a system exception occurred

setUserPermissions

public void setUserPermissions(long userId,
                               String[] actionIds,
                               long resourceId)
                        throws PortalException,
                               SystemException
Sets the user's permissions to perform the actions on the resource, replacing the user's existing permissions on the resource.

Specified by:
setUserPermissions in interface PermissionLocalService
Parameters:
userId - the primary key of the user
actionIds - the primary keys of the actions
resourceId - the primary key of the resource
Throws:
PortalException - if a user with the primary key could not be found
SystemException - if a system exception occurred

unsetRolePermission

public void unsetRolePermission(long roleId,
                                long permissionId)
                         throws SystemException
Removes the permission from the role.

Specified by:
unsetRolePermission in interface PermissionLocalService
Parameters:
roleId - the primary key of the role
permissionId - the primary key of the permission
Throws:
SystemException - if a system exception occurred

unsetRolePermission

public void unsetRolePermission(long roleId,
                                long companyId,
                                String name,
                                int scope,
                                String primKey,
                                String actionId)
                         throws SystemException
Removes the role's permissions to perform the action on the named resource with the scope and primKey.

Specified by:
unsetRolePermission in interface PermissionLocalService
Parameters:
roleId - the primary key of the role
companyId - the primary key of the company
name - the resource name
scope - the resource scope
primKey - the resource primKey
actionId - the action's ID
Throws:
SystemException - if a system exception occurred

unsetRolePermissions

public void unsetRolePermissions(long roleId,
                                 long companyId,
                                 String name,
                                 int scope,
                                 String actionId)
                          throws SystemException
Removes the role's permissions to perform the action on the named resource.

Specified by:
unsetRolePermissions in interface PermissionLocalService
Parameters:
roleId - the primary key of the role
companyId - the primary key of the company
name - the resource name
scope - the resource scope
actionId - the action's ID
Throws:
SystemException - if a system exception occurred

unsetUserPermissions

public void unsetUserPermissions(long userId,
                                 String[] actionIds,
                                 long resourceId)
                          throws SystemException
Removes the user's permissions to perform the actions on the resource.

Specified by:
unsetUserPermissions in interface PermissionLocalService
Parameters:
userId - the primary key of the user
actionIds - the primary keys of the actions
resourceId - the primary key of the resource
Throws:
SystemException - if a system exception occurred

getWrappedPermissionLocalService

public PermissionLocalService getWrappedPermissionLocalService()
Deprecated. Renamed to getWrappedService()


setWrappedPermissionLocalService

public void setWrappedPermissionLocalService(PermissionLocalService permissionLocalService)
Deprecated. Renamed to setWrappedService(com.liferay.portal.service.PermissionLocalService)


getWrappedService

public PermissionLocalService getWrappedService()
Specified by:
getWrappedService in interface ServiceWrapper<PermissionLocalService>

setWrappedService

public void setWrappedService(PermissionLocalService permissionLocalService)
Specified by:
setWrappedService in interface ServiceWrapper<PermissionLocalService>

Liferay 6.1.2-ce-ga3