|
Liferay 6.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@ProviderType
@Transactional(isolation=PORTAL,
rollbackFor={PortalException.class,SystemException.class})
public interface RoleLocalServiceProvides the local service interface for Role. 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 | |
|---|---|
abstract void |
addGroupRole(long groupId,
long roleId)
|
abstract void |
addGroupRole(long groupId,
Role role)
|
abstract void |
addGroupRoles(long groupId,
List<Role> roles)
|
abstract void |
addGroupRoles(long groupId,
long[] roleIds)
|
abstract Role |
addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type)
Deprecated. As of 6.2.0, replaced by addRole(long, String, long,
String, Map, Map, int, String, ServiceContext) |
abstract Role |
addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type,
String className,
long classPK)
Deprecated. As of 6.2.0, replaced by addRole(long, String, long,
String, Map, Map, int, String, ServiceContext) |
abstract Role |
addRole(long userId,
String className,
long classPK,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type,
String subtype,
ServiceContext serviceContext)
Adds a role with additional parameters. |
abstract Role |
addRole(Role role)
Adds the role to the database. |
abstract void |
addUserRole(long userId,
long roleId)
|
abstract void |
addUserRole(long userId,
Role role)
|
abstract void |
addUserRoles(long userId,
List<Role> roles)
|
abstract void |
addUserRoles(long userId,
long[] roleIds)
|
abstract void |
checkSystemRoles()
Checks to ensure that the system roles map has appropriate default roles in each company. |
abstract void |
checkSystemRoles(long companyId)
Checks to ensure that the system roles map has appropriate default roles in the company. |
abstract void |
clearGroupRoles(long groupId)
|
abstract void |
clearUserRoles(long userId)
|
abstract Role |
createRole(long roleId)
Creates a new role with the primary key. |
abstract void |
deleteGroupRole(long groupId,
long roleId)
|
abstract void |
deleteGroupRole(long groupId,
Role role)
|
abstract void |
deleteGroupRoles(long groupId,
List<Role> roles)
|
abstract void |
deleteGroupRoles(long groupId,
long[] roleIds)
|
abstract Role |
deleteRole(long roleId)
Deletes the role with the primary key from the database. |
abstract Role |
deleteRole(Role role)
Deletes the role from the database. |
abstract void |
deleteUserRole(long userId,
long roleId)
|
abstract void |
deleteUserRole(long userId,
Role role)
|
abstract void |
deleteUserRoles(long userId,
List<Role> roles)
|
abstract void |
deleteUserRoles(long userId,
long[] roleIds)
|
abstract DynamicQuery |
dynamicQuery()
|
abstract List |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows. |
abstract List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows. |
abstract 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. |
abstract long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows that match the dynamic query. |
abstract long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows that match the dynamic query. |
abstract Role |
fetchRole(long roleId)
|
abstract Role |
fetchRole(long companyId,
String name)
Returns the role with the name in the company. |
abstract Role |
fetchRoleByUuidAndCompanyId(String uuid,
long companyId)
Returns the role with the matching UUID and company. |
abstract String |
getBeanIdentifier()
Returns the Spring bean ID for this bean. |
abstract Role |
getDefaultGroupRole(long groupId)
Returns the default role for the group with the primary key. |
abstract List<Role> |
getGroupRelatedRoles(long groupId)
|
abstract List<Role> |
getGroupRoles(long groupId)
|
abstract List<Role> |
getGroupRoles(long groupId,
int start,
int end)
|
abstract List<Role> |
getGroupRoles(long groupId,
int start,
int end,
OrderByComparator orderByComparator)
|
abstract int |
getGroupRolesCount(long groupId)
|
abstract PersistedModel |
getPersistedModel(Serializable primaryKeyObj)
|
abstract List<Role> |
getResourceBlockRoles(long resourceBlockId,
String className,
String actionId)
|
abstract Map<String,List<String>> |
getResourceRoles(long companyId,
String name,
int scope,
String primKey)
Returns a map of role names to associated action IDs for the named resource in the company within the permission scope. |
abstract List<Role> |
getResourceRoles(long companyId,
String name,
int scope,
String primKey,
String actionId)
Returns all the roles associated with the action ID in the company within the permission scope. |
abstract Role |
getRole(long roleId)
Returns the role with the primary key. |
abstract Role |
getRole(long companyId,
String name)
Returns the role with the name in the company. |
abstract Role |
getRoleByUuidAndCompanyId(String uuid,
long companyId)
Returns the role with the matching UUID and company. |
abstract List<Role> |
getRoles(int start,
int end)
Returns a range of all the roles. |
abstract List<Role> |
getRoles(int type,
String subtype)
Returns all the roles of the type and subtype. |
abstract List<Role> |
getRoles(long companyId)
Returns all the roles in the company. |
abstract List<Role> |
getRoles(long[] roleIds)
Returns all the roles with the primary keys. |
abstract List<Role> |
getRoles(long companyId,
int[] types)
Returns all the roles with the types. |
abstract int |
getRolesCount()
Returns the number of roles. |
abstract List<Role> |
getSubtypeRoles(String subtype)
Returns all the roles of the subtype. |
abstract int |
getSubtypeRolesCount(String subtype)
Returns the number of roles of the subtype. |
abstract Role |
getTeamRole(long companyId,
long teamId)
Returns the team role in the company. |
abstract Map<Team,Role> |
getTeamRoleMap(long groupId)
Returns the team role map for the group. |
abstract List<Role> |
getTeamRoles(long groupId)
Returns the team roles in the group. |
abstract List<Role> |
getTeamRoles(long groupId,
long[] excludedRoleIds)
Returns the team roles in the group, excluding the specified role IDs. |
abstract List<Role> |
getTypeRoles(int type)
Returns all the roles of the type. |
abstract List<Role> |
getTypeRoles(int type,
int start,
int end)
Returns a range of all the roles of the type. |
abstract int |
getTypeRolesCount(int type)
Returns the number of roles of the type. |
abstract List<Role> |
getUserGroupGroupRoles(long userId,
long groupId)
Returns all the user's roles within the user group. |
abstract List<Role> |
getUserGroupGroupRoles(long userId,
long groupId,
int start,
int end)
|
abstract int |
getUserGroupGroupRolesCount(long userId,
long groupId)
|
abstract List<Role> |
getUserGroupRoles(long userId,
long groupId)
Returns all the user's roles within the user group. |
abstract List<Role> |
getUserRelatedRoles(long userId,
List<Group> groups)
Returns the union of all the user's roles within the groups. |
abstract List<Role> |
getUserRelatedRoles(long userId,
long groupId)
Returns all the user's roles within the group. |
abstract List<Role> |
getUserRelatedRoles(long userId,
long[] groupIds)
Returns the union of all the user's roles within the groups. |
abstract List<Role> |
getUserRoles(long userId)
|
abstract List<Role> |
getUserRoles(long userId,
int start,
int end)
|
abstract List<Role> |
getUserRoles(long userId,
int start,
int end,
OrderByComparator orderByComparator)
|
abstract int |
getUserRolesCount(long userId)
|
abstract boolean |
hasGroupRole(long groupId,
long roleId)
|
abstract boolean |
hasGroupRoles(long groupId)
|
abstract boolean |
hasUserRole(long userId,
long roleId)
|
abstract boolean |
hasUserRole(long userId,
long companyId,
String name,
boolean inherited)
Returns true if the user is associated with the named
regular role. |
abstract boolean |
hasUserRoles(long userId)
|
abstract boolean |
hasUserRoles(long userId,
long companyId,
String[] names,
boolean inherited)
Returns true if the user has any one of the named regular
roles. |
abstract Role |
loadFetchRole(long companyId,
String name)
Returns a role with the name in the company. |
abstract Role |
loadGetRole(long companyId,
String name)
Returns a role with the name in the company. |
abstract List<Role> |
search(long companyId,
String keywords,
Integer[] types,
int start,
int end,
OrderByComparator obc)
Returns an ordered range of all the roles that match the keywords and types. |
abstract List<Role> |
search(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator obc)
Returns an ordered range of all the roles that match the keywords, types, and params. |
abstract List<Role> |
search(long companyId,
String name,
String description,
Integer[] types,
int start,
int end,
OrderByComparator obc)
Returns an ordered range of all the roles that match the name, description, and types. |
abstract List<Role> |
search(long companyId,
String name,
String description,
Integer[] types,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator obc)
Returns an ordered range of all the roles that match the name, description, types, and params. |
abstract int |
searchCount(long companyId,
String keywords,
Integer[] types)
Returns the number of roles that match the keywords and types. |
abstract int |
searchCount(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params)
Returns the number of roles that match the keywords, types and params. |
abstract int |
searchCount(long companyId,
String name,
String description,
Integer[] types)
Returns the number of roles that match the name, description, and types. |
abstract int |
searchCount(long companyId,
String name,
String description,
Integer[] types,
LinkedHashMap<String,Object> params)
Returns the number of roles that match the name, description, types, and params. |
abstract void |
setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean. |
abstract void |
setGroupRoles(long groupId,
long[] roleIds)
|
abstract void |
setUserRoles(long userId,
long[] roleIds)
|
abstract void |
unsetUserRoles(long userId,
long[] roleIds)
Removes the matching roles associated with the user. |
abstract Role |
updateRole(long roleId,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
String subtype,
ServiceContext serviceContext)
Updates the role with the primary key. |
abstract Role |
updateRole(Role role)
Updates the role in the database or adds it if it does not yet exist. |
| Method Detail |
|---|
@Indexable(type=REINDEX)
Role addRole(Role role)
throws SystemException
role - the role
SystemException - if a system exception occurredRole createRole(long roleId)
roleId - the primary key for the new role
@Indexable(type=DELETE)
Role deleteRole(long roleId)
throws PortalException,
SystemException
roleId - the primary key of the role
PortalException - if a role with the primary key could not be found
SystemException - if a system exception occurred
@Indexable(type=DELETE)
Role deleteRole(Role role)
throws PortalException,
SystemException
role - the role
PortalException
SystemException - if a system exception occurredDynamicQuery dynamicQuery()
List dynamicQuery(DynamicQuery dynamicQuery)
throws SystemException
dynamicQuery - the dynamic query
SystemException - if a system exception occurred
List 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from RoleModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)
SystemException - if a system exception occurred
List 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from RoleModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery - the dynamic querystart - the lower bound of the range of model instancesend - the upper bound of the range of model instances (not inclusive)orderByComparator - the comparator to order the results by (optionally null)
SystemException - if a system exception occurred
long dynamicQueryCount(DynamicQuery dynamicQuery)
throws SystemException
dynamicQuery - the dynamic query
SystemException - if a system exception occurred
long dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
throws SystemException
dynamicQuery - the dynamic queryprojection - the projection to apply to the query
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
Role fetchRole(long roleId)
throws SystemException
SystemException
@Transactional(propagation=SUPPORTS,
readOnly=true)
Role fetchRoleByUuidAndCompanyId(String uuid,
long companyId)
throws SystemException
uuid - the role's UUIDcompanyId - the primary key of the company
null if a matching role could not be found
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
PortalException - if a role with the primary key could not be found
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
PersistedModel getPersistedModel(Serializable primaryKeyObj)
throws PortalException,
SystemException
getPersistedModel in interface PersistedModelLocalServicePortalException
SystemException
@Transactional(propagation=SUPPORTS,
readOnly=true)
Role getRoleByUuidAndCompanyId(String uuid,
long companyId)
throws PortalException,
SystemException
uuid - the role's UUIDcompanyId - the primary key of the company
PortalException - if a matching role 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from RoleModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
start - the lower bound of the range of rolesend - the upper bound of the range of roles (not inclusive)
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
int getRolesCount()
throws SystemException
SystemException - if a system exception occurred
@Indexable(type=REINDEX)
Role updateRole(Role role)
throws SystemException
role - the role
SystemException - if a system exception occurred
void addGroupRole(long groupId,
long roleId)
throws SystemException
SystemException - if a system exception occurred
void addGroupRole(long groupId,
Role role)
throws SystemException
SystemException - if a system exception occurred
void addGroupRoles(long groupId,
long[] roleIds)
throws SystemException
SystemException - if a system exception occurred
void addGroupRoles(long groupId,
List<Role> roles)
throws SystemException
SystemException - if a system exception occurred
void clearGroupRoles(long groupId)
throws SystemException
SystemException - if a system exception occurred
void deleteGroupRole(long groupId,
long roleId)
throws SystemException
SystemException - if a system exception occurred
void deleteGroupRole(long groupId,
Role role)
throws SystemException
SystemException - if a system exception occurred
void deleteGroupRoles(long groupId,
long[] roleIds)
throws SystemException
SystemException - if a system exception occurred
void deleteGroupRoles(long groupId,
List<Role> roles)
throws SystemException
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getGroupRoles(long groupId)
throws SystemException
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getGroupRoles(long groupId,
int start,
int end)
throws SystemException
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getGroupRoles(long groupId,
int start,
int end,
OrderByComparator orderByComparator)
throws SystemException
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
int getGroupRolesCount(long groupId)
throws SystemException
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
boolean hasGroupRole(long groupId,
long roleId)
throws SystemException
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
boolean hasGroupRoles(long groupId)
throws SystemException
SystemException - if a system exception occurred
void setGroupRoles(long groupId,
long[] roleIds)
throws SystemException
SystemException - if a system exception occurred
void addUserRole(long userId,
long roleId)
throws PortalException,
SystemException
PortalException
SystemException - if a system exception occurred
void addUserRole(long userId,
Role role)
throws PortalException,
SystemException
PortalException
SystemException - if a system exception occurred
void addUserRoles(long userId,
long[] roleIds)
throws PortalException,
SystemException
PortalException
SystemException - if a system exception occurred
void addUserRoles(long userId,
List<Role> roles)
throws PortalException,
SystemException
PortalException
SystemException - if a system exception occurred
void clearUserRoles(long userId)
throws PortalException,
SystemException
PortalException
SystemException - if a system exception occurred
void deleteUserRole(long userId,
long roleId)
throws PortalException,
SystemException
PortalException
SystemException - if a system exception occurred
void deleteUserRole(long userId,
Role role)
throws PortalException,
SystemException
PortalException
SystemException - if a system exception occurred
void deleteUserRoles(long userId,
long[] roleIds)
throws PortalException,
SystemException
PortalException
SystemException - if a system exception occurred
void deleteUserRoles(long userId,
List<Role> roles)
throws PortalException,
SystemException
PortalException
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getUserRoles(long userId)
throws SystemException
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getUserRoles(long userId,
int start,
int end)
throws SystemException
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getUserRoles(long userId,
int start,
int end,
OrderByComparator orderByComparator)
throws SystemException
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
int getUserRolesCount(long userId)
throws SystemException
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
boolean hasUserRole(long userId,
long roleId)
throws SystemException
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
boolean hasUserRoles(long userId)
throws SystemException
SystemException - if a system exception occurred
void setUserRoles(long userId,
long[] roleIds)
throws PortalException,
SystemException
PortalException
SystemException - if a system exception occurredString getBeanIdentifier()
void setBeanIdentifier(String beanIdentifier)
beanIdentifier - the Spring bean ID for this bean
Role addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type)
throws PortalException,
SystemException
addRole(long, String, long,
String, Map, Map, int, String, ServiceContext)
userId - the primary key of the usercompanyId - the primary key of the companyname - the role's nametitleMap - the role's localized titles (optionally
null)descriptionMap - the role's localized descriptions (optionally
null)type - the role's type (optionally 0)
PortalException - if the class name or the role name were
invalid, if the role is a duplicate, or if a user with the
primary key could not be found
SystemException - if a system exception occurred
Role addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type,
String className,
long classPK)
throws PortalException,
SystemException
addRole(long, String, long,
String, Map, Map, int, String, ServiceContext)
userId - the primary key of the usercompanyId - the primary key of the companyname - the role's nametitleMap - the role's localized titles (optionally
null)descriptionMap - the role's localized descriptions (optionally
null)type - the role's type (optionally 0)className - the name of the class for which the role is created
(optionally null)classPK - the primary key of the class for which the role is
created (optionally 0)
PortalException - if the class name or the role name were
invalid, if the role is a duplicate, or if a user with the
primary key could not be found
SystemException - if a system exception occurred
Role addRole(long userId,
String className,
long classPK,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type,
String subtype,
ServiceContext serviceContext)
throws PortalException,
SystemException
userId - the primary key of the userclassName - the name of the class for which the role is created
(optionally null)classPK - the primary key of the class for which the role is
created (optionally 0)name - the role's nametitleMap - the role's localized titles (optionally
null)descriptionMap - the role's localized descriptions (optionally
null)type - the role's type (optionally 0)subtype - the role's subtype (optionally null)serviceContext - the service context to be applied (optionally
null). Can set expando bridge attributes for the
role.
PortalException - if the class name or the role name were invalid,
if the role is a duplicate, or if a user with the primary key
could not be found
SystemException - if a system exception occurred
void checkSystemRoles()
throws PortalException,
SystemException
PortalException - if the current user did not have permission to
set applicable permissions on a role
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
void checkSystemRoles(long companyId)
throws PortalException,
SystemException
companyId - the primary key of the company
PortalException - if the current user did not have permission to
set applicable permissions on a role
SystemException - if a system exception occurred
@Skip
@Transactional(propagation=SUPPORTS,
readOnly=true)
Role fetchRole(long companyId,
String name)
throws SystemException
The method searches the system roles map first for default roles. If a role with the name is not found, then the method will query the database.
companyId - the primary key of the companyname - the role's name
null if a role
with the name could not be found in the company
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
Role getDefaultGroupRole(long groupId)
throws PortalException,
SystemException
If the group is a site, then the default role is RoleConstants.SITE_MEMBER. If the group is an
organization, then the default role is RoleConstants.ORGANIZATION_USER. If the group
is a user or user group, then the default role is RoleConstants.POWER_USER. For all other group
types, the default role is RoleConstants.USER.
groupId - the primary key of the group
PortalException - if a group with the primary key could not be
found, or if a default role could not be found for the group
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getGroupRelatedRoles(long groupId)
throws PortalException,
SystemException
PortalException
SystemException
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getResourceBlockRoles(long resourceBlockId,
String className,
String actionId)
throws SystemException
SystemException
@Transactional(propagation=SUPPORTS,
readOnly=true)
Map<String,List<String>> getResourceRoles(long companyId,
String name,
int scope,
String primKey)
throws SystemException
companyId - the primary key of the companyname - the resource namescope - the permission scopeprimKey - the primary key of the resource's class
SystemException - if a system exception occurredRoleFinder.findByC_N_S_P(
long, String, int, String)
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getResourceRoles(long companyId,
String name,
int scope,
String primKey,
String actionId)
throws SystemException
companyId - the primary key of the companyname - the resource namescope - the permission scopeprimKey - the primary key of the resource's classactionId - the name of the resource action
SystemException - if a system exception occurredRoleFinder.findByC_N_S_P_A(
long, String, int, String, String)
@Skip
@Transactional(propagation=SUPPORTS,
readOnly=true)
Role getRole(long companyId,
String name)
throws PortalException,
SystemException
The method searches the system roles map first for default roles. If a role with the name is not found, then the method will query the database.
companyId - the primary key of the companyname - the role's name
PortalException - if a role with the name could not be found in the
company
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getRoles(int type,
String subtype)
throws SystemException
type - the role's type (optionally 0)subtype - the role's subtype (optionally null)
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getRoles(long companyId)
throws SystemException
companyId - the primary key of the company
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getRoles(long companyId,
int[] types)
throws SystemException
companyId - the primary key of the companytypes - the role types (optionally null)
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getRoles(long[] roleIds)
throws PortalException,
SystemException
roleIds - the primary keys of the roles
PortalException - if any one of the roles with the primary keys
could not be found
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getSubtypeRoles(String subtype)
throws SystemException
subtype - the role's subtype (optionally null)
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
int getSubtypeRolesCount(String subtype)
throws SystemException
subtype - the role's subtype (optionally null)
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
Role getTeamRole(long companyId,
long teamId)
throws PortalException,
SystemException
companyId - the primary key of the companyteamId - the primary key of the team
PortalException - if a role could not be found in the team and
company
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
Map<Team,Role> getTeamRoleMap(long groupId)
throws PortalException,
SystemException
groupId - the primary key of the group
PortalException - if a group with the primary key could not be
found, if a role could not be found in one of the group's teams,
or if a portal exception occurred
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getTeamRoles(long groupId)
throws PortalException,
SystemException
groupId - the primary key of the group
PortalException - if a group with the primary key could not be
found, if a role could not be found in one of the group's teams,
or if a portal exception occurred
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getTeamRoles(long groupId,
long[] excludedRoleIds)
throws PortalException,
SystemException
groupId - the primary key of the groupexcludedRoleIds - the primary keys of the roles to exclude
(optionally null)
PortalException - if a group with the primary key could not be
found, if a role could not be found in one of the group's teams,
or if a portal exception occurred
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getTypeRoles(int type)
throws SystemException
type - the role's type (optionally 0)
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getTypeRoles(int type,
int start,
int end)
throws SystemException
type - the role's type (optionally 0)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 getTypeRolesCount(int type)
throws SystemException
type - the role's type (optionally 0)
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getUserGroupGroupRoles(long userId,
long groupId)
throws SystemException
userId - the primary key of the usergroupId - the primary key of the group
SystemException - if a system exception occurredRoleFinder.findByUserGroupGroupRole(
long, long)
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getUserGroupGroupRoles(long userId,
long groupId,
int start,
int end)
throws SystemException
SystemException
@Transactional(propagation=SUPPORTS,
readOnly=true)
int getUserGroupGroupRolesCount(long userId,
long groupId)
throws SystemException
SystemException
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getUserGroupRoles(long userId,
long groupId)
throws SystemException
userId - the primary key of the usergroupId - the primary key of the group
SystemException - if a system exception occurredRoleFinder.findByUserGroupRole(
long, long)
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getUserRelatedRoles(long userId,
List<Group> groups)
throws SystemException
userId - the primary key of the usergroups - the groups (optionally null)
SystemException - if a system exception occurredRoleFinder.findByU_G(
long, List)
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getUserRelatedRoles(long userId,
long groupId)
throws SystemException
userId - the primary key of the usergroupId - the primary key of the group
SystemException - if a system exception occurredRoleFinder.findByU_G(
long, long)
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> getUserRelatedRoles(long userId,
long[] groupIds)
throws SystemException
userId - the primary key of the usergroupIds - the primary keys of the groups
SystemException - if a system exception occurredRoleFinder.findByU_G(
long, long[])
@ThreadLocalCachable
@Transactional(propagation=SUPPORTS,
readOnly=true)
boolean hasUserRole(long userId,
long companyId,
String name,
boolean inherited)
throws PortalException,
SystemException
true if the user is associated with the named
regular role.
userId - the primary key of the usercompanyId - the primary key of the companyname - the name of the roleinherited - whether to include the user's inherited roles in the
search
true if the user is associated with the regular
role; false otherwise
PortalException - if a default user for the company could not be
found
SystemException - if a system exception occurred
@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 named regular
roles.
userId - the primary key of the usercompanyId - the primary key of the companynames - the names of the rolesinherited - whether to include the user's inherited roles in the
search
true if the user has any one of the regular roles;
false otherwise
PortalException - if any one of the roles with the names could not
be found in the company or if the default user for the company
could not be found
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
Role loadFetchRole(long companyId,
String name)
throws SystemException
companyId - the primary key of the companyname - the role's name (optionally null)
null if a role with the
name could not be found in the company
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
Role loadGetRole(long companyId,
String name)
throws PortalException,
SystemException
companyId - the primary key of the companyname - the role's name
PortalException - if a role with the name could not be found in the
company
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> search(long companyId,
String keywords,
Integer[] types,
int start,
int end,
OrderByComparator obc)
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.
companyId - the primary key of the companykeywords - the keywords (space separated), which may occur in the
role's name or description (optionally null)types - the role types (optionally null)start - the lower bound of the range of roles to returnend - the upper bound of the range of roles to return (not
inclusive)obc - the comparator to order the roles (optionally
null)
obc
SystemException - if a system exception occurredRoleFinder
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> search(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator obc)
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.
companyId - the primary key of the companykeywords - the keywords (space separated), which may occur in the
role's name or description (optionally null)types - the role types (optionally null)params - the finder parameters. Can specify values for the
"usersRoles" key. For more information, see RoleFinderstart - the lower bound of the range of roles to returnend - the upper bound of the range of roles to return (not
inclusive)obc - the comparator to order the roles (optionally
null)
obc
SystemException - if a system exception occurredRoleFinder
@Transactional(propagation=SUPPORTS,
readOnly=true)
List<Role> search(long companyId,
String name,
String description,
Integer[] types,
int start,
int end,
OrderByComparator obc)
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.
companyId - the primary key of the companyname - the role's name (optionally null)description - the role's description (optionally null)types - the role types (optionally null)start - the lower bound of the range of the roles to returnend - the upper bound of the range of the roles to return (not
inclusive)obc - the comparator to order the roles (optionally
null)
obc
SystemException - if a system exception occurredRoleFinder
@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
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.
companyId - the primary key of the companyname - the role's name (optionally null)description - the role's description (optionally null)types - the role types (optionally null)params - the finder's parameters. Can specify values for the
"usersRoles" key. For more information, see RoleFinderstart - the lower bound of the range of the roles to returnend - the upper bound of the range of the roles to return (not
inclusive)obc - the comparator to order the roles (optionally
null)
obc
SystemException - if a system exception occurredRoleFinder
@Transactional(propagation=SUPPORTS,
readOnly=true)
int searchCount(long companyId,
String keywords,
Integer[] types)
throws SystemException
companyId - the primary key of the companykeywords - the keywords (space separated), which may occur in the
role's name or description (optionally null)types - the role types (optionally null)
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
int searchCount(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params)
throws SystemException
companyId - the primary key of the companykeywords - the keywords (space separated), which may occur in the
role's name or description (optionally null)types - the role types (optionally null)params - the finder parameters. For more information, see RoleFinder
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
int searchCount(long companyId,
String name,
String description,
Integer[] types)
throws SystemException
companyId - the primary key of the companyname - the role's name (optionally null)description - the role's description (optionally null)types - the role types (optionally null)
SystemException - if a system exception occurred
@Transactional(propagation=SUPPORTS,
readOnly=true)
int searchCount(long companyId,
String name,
String description,
Integer[] types,
LinkedHashMap<String,Object> params)
throws SystemException
companyId - the primary key of the companyname - the role's name (optionally null)description - the role's description (optionally null)types - the role types (optionally null)params - the finder parameters. Can specify values for the
"usersRoles" key. For more information, see RoleFinder
SystemException - if a system exception occurred
void unsetUserRoles(long userId,
long[] roleIds)
throws PortalException,
SystemException
userId - the primary key of the userroleIds - the primary keys of the roles
PortalException - if a user with the primary key could not be found
or if a role with any one of the primary keys could not be found
SystemException - if a system exception occurred
Role updateRole(long roleId,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
String subtype,
ServiceContext serviceContext)
throws PortalException,
SystemException
roleId - the primary key of the rolename - the role's new nametitleMap - the new localized titles (optionally null)
to replace those existing for the roledescriptionMap - the new localized descriptions (optionally
null) to replace those existing for the rolesubtype - the role's new subtype (optionally null)serviceContext - the service context to be applied (optionally
null). Can set expando bridge attributes for the
role.
PortalException - if a role with the primary could not be found or
if the role's name was invalid
SystemException - if a system exception occurred
|
Liferay 6.2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||