com.liferay.portal.service
Interface RoleLocalService


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:
RoleServiceFactory, RoleServiceUtil

Method Summary
 Role addRole(long userId, long companyId, java.lang.String name, int type)
           
 Role addRole(long userId, long companyId, java.lang.String name, int type, java.lang.String className, long classPK)
           
 Role addRole(Role model)
           
 void checkSystemRoles(long companyId)
           
 void deleteRole(long roleId)
           
 java.util.List dynamicQuery(com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
           
 java.util.List dynamicQuery(com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer, int begin, int end)
           
 Role getGroupRole(long companyId, long groupId)
           
 java.util.List getGroupRoles(long groupId)
           
 java.util.Map 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 getUserGroupRoles(long userId, long groupId)
           
 java.util.List getUserRelatedRoles(long userId, java.util.List groups)
           
 java.util.List getUserRelatedRoles(long userId, long groupId)
           
 java.util.List getUserRelatedRoles(long userId, long[] groupIds)
           
 java.util.List 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)
           
 java.util.List search(long companyId, java.lang.String name, java.lang.String description, java.lang.Integer type, int begin, int end)
           
 int searchCount(long companyId, java.lang.String name, java.lang.String description, java.lang.Integer type)
           
 void setUserRoles(long userId, long[] roleIds)
           
 Role updateRole(long roleId, java.lang.String name)
           
 Role updateRole(Role model)
           
 

Method Detail

addRole

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

dynamicQuery

public java.util.List dynamicQuery(com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
                            throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

dynamicQuery

public java.util.List dynamicQuery(com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
                                   int begin,
                                   int end)
                            throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

updateRole

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

addRole

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

addRole

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

checkSystemRoles

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

deleteRole

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

getGroupRole

public Role getGroupRole(long companyId,
                         long groupId)
                  throws com.liferay.portal.SystemException,
                         com.liferay.portal.PortalException
Throws:
com.liferay.portal.SystemException
com.liferay.portal.PortalException

getGroupRoles

public java.util.List getGroupRoles(long groupId)
                             throws com.liferay.portal.SystemException,
                                    com.liferay.portal.PortalException
Throws:
com.liferay.portal.SystemException
com.liferay.portal.PortalException

getResourceRoles

public java.util.Map getResourceRoles(long companyId,
                                      java.lang.String name,
                                      int scope,
                                      java.lang.String primKey)
                               throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getRole

public Role getRole(long roleId)
             throws com.liferay.portal.SystemException,
                    com.liferay.portal.PortalException
Throws:
com.liferay.portal.SystemException
com.liferay.portal.PortalException

getRole

public Role getRole(long companyId,
                    java.lang.String name)
             throws com.liferay.portal.SystemException,
                    com.liferay.portal.PortalException
Throws:
com.liferay.portal.SystemException
com.liferay.portal.PortalException

getUserGroupRoles

public java.util.List getUserGroupRoles(long userId,
                                        long groupId)
                                 throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getUserRelatedRoles

public java.util.List getUserRelatedRoles(long userId,
                                          long groupId)
                                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getUserRelatedRoles

public java.util.List getUserRelatedRoles(long userId,
                                          long[] groupIds)
                                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getUserRelatedRoles

public java.util.List getUserRelatedRoles(long userId,
                                          java.util.List groups)
                                   throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

getUserRoles

public java.util.List getUserRoles(long userId)
                            throws com.liferay.portal.SystemException,
                                   com.liferay.portal.PortalException
Throws:
com.liferay.portal.SystemException
com.liferay.portal.PortalException

hasUserRole

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

hasUserRoles

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

search

public java.util.List search(long companyId,
                             java.lang.String name,
                             java.lang.String description,
                             java.lang.Integer type,
                             int begin,
                             int end)
                      throws com.liferay.portal.SystemException
Throws:
com.liferay.portal.SystemException

searchCount

public 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

setUserRoles

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

updateRole

public Role updateRole(long roleId,
                       java.lang.String name)
                throws com.liferay.portal.SystemException,
                       com.liferay.portal.PortalException
Throws:
com.liferay.portal.SystemException
com.liferay.portal.PortalException