Liferay 6.0-ee

com.liferay.portal.service
Class PermissionLocalServiceWrapper

java.lang.Object
  extended by com.liferay.portal.service.PermissionLocalServiceWrapper
All Implemented Interfaces:
PermissionLocalService

public class PermissionLocalServiceWrapper
extends Object
implements PermissionLocalService

This class is a wrapper for PermissionLocalService.

See Also:
PermissionLocalService
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Constructor Summary
PermissionLocalServiceWrapper(PermissionLocalService permissionLocalService)
           
 
Method Summary
 Permission addPermission(long companyId, String actionId, long resourceId)
           
 Permission addPermission(Permission permission)
          Adds the permission to the database.
 List<Permission> addPermissions(long companyId, List<String> actionIds, long resourceId)
           
 List<Permission> addPermissions(long companyId, String name, long resourceId, boolean portletActions)
           
 void addUserPermissions(long userId, String[] actionIds, long resourceId)
           
 Permission createPermission(long permissionId)
          Creates a new permission with the primary key.
 void deletePermission(long permissionId)
          Deletes the permission with the primary key from the database.
 void deletePermission(Permission permission)
          Deletes the permission from the database.
 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)
          Counts the number of rows that match the dynamic query.
 List<String> getActions(List<Permission> permissions)
           
 List<Permission> getGroupPermissions(long groupId, long resourceId)
           
 List<Permission> getGroupPermissions(long groupId, long companyId, String name, int scope, String primKey)
           
 long getLatestPermissionId()
           
 List<Permission> getOrgGroupPermissions(long organizationId, long groupId, long resourceId)
           
 Permission getPermission(long permissionId)
          Gets the permission with the primary key.
 List<Permission> getPermissions(int start, int end)
          Gets a range of all the permissions.
 List<Permission> getPermissions(long companyId, String[] actionIds, long resourceId)
           
 int getPermissionsCount()
          Gets the number of permissions.
 List<Permission> getRolePermissions(long roleId)
           
 List<Permission> getRolePermissions(long roleId, long resourceId)
           
 List<Permission> getUserPermissions(long userId, long resourceId)
           
 List<Permission> getUserPermissions(long userId, long companyId, String name, int scope, String primKey)
           
 PermissionLocalService getWrappedPermissionLocalService()
           
 boolean hasGroupPermission(long groupId, String actionId, long resourceId)
           
 boolean hasRolePermission(long roleId, long companyId, String name, int scope, String actionId)
           
 boolean hasRolePermission(long roleId, long companyId, String name, int scope, String primKey, String actionId)
           
 boolean hasUserPermission(long userId, String actionId, long resourceId)
           
 boolean hasUserPermissions(long userId, long groupId, List<Resource> resources, String actionId, PermissionCheckerBag permissionCheckerBag)
           
 void setGroupPermissions(long groupId, String[] actionIds, long resourceId)
           
 void setGroupPermissions(String className, String classPK, long groupId, String[] actionIds, long resourceId)
           
 void setOrgGroupPermissions(long organizationId, long groupId, String[] actionIds, long resourceId)
           
 void setRolePermission(long roleId, long companyId, String name, int scope, String primKey, String actionId)
           
 void setRolePermissions(long roleId, long companyId, String name, int scope, String primKey, String[] actionIds)
           
 void setRolePermissions(long roleId, String[] actionIds, long resourceId)
           
 void setUserPermissions(long userId, String[] actionIds, long resourceId)
           
 void unsetRolePermission(long roleId, long permissionId)
           
 void unsetRolePermission(long roleId, long companyId, String name, int scope, String primKey, String actionId)
           
 void unsetRolePermissions(long roleId, long companyId, String name, int scope, String actionId)
           
 void unsetUserPermissions(long userId, String[] actionIds, long resourceId)
           
 Permission updatePermission(Permission permission)
          Updates the permission in the database.
 Permission updatePermission(Permission permission, boolean merge)
          Updates the permission in the database.
 
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 to add
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 void 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 to delete
Throws:
PortalException - if a permission with the primary key could not be found
SystemException - if a system exception occurred

deletePermission

public void 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 to delete
Throws:
SystemException - if a system exception occurred

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 to search with
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 to search with
start - the lower bound of the range of model instances to return
end - the upper bound of the range of model instances to return (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 to search with
start - the lower bound of the range of model instances to return
end - the upper bound of the range of model instances to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

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

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

getPermission

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

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

getPermissions

public List<Permission> getPermissions(int start,
                                       int end)
                                throws SystemException
Gets 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 to return
end - the upper bound of the range of permissions to return (not inclusive)
Returns:
the range of permissions
Throws:
SystemException - if a system exception occurred

getPermissionsCount

public int getPermissionsCount()
                        throws SystemException
Gets 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. Also notifies the appropriate model listeners.

Specified by:
updatePermission in interface PermissionLocalService
Parameters:
permission - the permission to update
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. Also notifies the appropriate model listeners.

Specified by:
updatePermission in interface PermissionLocalService
Parameters:
permission - the permission to update
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

addPermission

public Permission addPermission(long companyId,
                                String actionId,
                                long resourceId)
                         throws SystemException
Specified by:
addPermission in interface PermissionLocalService
Throws:
SystemException

addPermissions

public List<Permission> addPermissions(long companyId,
                                       String name,
                                       long resourceId,
                                       boolean portletActions)
                                throws SystemException
Specified by:
addPermissions in interface PermissionLocalService
Throws:
SystemException

addPermissions

public List<Permission> addPermissions(long companyId,
                                       List<String> actionIds,
                                       long resourceId)
                                throws SystemException
Specified by:
addPermissions in interface PermissionLocalService
Throws:
SystemException

addUserPermissions

public void addUserPermissions(long userId,
                               String[] actionIds,
                               long resourceId)
                        throws PortalException,
                               SystemException
Specified by:
addUserPermissions in interface PermissionLocalService
Throws:
PortalException
SystemException

getActions

public List<String> getActions(List<Permission> permissions)
Specified by:
getActions in interface PermissionLocalService

getGroupPermissions

public List<Permission> getGroupPermissions(long groupId,
                                            long resourceId)
                                     throws SystemException
Specified by:
getGroupPermissions in interface PermissionLocalService
Throws:
SystemException

getGroupPermissions

public List<Permission> getGroupPermissions(long groupId,
                                            long companyId,
                                            String name,
                                            int scope,
                                            String primKey)
                                     throws SystemException
Specified by:
getGroupPermissions in interface PermissionLocalService
Throws:
SystemException

getOrgGroupPermissions

public List<Permission> getOrgGroupPermissions(long organizationId,
                                               long groupId,
                                               long resourceId)
                                        throws SystemException
Specified by:
getOrgGroupPermissions in interface PermissionLocalService
Throws:
SystemException

getLatestPermissionId

public long getLatestPermissionId()
                           throws SystemException
Specified by:
getLatestPermissionId in interface PermissionLocalService
Throws:
SystemException

getPermissions

public List<Permission> getPermissions(long companyId,
                                       String[] actionIds,
                                       long resourceId)
                                throws SystemException
Specified by:
getPermissions in interface PermissionLocalService
Throws:
SystemException

getRolePermissions

public List<Permission> getRolePermissions(long roleId)
                                    throws SystemException
Specified by:
getRolePermissions in interface PermissionLocalService
Throws:
SystemException

getRolePermissions

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

getUserPermissions

public List<Permission> getUserPermissions(long userId,
                                           long resourceId)
                                    throws SystemException
Specified by:
getUserPermissions in interface PermissionLocalService
Throws:
SystemException

getUserPermissions

public List<Permission> getUserPermissions(long userId,
                                           long companyId,
                                           String name,
                                           int scope,
                                           String primKey)
                                    throws SystemException
Specified by:
getUserPermissions in interface PermissionLocalService
Throws:
SystemException

hasGroupPermission

public boolean hasGroupPermission(long groupId,
                                  String actionId,
                                  long resourceId)
                           throws SystemException
Specified by:
hasGroupPermission in interface PermissionLocalService
Throws:
SystemException

hasRolePermission

public boolean hasRolePermission(long roleId,
                                 long companyId,
                                 String name,
                                 int scope,
                                 String actionId)
                          throws SystemException
Specified by:
hasRolePermission in interface PermissionLocalService
Throws:
SystemException

hasRolePermission

public boolean hasRolePermission(long roleId,
                                 long companyId,
                                 String name,
                                 int scope,
                                 String primKey,
                                 String actionId)
                          throws SystemException
Specified by:
hasRolePermission in interface PermissionLocalService
Throws:
SystemException

hasUserPermission

public boolean hasUserPermission(long userId,
                                 String actionId,
                                 long resourceId)
                          throws SystemException
Specified by:
hasUserPermission in interface PermissionLocalService
Throws:
SystemException

hasUserPermissions

public boolean hasUserPermissions(long userId,
                                  long groupId,
                                  List<Resource> resources,
                                  String actionId,
                                  PermissionCheckerBag permissionCheckerBag)
                           throws PortalException,
                                  SystemException
Specified by:
hasUserPermissions in interface PermissionLocalService
Throws:
PortalException
SystemException

setGroupPermissions

public void setGroupPermissions(long groupId,
                                String[] actionIds,
                                long resourceId)
                         throws PortalException,
                                SystemException
Specified by:
setGroupPermissions in interface PermissionLocalService
Throws:
PortalException
SystemException

setGroupPermissions

public void setGroupPermissions(String className,
                                String classPK,
                                long groupId,
                                String[] actionIds,
                                long resourceId)
                         throws PortalException,
                                SystemException
Specified by:
setGroupPermissions in interface PermissionLocalService
Throws:
PortalException
SystemException

setOrgGroupPermissions

public void setOrgGroupPermissions(long organizationId,
                                   long groupId,
                                   String[] actionIds,
                                   long resourceId)
                            throws PortalException,
                                   SystemException
Specified by:
setOrgGroupPermissions in interface PermissionLocalService
Throws:
PortalException
SystemException

setRolePermission

public void setRolePermission(long roleId,
                              long companyId,
                              String name,
                              int scope,
                              String primKey,
                              String actionId)
                       throws PortalException,
                              SystemException
Specified by:
setRolePermission in interface PermissionLocalService
Throws:
PortalException
SystemException

setRolePermissions

public void setRolePermissions(long roleId,
                               long companyId,
                               String name,
                               int scope,
                               String primKey,
                               String[] actionIds)
                        throws PortalException,
                               SystemException
Specified by:
setRolePermissions in interface PermissionLocalService
Throws:
PortalException
SystemException

setRolePermissions

public void setRolePermissions(long roleId,
                               String[] actionIds,
                               long resourceId)
                        throws PortalException,
                               SystemException
Specified by:
setRolePermissions in interface PermissionLocalService
Throws:
PortalException
SystemException

setUserPermissions

public void setUserPermissions(long userId,
                               String[] actionIds,
                               long resourceId)
                        throws PortalException,
                               SystemException
Specified by:
setUserPermissions in interface PermissionLocalService
Throws:
PortalException
SystemException

unsetRolePermission

public void unsetRolePermission(long roleId,
                                long permissionId)
                         throws SystemException
Specified by:
unsetRolePermission in interface PermissionLocalService
Throws:
SystemException

unsetRolePermission

public void unsetRolePermission(long roleId,
                                long companyId,
                                String name,
                                int scope,
                                String primKey,
                                String actionId)
                         throws SystemException
Specified by:
unsetRolePermission in interface PermissionLocalService
Throws:
SystemException

unsetRolePermissions

public void unsetRolePermissions(long roleId,
                                 long companyId,
                                 String name,
                                 int scope,
                                 String actionId)
                          throws SystemException
Specified by:
unsetRolePermissions in interface PermissionLocalService
Throws:
SystemException

unsetUserPermissions

public void unsetUserPermissions(long userId,
                                 String[] actionIds,
                                 long resourceId)
                          throws SystemException
Specified by:
unsetUserPermissions in interface PermissionLocalService
Throws:
SystemException

getWrappedPermissionLocalService

public PermissionLocalService getWrappedPermissionLocalService()

Liferay 6.0-ee