Liferay 6.1.2-ce-ga3

com.liferay.portal.service
Class PermissionServiceWrapper

java.lang.Object
  extended by com.liferay.portal.service.PermissionServiceWrapper
All Implemented Interfaces:
BaseService, PermissionService, ServiceWrapper<PermissionService>

public class PermissionServiceWrapper
extends Object
implements PermissionService, ServiceWrapper<PermissionService>

This class is a wrapper for PermissionService.

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

Constructor Summary
PermissionServiceWrapper(PermissionService permissionService)
           
 
Method Summary
 void checkPermission(long groupId, long resourceId)
          Checks to see if the group has permission to the resource.
 void checkPermission(long groupId, String name, long primKey)
          Checks to see if the group has permission to the service.
 void checkPermission(long groupId, String name, String primKey)
          Checks to see if the group has permission to the service.
 String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
 PermissionService getWrappedPermissionService()
          Deprecated. Renamed to getWrappedService()
 PermissionService getWrappedService()
           
 boolean hasGroupPermission(long groupId, String actionId, long resourceId)
          Returns true if the group has permission to perform the action on the resource.
 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, 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 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 setIndividualPermissions(long groupId, 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 setOrgGroupPermissions(long organizationId, long groupId, String[] actionIds, long resourceId)
          Sets the organization permission to perform the actions on the resource for a particular group, replacing the organization's existing permissions on the resource.
 void setRolePermission(long roleId, long groupId, 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 groupId, 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 setUserPermissions(long userId, long groupId, 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 setWrappedPermissionService(PermissionService permissionService)
          Deprecated. Renamed to setWrappedService(com.liferay.portal.service.PermissionService)
 void setWrappedService(PermissionService permissionService)
           
 void unsetRolePermission(long roleId, long groupId, long permissionId)
          Removes the permission from the role.
 void unsetRolePermission(long roleId, long groupId, 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 groupId, String name, int scope, String actionId)
          Removes the role's permissions to perform the action on the named resource.
 void unsetUserPermissions(long userId, long groupId, String[] actionIds, long resourceId)
          Removes the user's permissions to perform the actions on the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionServiceWrapper

public PermissionServiceWrapper(PermissionService permissionService)
Method Detail

getBeanIdentifier

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

Specified by:
getBeanIdentifier in interface PermissionService
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 PermissionService
Parameters:
beanIdentifier - the Spring bean ID for this bean

checkPermission

public void checkPermission(long groupId,
                            long resourceId)
                     throws PortalException,
                            SystemException
Checks to see if the group has permission to the resource.

Specified by:
checkPermission in interface PermissionService
Parameters:
groupId - the primary key of the group
resourceId - the primary key of the resource
Throws:
PortalException - if the group did not have permission to the resource, or if a group or resource with the primary key could not be found or was invalid
SystemException - if a system exception occurred

checkPermission

public void checkPermission(long groupId,
                            String name,
                            long primKey)
                     throws PortalException,
                            SystemException
Checks to see if the group has permission to the service.

Specified by:
checkPermission in interface PermissionService
Parameters:
groupId - the primary key of the group
name - the service name
primKey - the primary key of the service
Throws:
PortalException - if the group did not have permission to the service, if a group with the primary key could not be found or if the permission information was invalid
SystemException - if a system exception occurred

checkPermission

public void checkPermission(long groupId,
                            String name,
                            String primKey)
                     throws PortalException,
                            SystemException
Checks to see if the group has permission to the service.

Specified by:
checkPermission in interface PermissionService
Parameters:
groupId - the primary key of the group
name - the service name
primKey - the primary key of the service
Throws:
PortalException - if the group did not have permission to the service, if a group with the primary key could not be found or if the permission information was invalid
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 PermissionService
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

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 PermissionService
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 PermissionService
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

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 PermissionService
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 or if the group did not have permission to the resource
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 PermissionService
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 the group did not have permission to the resource, 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

setIndividualPermissions

public void setIndividualPermissions(long groupId,
                                     long companyId,
                                     Map<Long,String[]> roleIdsToActionIds,
                                     long resourceId)
                              throws PortalException,
                                     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:
setIndividualPermissions in interface PermissionService
Parameters:
groupId - the primary key of the group
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:
PortalException - if the group did not have permission to the resource
SystemException - if a system exception occurred

setOrgGroupPermissions

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

Specified by:
setOrgGroupPermissions in interface PermissionService
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 the group did not have permission to the resource or if an organization with the primary key could not be found
SystemException - if a system exception occurred

setRolePermission

public void setRolePermission(long roleId,
                              long groupId,
                              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 PermissionService
Parameters:
roleId - the primary key of the role
groupId - the primary key of the group
name - the resource name
scope - the resource scope
primKey - the resource primKey
actionId - the action's ID
Throws:
PortalException - if the group did not have permission to the role or if the scope was ResourceConstants.SCOPE_INDIVIDUAL
SystemException - if a system exception occurred

setRolePermissions

public void setRolePermissions(long roleId,
                               long groupId,
                               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 PermissionService
Parameters:
roleId - the primary key of the role
groupId - the primary key of the group
actionIds - the primary keys of the actions
resourceId - the primary key of the resource
Throws:
PortalException - if the group did not have permission to the resource or if a role with the primary key could not be found
SystemException - if a system exception occurred

setUserPermissions

public void setUserPermissions(long userId,
                               long groupId,
                               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 PermissionService
Parameters:
userId - the primary key of the user
groupId - the primary key of the group
actionIds - the primary keys of the actions
resourceId - the primary key of the resource
Throws:
PortalException - if the group did not have permission to the resource or if a user with the primary key could not be found
SystemException - if a system exception occurred

unsetRolePermission

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

Specified by:
unsetRolePermission in interface PermissionService
Parameters:
roleId - the primary key of the role
groupId - the primary key of the group
permissionId - the primary key of the permission
Throws:
PortalException - if the group did not have permission to the role
SystemException - if a system exception occurred

unsetRolePermission

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

Specified by:
unsetRolePermission in interface PermissionService
Parameters:
roleId - the primary key of the role
groupId - the primary key of the group
name - the resource name
scope - the resource scope
primKey - the resource primKey
actionId - the action's ID
Throws:
PortalException - if the group did not have permission to the role
SystemException - if a system exception occurred

unsetRolePermissions

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

Specified by:
unsetRolePermissions in interface PermissionService
Parameters:
roleId - the primary key of the role
groupId - the primary key of the group
name - the resource name
scope - the resource scope
actionId - the action's ID
Throws:
PortalException - if the group did not have permission to the role
SystemException - if a system exception occurred

unsetUserPermissions

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

Specified by:
unsetUserPermissions in interface PermissionService
Parameters:
userId - the primary key of the user
groupId - the primary key of the group
actionIds - the primary keys of the actions
resourceId - the primary key of the resource
Throws:
PortalException - if the group did not have permission to the resource
SystemException - if a system exception occurred

getWrappedPermissionService

public PermissionService getWrappedPermissionService()
Deprecated. Renamed to getWrappedService()


setWrappedPermissionService

public void setWrappedPermissionService(PermissionService permissionService)
Deprecated. Renamed to setWrappedService(com.liferay.portal.service.PermissionService)


getWrappedService

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

setWrappedService

public void setWrappedService(PermissionService permissionService)
Specified by:
setWrappedService in interface ServiceWrapper<PermissionService>

Liferay 6.1.2-ce-ga3