com.liferay.portal.service
Interface RoleService


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

Method Summary
 Role addRole(java.lang.String name, java.lang.String description, int type)
           
 void addUserRoles(long userId, long[] roleIds)
           
 void deleteRole(long roleId)
           
 Role getGroupRole(long companyId, long groupId)
           
 java.util.List<Role> getGroupRoles(long groupId)
           
 Role getRole(long roleId)
           
 Role getRole(long companyId, java.lang.String name)
           
 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.lang.String description)
           
 

Method Detail

addRole

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

addUserRoles

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

deleteRole

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

getGroupRole

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

getGroupRoles

java.util.List<Role> getGroupRoles(long groupId)
                                   throws java.rmi.RemoteException,
                                          com.liferay.portal.SystemException,
                                          com.liferay.portal.PortalException
Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException

getRole

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

getRole

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

getUserGroupRoles

java.util.List<Role> getUserGroupRoles(long userId,
                                       long groupId)
                                       throws java.rmi.RemoteException,
                                              com.liferay.portal.SystemException,
                                              com.liferay.portal.PortalException
Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException

getUserRelatedRoles

java.util.List<Role> getUserRelatedRoles(long userId,
                                         java.util.List<Group> groups)
                                         throws java.rmi.RemoteException,
                                                com.liferay.portal.SystemException,
                                                com.liferay.portal.PortalException
Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException

getUserRoles

java.util.List<Role> getUserRoles(long userId)
                                  throws java.rmi.RemoteException,
                                         com.liferay.portal.SystemException,
                                         com.liferay.portal.PortalException
Throws:
java.rmi.RemoteException
com.liferay.portal.SystemException
com.liferay.portal.PortalException

hasUserRole

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

hasUserRoles

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

unsetUserRoles

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

updateRole

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