com.liferay.portal.service
Interface RoleLocalService


@Transactional(rollbackFor={com.liferay.portal.PortalException.class,com.liferay.portal.SystemException.class})
public interface RoleLocalService

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.RoleLocalServiceImpl. Modify methods in that class and rerun ServiceBuilder to populate this class and all other generated classes.

This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.

Author:
Brian Wing Shun Chan
See Also:
RoleLocalServiceUtil

Method Summary
 Role addRole(long userId, long companyId, java.lang.String name, java.lang.String description, int type)
           
 Role addRole(long userId, long companyId, java.lang.String name, java.lang.String description, int type, java.lang.String className, long classPK)
           
 Role addRole(Role role)
           
 void addUserRoles(long userId, long[] roleIds)
           
 void checkSystemRoles(long companyId)
           
 Role createRole(long roleId)
           
 void deleteRole(long roleId)
           
 void deleteRole(Role role)
           
 java.util.List<java.lang.Object> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
           
 java.util.List<java.lang.Object> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
           
 Role getGroupRole(long companyId, long groupId)
           
 java.util.List<Role> getGroupRoles(long groupId)
           
 java.util.Map<java.lang.String,java.util.List<java.lang.String>> getResourceRoles(long companyId, java.lang.String name, int scope, java.lang.String primKey)
           
 Role getRole(long roleId)
           
 Role getRole(long companyId, java.lang.String name)
           
 java.util.List<Role> getRoles(int start, int end)
           
 java.util.List<Role> getRoles(long companyId)
           
 java.util.List<Role> getRoles(long[] roleIds)
           
 int getRolesCount()
           
 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> getUserRelatedRoles(long userId, long groupId)
           
 java.util.List<Role> getUserRelatedRoles(long userId, long[] groupIds)
           
 java.util.List<Role> getUserRoles(long userId)
           
 boolean hasUserRole(long userId, long roleId)
           
 boolean hasUserRole(long userId, long companyId, java.lang.String name, boolean inherited)
           
 boolean hasUserRoles(long userId, long companyId, java.lang.String[] names, boolean inherited)
           
 java.util.List<Role> search(long companyId, java.lang.String name, java.lang.String description, java.lang.Integer type, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 java.util.List<Role> search(long companyId, java.lang.String name, java.lang.String description, java.lang.Integer type, java.util.LinkedHashMap<java.lang.String,java.lang.Object> params, int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
           
 int searchCount(long companyId, java.lang.String name, java.lang.String description, java.lang.Integer type)
           
 int searchCount(long companyId, java.lang.String name, java.lang.String description, java.lang.Integer type, java.util.LinkedHashMap<java.lang.String,java.lang.Object> params)
           
 void setUserRoles(long userId, long[] roleIds)
           
 void unsetUserRoles(long userId, long[] roleIds)
           
 Role updateRole(long roleId, java.lang.String name, java.util.Map<java.util.Locale,java.lang.String> localeTitlesMap, java.lang.String description, java.lang.String subtype)
           
 Role updateRole(Role role)
           
 

Method Detail

addRole

Role addRole(Role role)
             throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

createRole

Role createRole(long roleId)

deleteRole

void deleteRole(long roleId)
                throws com.liferay.portal.SystemException,
                       com.liferay.portal.PortalException
Throws:
com.liferay.portal.SystemException
com.liferay.portal.PortalException

deleteRole

void deleteRole(Role role)
                throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

dynamicQuery

java.util.List<java.lang.Object> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
                                              throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

dynamicQuery

java.util.List<java.lang.Object> dynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
                                              int start,
                                              int end)
                                              throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getRole

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

getRoles

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<Role> getRoles(int start,
                                            int end)
                              throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getRolesCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getRolesCount()
                  throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

updateRole

Role updateRole(Role role)
                throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

addRole

Role addRole(long userId,
             long companyId,
             java.lang.String name,
             java.lang.String description,
             int type)
             throws com.liferay.portal.PortalException,
                    com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addRole

Role addRole(long userId,
             long companyId,
             java.lang.String name,
             java.lang.String description,
             int type,
             java.lang.String className,
             long classPK)
             throws com.liferay.portal.PortalException,
                    com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

addUserRoles

void addUserRoles(long userId,
                  long[] roleIds)
                  throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

checkSystemRoles

void checkSystemRoles(long companyId)
                      throws com.liferay.portal.PortalException,
                             com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getGroupRole

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Role getGroupRole(long companyId,
                                long groupId)
                  throws com.liferay.portal.PortalException,
                         com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getGroupRoles

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

getResourceRoles

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.Map<java.lang.String,java.util.List<java.lang.String>> getResourceRoles(long companyId,
                                                                                                java.lang.String name,
                                                                                                int scope,
                                                                                                java.lang.String primKey)
                                                                                  throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getRole

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

getRoles

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<Role> getRoles(long companyId)
                              throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getRoles

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<Role> getRoles(long[] roleIds)
                              throws com.liferay.portal.PortalException,
                                     com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getUserGroupRoles

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

getUserRelatedRoles

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

getUserRelatedRoles

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<Role> getUserRelatedRoles(long userId,
                                                       long[] groupIds)
                                         throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getUserRelatedRoles

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

getUserRoles

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

hasUserRole

boolean hasUserRole(long userId,
                    long roleId)
                    throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

hasUserRole

boolean hasUserRole(long userId,
                    long companyId,
                    java.lang.String name,
                    boolean inherited)
                    throws com.liferay.portal.PortalException,
                           com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

hasUserRoles

boolean hasUserRoles(long userId,
                     long companyId,
                     java.lang.String[] names,
                     boolean inherited)
                     throws com.liferay.portal.PortalException,
                            com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<Role> search(long companyId,
                                          java.lang.String name,
                                          java.lang.String description,
                                          java.lang.Integer type,
                                          int start,
                                          int end,
                                          com.liferay.portal.kernel.util.OrderByComparator obc)
                            throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
java.util.List<Role> search(long companyId,
                                          java.lang.String name,
                                          java.lang.String description,
                                          java.lang.Integer type,
                                          java.util.LinkedHashMap<java.lang.String,java.lang.Object> params,
                                          int start,
                                          int end,
                                          com.liferay.portal.kernel.util.OrderByComparator obc)
                            throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

searchCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int searchCount(long companyId,
                              java.lang.String name,
                              java.lang.String description,
                              java.lang.Integer type)
                throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

searchCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int searchCount(long companyId,
                              java.lang.String name,
                              java.lang.String description,
                              java.lang.Integer type,
                              java.util.LinkedHashMap<java.lang.String,java.lang.Object> params)
                throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

setUserRoles

void setUserRoles(long userId,
                  long[] roleIds)
                  throws com.liferay.portal.PortalException,
                         com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

unsetUserRoles

void unsetUserRoles(long userId,
                    long[] roleIds)
                    throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

updateRole

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