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 com.liferay.portal.PortalException,
60 com.liferay.portal.SystemException;
61
62 public void addUserRoles(long userId, long[] roleIds)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException;
65
66 public void deleteRole(long roleId)
67 throws 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 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) throws com.liferay.portal.SystemException;
79
80 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
81 public com.liferay.portal.model.Role getRole(long roleId)
82 throws com.liferay.portal.PortalException,
83 com.liferay.portal.SystemException;
84
85 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
86 public com.liferay.portal.model.Role getRole(long companyId,
87 java.lang.String name)
88 throws com.liferay.portal.PortalException,
89 com.liferay.portal.SystemException;
90
91 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
92 public java.util.List<com.liferay.portal.model.Role> getUserGroupRoles(
93 long userId, long groupId) throws com.liferay.portal.SystemException;
94
95 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
96 public java.util.List<com.liferay.portal.model.Role> getUserRelatedRoles(
97 long userId, java.util.List<com.liferay.portal.model.Group> groups)
98 throws com.liferay.portal.SystemException;
99
100 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
101 public java.util.List<com.liferay.portal.model.Role> getUserRoles(
102 long userId) throws com.liferay.portal.SystemException;
103
104 public boolean hasUserRole(long userId, long companyId,
105 java.lang.String name, boolean inherited)
106 throws com.liferay.portal.PortalException,
107 com.liferay.portal.SystemException;
108
109 public boolean hasUserRoles(long userId, long companyId,
110 java.lang.String[] names, boolean inherited)
111 throws com.liferay.portal.PortalException,
112 com.liferay.portal.SystemException;
113
114 public void unsetUserRoles(long userId, long[] roleIds)
115 throws com.liferay.portal.PortalException,
116 com.liferay.portal.SystemException;
117
118 public com.liferay.portal.model.Role updateRole(long roleId,
119 java.lang.String name,
120 java.util.Map<java.util.Locale, String> localeTitlesMap,
121 java.lang.String description, java.lang.String subtype)
122 throws com.liferay.portal.PortalException,
123 com.liferay.portal.SystemException;
124 }