1
22
23 package com.liferay.portal.service;
24
25 import com.liferay.portal.PortalException;
26 import com.liferay.portal.SystemException;
27 import com.liferay.portal.kernel.annotation.Propagation;
28 import com.liferay.portal.kernel.annotation.Transactional;
29
30
54 @Transactional(rollbackFor = {
55 PortalException.class, SystemException.class})
56 public interface RoleService {
57 public com.liferay.portal.model.Role addRole(java.lang.String name,
58 java.lang.String description, int type)
59 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
60 com.liferay.portal.SystemException;
61
62 public void addUserRoles(long userId, long[] roleIds)
63 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException;
65
66 public void deleteRole(long roleId)
67 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
68 com.liferay.portal.SystemException;
69
70 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
71 public com.liferay.portal.model.Role getGroupRole(long companyId,
72 long groupId)
73 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
74 com.liferay.portal.SystemException;
75
76 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
77 public java.util.List<com.liferay.portal.model.Role> getGroupRoles(
78 long groupId)
79 throws java.rmi.RemoteException, com.liferay.portal.SystemException;
80
81 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
82 public com.liferay.portal.model.Role getRole(long roleId)
83 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
84 com.liferay.portal.SystemException;
85
86 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
87 public com.liferay.portal.model.Role getRole(long companyId,
88 java.lang.String name)
89 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
90 com.liferay.portal.SystemException;
91
92 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
93 public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
94 long userId, long groupId)
95 throws java.rmi.RemoteException, com.liferay.portal.SystemException;
96
97 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
98 public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
99 long userId, java.util.List<com.liferay.portal.model.Group> groups)
100 throws java.rmi.RemoteException, com.liferay.portal.SystemException;
101
102 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
103 public java.util.List<com.liferay.portal.model.Role> getUserRoles(
104 long userId)
105 throws java.rmi.RemoteException, com.liferay.portal.SystemException;
106
107 public boolean hasUserRole(long userId, long companyId,
108 java.lang.String name, boolean inherited)
109 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
110 com.liferay.portal.SystemException;
111
112 public boolean hasUserRoles(long userId, long companyId,
113 java.lang.String[] names, boolean inherited)
114 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
115 com.liferay.portal.SystemException;
116
117 public void unsetUserRoles(long userId, long[] roleIds)
118 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
119 com.liferay.portal.SystemException;
120
121 public com.liferay.portal.model.Role updateRole(long roleId,
122 java.lang.String name, java.lang.String description)
123 throws java.rmi.RemoteException, com.liferay.portal.PortalException,
124 com.liferay.portal.SystemException;
125 }