Liferay 6.0.5

com.liferay.portal.service
Interface RoleService

All Known Implementing Classes:
RoleServiceBaseImpl, RoleServiceImpl, RoleServiceWrapper

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

The interface for the role remote service.

Never modify or reference this interface directly. Always use RoleServiceUtil to access the role remote service. Add custom service methods to RoleServiceImpl and rerun ServiceBuilder to automatically copy the method declarations to this interface.

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.

See Also:
RoleServiceUtil, RoleServiceBaseImpl, RoleServiceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

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

Method Detail

addRole

Role addRole(String name,
             Map<Locale,String> titleMap,
             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)
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,
                                                      String name)
             throws PortalException,
                    SystemException
Throws:
PortalException
SystemException

getUserGroupGroupRoles

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

getUserGroupRoles

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

getUserRelatedRoles

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

getUserRoles

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

hasUserRole

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

hasUserRoles

@Transactional(propagation=SUPPORTS,
               readOnly=true)
boolean hasUserRoles(long userId,
                                                              long companyId,
                                                              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,
                String name,
                Map<Locale,String> titleMap,
                String description,
                String subtype)
                throws PortalException,
                       SystemException
Throws:
PortalException
SystemException

Liferay 6.0.5