|
Liferay 6.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Transactional(isolation=PORTAL, rollbackFor={PortalException.class,SystemException.class}) public interface RoleLocalService
The interface for the role local service.
Never modify or reference this interface directly. Always use RoleLocalServiceUtil
to access the role local service. Add custom service methods to RoleLocalServiceImpl
and rerun ServiceBuilder to automatically copy the method declarations to this interface.
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.
RoleLocalServiceUtil
,
RoleLocalServiceBaseImpl
,
RoleLocalServiceImpl
Method Summary | |
---|---|
Role |
addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
String description,
int type)
|
Role |
addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
String description,
int type,
String className,
long classPK)
|
Role |
addRole(Role role)
Adds the role to the database. |
void |
addUserRoles(long userId,
long[] roleIds)
|
void |
checkSystemRoles(long companyId)
|
Role |
createRole(long roleId)
Creates a new role with the primary key. |
void |
deleteRole(long roleId)
Deletes the role with the primary key from the database. |
void |
deleteRole(Role role)
Deletes the role from the database. |
List |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows. |
List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows. |
List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows. |
long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Counts the number of rows that match the dynamic query. |
Role |
getDefaultGroupRole(long groupId)
|
List<Role> |
getGroupRoles(long groupId)
|
Map<String,List<String>> |
getResourceRoles(long companyId,
String name,
int scope,
String primKey)
|
Role |
getRole(long roleId)
Gets the role with the primary key. |
Role |
getRole(long companyId,
String name)
|
List<Role> |
getRoles(int start,
int end)
Gets a range of all the roles. |
List<Role> |
getRoles(int type,
String subtype)
|
List<Role> |
getRoles(long companyId)
|
List<Role> |
getRoles(long[] roleIds)
|
int |
getRolesCount()
Gets the number of roles. |
List<Role> |
getSubtypeRoles(String subtype)
|
int |
getSubtypeRolesCount(String subtype)
|
Role |
getTeamRole(long companyId,
long teamId)
|
List<Role> |
getUserGroupGroupRoles(long userId,
long groupId)
|
List<Role> |
getUserGroupRoles(long userId,
long groupId)
|
List<Role> |
getUserRelatedRoles(long userId,
List<Group> groups)
|
List<Role> |
getUserRelatedRoles(long userId,
long groupId)
|
List<Role> |
getUserRelatedRoles(long userId,
long[] groupIds)
|
List<Role> |
getUserRoles(long userId)
|
boolean |
hasUserRole(long userId,
long roleId)
|
boolean |
hasUserRole(long userId,
long companyId,
String name,
boolean inherited)
Returns true if the user has the regular role. |
boolean |
hasUserRoles(long userId,
long companyId,
String[] names,
boolean inherited)
Returns true if the user has any one of the specified
regular roles. |
List<Role> |
search(long companyId,
String name,
String description,
Integer[] types,
int start,
int end,
OrderByComparator obc)
|
List<Role> |
search(long companyId,
String name,
String description,
Integer[] types,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator obc)
|
int |
searchCount(long companyId,
String name,
String description,
Integer[] types)
|
int |
searchCount(long companyId,
String name,
String description,
Integer[] types,
LinkedHashMap<String,Object> params)
|
void |
setUserRoles(long userId,
long[] roleIds)
|
void |
unsetUserRoles(long userId,
long[] roleIds)
|
Role |
updateRole(long roleId,
String name,
Map<Locale,String> titleMap,
String description,
String subtype)
|
Role |
updateRole(Role role)
Updates the role in the database. |
Role |
updateRole(Role role,
boolean merge)
Updates the role in the database. |
Method Detail |
---|
Role addRole(Role role) throws SystemException
role
- the role to add
SystemException
- if a system exception occurredRole createRole(long roleId)
roleId
- the primary key for the new role
void deleteRole(long roleId) throws PortalException, SystemException
roleId
- the primary key of the role to delete
PortalException
- if a role with the primary key could not be found
SystemException
- if a system exception occurredvoid deleteRole(Role role) throws SystemException
role
- the role to delete
SystemException
- if a system exception occurredList dynamicQuery(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery
- the dynamic query to search with
SystemException
- if a system exception occurredList dynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
dynamicQuery
- the dynamic query to search withstart
- the lower bound of the range of model instances to returnend
- the upper bound of the range of model instances to return (not inclusive)
SystemException
- if a system exception occurredList dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
dynamicQuery
- the dynamic query to search withstart
- the lower bound of the range of model instances to returnend
- the upper bound of the range of model instances to return (not inclusive)orderByComparator
- the comparator to order the results by
SystemException
- if a system exception occurredlong dynamicQueryCount(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery
- the dynamic query to search with
SystemException
- if a system exception occurred@Transactional(propagation=SUPPORTS, readOnly=true) Role getRole(long roleId) throws PortalException, SystemException
roleId
- the primary key of the role to get
PortalException
- if a role with the primary key could not be found
SystemException
- if a system exception occurred@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> getRoles(int start, int end) throws SystemException
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set.
start
- the lower bound of the range of roles to returnend
- the upper bound of the range of roles to return (not inclusive)
SystemException
- if a system exception occurred@Transactional(propagation=SUPPORTS, readOnly=true) int getRolesCount() throws SystemException
SystemException
- if a system exception occurredRole updateRole(Role role) throws SystemException
role
- the role to update
SystemException
- if a system exception occurredRole updateRole(Role role, boolean merge) throws SystemException
role
- the role to updatemerge
- whether to merge the role with the current session. See BatchSession.update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)
for an explanation.
SystemException
- if a system exception occurredRole addRole(long userId, long companyId, String name, Map<Locale,String> titleMap, String description, int type) throws PortalException, SystemException
PortalException
SystemException
Role addRole(long userId, long companyId, String name, Map<Locale,String> titleMap, String description, int type, String className, long classPK) throws PortalException, SystemException
PortalException
SystemException
void addUserRoles(long userId, long[] roleIds) throws PortalException, SystemException
PortalException
SystemException
void checkSystemRoles(long companyId) throws PortalException, SystemException
PortalException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) Role getDefaultGroupRole(long groupId) throws PortalException, SystemException
PortalException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> getGroupRoles(long groupId) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) Map<String,List<String>> getResourceRoles(long companyId, String name, int scope, String primKey) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) Role getRole(long companyId, String name) throws PortalException, SystemException
PortalException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> getRoles(long companyId) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> getRoles(long[] roleIds) throws PortalException, SystemException
PortalException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> getRoles(int type, String subtype) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> getSubtypeRoles(String subtype) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) int getSubtypeRolesCount(String subtype) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) Role getTeamRole(long companyId, long teamId) throws PortalException, SystemException
PortalException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> getUserGroupGroupRoles(long userId, long groupId) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> getUserGroupRoles(long userId, long groupId) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> getUserRelatedRoles(long userId, long groupId) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> getUserRelatedRoles(long userId, long[] groupIds) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> getUserRelatedRoles(long userId, List<Group> groups) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> getUserRoles(long userId) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) boolean hasUserRole(long userId, long roleId) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) boolean hasUserRole(long userId, long companyId, String name, boolean inherited) throws PortalException, SystemException
true
if the user has the regular role.
true
if the user has the regular role
PortalException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) boolean hasUserRoles(long userId, long companyId, String[] names, boolean inherited) throws PortalException, SystemException
true
if the user has any one of the specified
regular roles.
true
if the user has the regular role
PortalException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> search(long companyId, String name, String description, Integer[] types, int start, int end, OrderByComparator obc) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) List<Role> search(long companyId, String name, String description, Integer[] types, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator obc) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) int searchCount(long companyId, String name, String description, Integer[] types) throws SystemException
SystemException
@Transactional(propagation=SUPPORTS, readOnly=true) int searchCount(long companyId, String name, String description, Integer[] types, LinkedHashMap<String,Object> params) throws SystemException
SystemException
void setUserRoles(long userId, long[] roleIds) throws PortalException, SystemException
PortalException
SystemException
void unsetUserRoles(long userId, long[] roleIds) throws PortalException, SystemException
PortalException
SystemException
Role updateRole(long roleId, String name, Map<Locale,String> titleMap, String description, String subtype) throws PortalException, SystemException
PortalException
SystemException
|
Liferay 6.0.5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |