com.liferay.portal.service
Interface RoleService

All Known Implementing Classes:
RoleServiceWrapper

@Transactional(isolation=PORTAL,
               rollbackFor={PortalException.class,SystemException.class})
public interface RoleService

View Source

ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

This interface defines the service. The default implementation is com.liferay.portal.service.impl.RoleServiceImpl}. Modify methods in that class and rerun ServiceBuilder to populate this class and all other generated classes.

This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.

Author:
Brian Wing Shun Chan
See Also:
RoleServiceUtil
Generated:

Method Summary
 Role addRole(java.lang.String name, java.util.Map<java.util.Locale,java.lang.String> titleMap, java.lang.String description, int type)
           
 void addUserRoles(long userId, long[] roleIds)
           
 void deleteRole(long roleId)
           
 java.util.List<Role> getGroupRoles(long groupId)
           
 Role getRole(long roleId)
           
 Role getRole(long companyId, java.lang.String name)
           
 java.util.List<Role> getUserGroupGroupRoles(long userId, long groupId)
           
 java.util.List<Role> getUserGroupRoles(long userId, long groupId)
           
 java.util.List<Role> getUserRelatedRoles(long userId, java.util.List<Group> groups)
           
 java.util.List<Role> getUserRoles(long userId)
           
 boolean hasUserRole(long userId, long companyId, java.lang.String name, boolean inherited)
           
 boolean hasUserRoles(long userId, long companyId, java.lang.String[] names, boolean inherited)
           
 void unsetUserRoles(long userId, long[] roleIds)
           
 Role updateRole(long roleId, java.lang.String name, java.util.Map<java.util.Locale,java.lang.String> titleMap, java.lang.String description, java.lang.String subtype)
           
 

Method Detail

addRole

Role addRole(java.lang.String name,
             java.util.Map<java.util.Locale,java.lang.String> titleMap,
             java.lang.String description,
             int type)
             throws PortalException,
                    SystemException
Throws:
PortalException
SystemException

addUserRoles

void addUserRoles(long userId,
                  long[] roleIds)
                  throws PortalException,
                         SystemException
Throws:
PortalException
SystemException

deleteRole

void deleteRole(long roleId)
                throws PortalException,
                       SystemException
Throws:
PortalException
SystemException

getGroupRoles

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<Role> getGroupRoles(long groupId)
                                   throws SystemException
Throws:
SystemException

getRole

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Role getRole(long roleId)
             throws PortalException,
                    SystemException
Throws:
PortalException
SystemException

getRole

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Role getRole(long companyId,
                                                      java.lang.String name)
             throws PortalException,
                    SystemException
Throws:
PortalException
SystemException

getUserGroupGroupRoles

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<Role> getUserGroupGroupRoles(long userId,
                                                                                     long groupId)
                                            throws SystemException
Throws:
SystemException

getUserGroupRoles

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<Role> getUserGroupRoles(long userId,
                                                                                long groupId)
                                       throws SystemException
Throws:
SystemException

getUserRelatedRoles

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<Role> getUserRelatedRoles(long userId,
                                                                                  java.util.List<Group> groups)
                                         throws SystemException
Throws:
SystemException

getUserRoles

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<Role> getUserRoles(long userId)
                                  throws SystemException
Throws:
SystemException

hasUserRole

@Transactional(propagation=SUPPORTS,
               readOnly=true)
boolean hasUserRole(long userId,
                                                             long companyId,
                                                             java.lang.String name,
                                                             boolean inherited)
                    throws PortalException,
                           SystemException
Throws:
PortalException
SystemException

hasUserRoles

@Transactional(propagation=SUPPORTS,
               readOnly=true)
boolean hasUserRoles(long userId,
                                                              long companyId,
                                                              java.lang.String[] names,
                                                              boolean inherited)
                     throws PortalException,
                            SystemException
Throws:
PortalException
SystemException

unsetUserRoles

void unsetUserRoles(long userId,
                    long[] roleIds)
                    throws PortalException,
                           SystemException
Throws:
PortalException
SystemException

updateRole

Role updateRole(long roleId,
                java.lang.String name,
                java.util.Map<java.util.Locale,java.lang.String> titleMap,
                java.lang.String description,
                java.lang.String subtype)
                throws PortalException,
                       SystemException
Throws:
PortalException
SystemException