|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portal.service.RoleLocalServiceWrapper
public class RoleLocalServiceWrapper
This class is a wrapper for RoleLocalService
.
RoleLocalService
Constructor Summary | |
---|---|
RoleLocalServiceWrapper(RoleLocalService roleLocalService)
|
Method Summary | |
---|---|
void |
addGroupRole(long groupId,
long roleId)
|
void |
addGroupRole(long groupId,
Role role)
|
void |
addGroupRoles(long groupId,
List<Role> Roles)
|
void |
addGroupRoles(long groupId,
long[] roleIds)
|
void |
addPermissionRole(long permissionId,
long roleId)
|
void |
addPermissionRole(long permissionId,
Role role)
|
void |
addPermissionRoles(long permissionId,
List<Role> Roles)
|
void |
addPermissionRoles(long permissionId,
long[] roleIds)
|
Role |
addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type)
Deprecated. addRole(long, String, long, String, Map, Map, int,
String) |
Role |
addRole(long userId,
long companyId,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type,
String className,
long classPK)
Deprecated. addRole(long, String, long, String, Map, Map, int,
String) |
Role |
addRole(long userId,
String className,
long classPK,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type,
String subType)
Adds a role with additional parameters. |
Role |
addRole(Role role)
Adds the role to the database. |
void |
addUserRole(long userId,
long roleId)
|
void |
addUserRole(long userId,
Role role)
|
void |
addUserRoles(long userId,
List<Role> Roles)
|
void |
addUserRoles(long userId,
long[] roleIds)
|
void |
checkSystemRoles()
Checks to ensure that the system roles map has appropriate default roles in each company. |
void |
checkSystemRoles(long companyId)
Checks to ensure that the system roles map has appropriate default roles in the company. |
void |
clearGroupRoles(long groupId)
|
void |
clearPermissionRoles(long permissionId)
|
void |
clearUserRoles(long userId)
|
Role |
createRole(long roleId)
Creates a new role with the primary key. |
void |
deleteGroupRole(long groupId,
long roleId)
|
void |
deleteGroupRole(long groupId,
Role role)
|
void |
deleteGroupRoles(long groupId,
List<Role> Roles)
|
void |
deleteGroupRoles(long groupId,
long[] roleIds)
|
void |
deletePermissionRole(long permissionId,
long roleId)
|
void |
deletePermissionRole(long permissionId,
Role role)
|
void |
deletePermissionRoles(long permissionId,
List<Role> Roles)
|
void |
deletePermissionRoles(long permissionId,
long[] roleIds)
|
Role |
deleteRole(long roleId)
Deletes the role with the primary key from the database. |
Role |
deleteRole(Role role)
Deletes the role from the database. |
void |
deleteUserRole(long userId,
long roleId)
|
void |
deleteUserRole(long userId,
Role role)
|
void |
deleteUserRoles(long userId,
List<Role> Roles)
|
void |
deleteUserRoles(long userId,
long[] roleIds)
|
DynamicQuery |
dynamicQuery()
|
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)
Returns the number of rows that match the dynamic query. |
Role |
fetchRole(long roleId)
|
Role |
fetchRole(long companyId,
String name)
Returns the role with the name in the company. |
String |
getBeanIdentifier()
Returns the Spring bean ID for this bean. |
Role |
getDefaultGroupRole(long groupId)
Returns the default role for the group with the primary key. |
List<Role> |
getGroupRoles(long groupId)
|
List<Role> |
getGroupRoles(long groupId,
int start,
int end)
|
List<Role> |
getGroupRoles(long groupId,
int start,
int end,
OrderByComparator orderByComparator)
|
int |
getGroupRolesCount(long groupId)
|
List<Role> |
getPermissionRoles(long permissionId)
|
List<Role> |
getPermissionRoles(long permissionId,
int start,
int end)
|
List<Role> |
getPermissionRoles(long permissionId,
int start,
int end,
OrderByComparator orderByComparator)
|
int |
getPermissionRolesCount(long permissionId)
|
PersistedModel |
getPersistedModel(Serializable primaryKeyObj)
|
List<Role> |
getResourceBlockRoles(long resourceBlockId,
String className,
String actionId)
|
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. |
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. |
Role |
getRole(long roleId)
Returns the role with the primary key. |
Role |
getRole(long companyId,
String name)
Returns the role with the name in the company. |
List<Role> |
getRoles(int start,
int end)
Returns a range of all the roles. |
List<Role> |
getRoles(int type,
String subtype)
Returns all the roles of the type and subtype. |
List<Role> |
getRoles(long companyId)
Returns all the roles in the company. |
List<Role> |
getRoles(long[] roleIds)
Returns all the roles with the primary keys. |
int |
getRolesCount()
Returns the number of roles. |
List<Role> |
getSubtypeRoles(String subtype)
Returns all the roles of the subtype. |
int |
getSubtypeRolesCount(String subtype)
Returns the number of roles of the subtype. |
Role |
getTeamRole(long companyId,
long teamId)
Returns the team role in the company. |
List<Role> |
getUserGroupGroupRoles(long userId,
long groupId)
Returns all the user's roles within the user group. |
List<Role> |
getUserGroupRoles(long userId,
long groupId)
Returns all the user's roles within the user group. |
List<Role> |
getUserRelatedRoles(long userId,
List<Group> groups)
Returns the union of all the user's roles within the groups. |
List<Role> |
getUserRelatedRoles(long userId,
long groupId)
Returns all the user's roles within the group. |
List<Role> |
getUserRelatedRoles(long userId,
long[] groupIds)
Returns the union of all the user's roles within the groups. |
List<Role> |
getUserRoles(long userId)
|
List<Role> |
getUserRoles(long userId,
int start,
int end)
|
List<Role> |
getUserRoles(long userId,
int start,
int end,
OrderByComparator orderByComparator)
|
int |
getUserRolesCount(long userId)
|
RoleLocalService |
getWrappedRoleLocalService()
Deprecated. Renamed to getWrappedService() |
RoleLocalService |
getWrappedService()
|
boolean |
hasGroupRole(long groupId,
long roleId)
|
boolean |
hasGroupRoles(long groupId)
|
boolean |
hasPermissionRole(long permissionId,
long roleId)
|
boolean |
hasPermissionRoles(long permissionId)
|
boolean |
hasUserRole(long userId,
long roleId)
|
boolean |
hasUserRole(long userId,
long companyId,
String name,
boolean inherited)
Returns true if the user is associated with the named
regular role. |
boolean |
hasUserRoles(long userId)
|
boolean |
hasUserRoles(long userId,
long companyId,
String[] names,
boolean inherited)
Returns true if the user has any one of the named regular
roles. |
Role |
loadFetchRole(long companyId,
String name)
Returns a role with the name in the company. |
Role |
loadGetRole(long companyId,
String name)
Returns a role with the name in the company. |
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. |
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. |
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. |
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. |
int |
searchCount(long companyId,
String keywords,
Integer[] types)
Returns the number of roles that match the keywords and types. |
int |
searchCount(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params)
Returns the number of roles that match the keywords, types and params. |
int |
searchCount(long companyId,
String name,
String description,
Integer[] types)
Returns the number of roles that match the name, description, and types. |
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. |
void |
setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean. |
void |
setGroupRoles(long groupId,
long[] roleIds)
|
void |
setPermissionRoles(long permissionId,
long[] roleIds)
|
void |
setUserRoles(long userId,
long[] roleIds)
|
void |
setWrappedRoleLocalService(RoleLocalService roleLocalService)
Deprecated. Renamed to setWrappedService(com.liferay.portal.service.RoleLocalService) |
void |
setWrappedService(RoleLocalService roleLocalService)
|
void |
unsetUserRoles(long userId,
long[] roleIds)
Removes the matching roles associated with the user. |
Role |
updateRole(long roleId,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
String subtype)
Updates the role with the primary key. |
Role |
updateRole(Role role)
Updates the role in the database or adds it if it does not yet exist. |
Role |
updateRole(Role role,
boolean merge)
Updates the role in the database or adds it if it does not yet exist. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RoleLocalServiceWrapper(RoleLocalService roleLocalService)
Method Detail |
---|
public Role addRole(Role role) throws SystemException
addRole
in interface RoleLocalService
role
- the role
SystemException
- if a system exception occurredpublic Role createRole(long roleId)
createRole
in interface RoleLocalService
roleId
- the primary key for the new role
public Role deleteRole(long roleId) throws PortalException, SystemException
deleteRole
in interface RoleLocalService
roleId
- the primary key of the role
PortalException
- if a role with the primary key could not be found
SystemException
- if a system exception occurredpublic Role deleteRole(Role role) throws PortalException, SystemException
deleteRole
in interface RoleLocalService
role
- the role
PortalException
SystemException
- if a system exception occurredpublic DynamicQuery dynamicQuery()
dynamicQuery
in interface RoleLocalService
public List dynamicQuery(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery
in interface RoleLocalService
dynamicQuery
- the dynamic query
SystemException
- if a system exception occurredpublic 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.
dynamicQuery
in interface RoleLocalService
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 occurredpublic 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.
dynamicQuery
in interface RoleLocalService
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 occurredpublic long dynamicQueryCount(DynamicQuery dynamicQuery) throws SystemException
dynamicQueryCount
in interface RoleLocalService
dynamicQuery
- the dynamic query
SystemException
- if a system exception occurredpublic Role fetchRole(long roleId) throws SystemException
fetchRole
in interface RoleLocalService
SystemException
public Role getRole(long roleId) throws PortalException, SystemException
getRole
in interface RoleLocalService
roleId
- the primary key of the role
PortalException
- if a role with the primary key could not be found
SystemException
- if a system exception occurredpublic PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException, SystemException
getPersistedModel
in interface PersistedModelLocalService
getPersistedModel
in interface RoleLocalService
PortalException
SystemException
public 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.
getRoles
in interface RoleLocalService
start
- the lower bound of the range of rolesend
- the upper bound of the range of roles (not inclusive)
SystemException
- if a system exception occurredpublic int getRolesCount() throws SystemException
getRolesCount
in interface RoleLocalService
SystemException
- if a system exception occurredpublic Role updateRole(Role role) throws SystemException
updateRole
in interface RoleLocalService
role
- the role
SystemException
- if a system exception occurredpublic Role updateRole(Role role, boolean merge) throws SystemException
updateRole
in interface RoleLocalService
role
- the rolemerge
- 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 occurredpublic void addGroupRole(long groupId, long roleId) throws SystemException
addGroupRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void addGroupRole(long groupId, Role role) throws SystemException
addGroupRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void addGroupRoles(long groupId, long[] roleIds) throws SystemException
addGroupRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void addGroupRoles(long groupId, List<Role> Roles) throws SystemException
addGroupRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void clearGroupRoles(long groupId) throws SystemException
clearGroupRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void deleteGroupRole(long groupId, long roleId) throws SystemException
deleteGroupRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void deleteGroupRole(long groupId, Role role) throws SystemException
deleteGroupRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void deleteGroupRoles(long groupId, long[] roleIds) throws SystemException
deleteGroupRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void deleteGroupRoles(long groupId, List<Role> Roles) throws SystemException
deleteGroupRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic List<Role> getGroupRoles(long groupId) throws SystemException
getGroupRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic List<Role> getGroupRoles(long groupId, int start, int end) throws SystemException
getGroupRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic List<Role> getGroupRoles(long groupId, int start, int end, OrderByComparator orderByComparator) throws SystemException
getGroupRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic int getGroupRolesCount(long groupId) throws SystemException
getGroupRolesCount
in interface RoleLocalService
SystemException
- if a system exception occurredpublic boolean hasGroupRole(long groupId, long roleId) throws SystemException
hasGroupRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic boolean hasGroupRoles(long groupId) throws SystemException
hasGroupRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void setGroupRoles(long groupId, long[] roleIds) throws SystemException
setGroupRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void addPermissionRole(long permissionId, long roleId) throws SystemException
addPermissionRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void addPermissionRole(long permissionId, Role role) throws SystemException
addPermissionRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void addPermissionRoles(long permissionId, long[] roleIds) throws SystemException
addPermissionRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void addPermissionRoles(long permissionId, List<Role> Roles) throws SystemException
addPermissionRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void clearPermissionRoles(long permissionId) throws SystemException
clearPermissionRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void deletePermissionRole(long permissionId, long roleId) throws SystemException
deletePermissionRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void deletePermissionRole(long permissionId, Role role) throws SystemException
deletePermissionRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void deletePermissionRoles(long permissionId, long[] roleIds) throws SystemException
deletePermissionRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void deletePermissionRoles(long permissionId, List<Role> Roles) throws SystemException
deletePermissionRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic List<Role> getPermissionRoles(long permissionId) throws SystemException
getPermissionRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic List<Role> getPermissionRoles(long permissionId, int start, int end) throws SystemException
getPermissionRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic List<Role> getPermissionRoles(long permissionId, int start, int end, OrderByComparator orderByComparator) throws SystemException
getPermissionRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic int getPermissionRolesCount(long permissionId) throws SystemException
getPermissionRolesCount
in interface RoleLocalService
SystemException
- if a system exception occurredpublic boolean hasPermissionRole(long permissionId, long roleId) throws SystemException
hasPermissionRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic boolean hasPermissionRoles(long permissionId) throws SystemException
hasPermissionRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void setPermissionRoles(long permissionId, long[] roleIds) throws SystemException
setPermissionRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void addUserRole(long userId, long roleId) throws SystemException
addUserRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void addUserRole(long userId, Role role) throws SystemException
addUserRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void addUserRoles(long userId, long[] roleIds) throws PortalException, SystemException
addUserRoles
in interface RoleLocalService
PortalException
SystemException
- if a system exception occurredpublic void addUserRoles(long userId, List<Role> Roles) throws PortalException, SystemException
addUserRoles
in interface RoleLocalService
PortalException
SystemException
- if a system exception occurredpublic void clearUserRoles(long userId) throws SystemException
clearUserRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void deleteUserRole(long userId, long roleId) throws SystemException
deleteUserRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void deleteUserRole(long userId, Role role) throws SystemException
deleteUserRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void deleteUserRoles(long userId, long[] roleIds) throws SystemException
deleteUserRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void deleteUserRoles(long userId, List<Role> Roles) throws SystemException
deleteUserRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic List<Role> getUserRoles(long userId) throws SystemException
getUserRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic List<Role> getUserRoles(long userId, int start, int end) throws SystemException
getUserRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic List<Role> getUserRoles(long userId, int start, int end, OrderByComparator orderByComparator) throws SystemException
getUserRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic int getUserRolesCount(long userId) throws SystemException
getUserRolesCount
in interface RoleLocalService
SystemException
- if a system exception occurredpublic boolean hasUserRole(long userId, long roleId) throws SystemException
hasUserRole
in interface RoleLocalService
SystemException
- if a system exception occurredpublic boolean hasUserRoles(long userId) throws SystemException
hasUserRoles
in interface RoleLocalService
SystemException
- if a system exception occurredpublic void setUserRoles(long userId, long[] roleIds) throws PortalException, SystemException
setUserRoles
in interface RoleLocalService
PortalException
SystemException
- if a system exception occurredpublic String getBeanIdentifier()
getBeanIdentifier
in interface RoleLocalService
public void setBeanIdentifier(String beanIdentifier)
setBeanIdentifier
in interface RoleLocalService
beanIdentifier
- the Spring bean ID for this beanpublic 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)
addRole
in interface RoleLocalService
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 occurredpublic 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)
addRole
in interface RoleLocalService
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 occurredpublic Role addRole(long userId, String className, long classPK, String name, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, int type, String subType) throws PortalException, SystemException
addRole
in interface RoleLocalService
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
)
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 occurredpublic void checkSystemRoles() throws PortalException, SystemException
checkSystemRoles
in interface RoleLocalService
PortalException
- if the current user did not have permission to
set applicable permissions on a role
SystemException
- if a system exception occurredpublic void checkSystemRoles(long companyId) throws PortalException, SystemException
checkSystemRoles
in interface RoleLocalService
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 occurredpublic 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.
fetchRole
in interface RoleLocalService
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 occurredpublic 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
.
getDefaultGroupRole
in interface RoleLocalService
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 occurredpublic List<Role> getResourceBlockRoles(long resourceBlockId, String className, String actionId) throws SystemException
getResourceBlockRoles
in interface RoleLocalService
SystemException
public Map<String,List<String>> getResourceRoles(long companyId, String name, int scope, String primKey) throws SystemException
getResourceRoles
in interface RoleLocalService
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)
public List<Role> getResourceRoles(long companyId, String name, int scope, String primKey, String actionId) throws SystemException
getResourceRoles
in interface RoleLocalService
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)
public 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.
getRole
in interface RoleLocalService
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 occurredpublic List<Role> getRoles(int type, String subtype) throws SystemException
getRoles
in interface RoleLocalService
type
- the role's type (optionally 0
)subtype
- the role's subtype (optionally null
)
SystemException
- if a system exception occurredpublic List<Role> getRoles(long companyId) throws SystemException
getRoles
in interface RoleLocalService
companyId
- the primary key of the company
SystemException
- if a system exception occurredpublic List<Role> getRoles(long[] roleIds) throws PortalException, SystemException
getRoles
in interface RoleLocalService
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 occurredpublic List<Role> getSubtypeRoles(String subtype) throws SystemException
getSubtypeRoles
in interface RoleLocalService
subtype
- the role's subtype (optionally null
)
SystemException
- if a system exception occurredpublic int getSubtypeRolesCount(String subtype) throws SystemException
getSubtypeRolesCount
in interface RoleLocalService
subtype
- the role's subtype (optionally null
)
SystemException
- if a system exception occurredpublic Role getTeamRole(long companyId, long teamId) throws PortalException, SystemException
getTeamRole
in interface RoleLocalService
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 occurredpublic List<Role> getUserGroupGroupRoles(long userId, long groupId) throws SystemException
getUserGroupGroupRoles
in interface RoleLocalService
userId
- the primary key of the usergroupId
- the primary key of the group
SystemException
- if a system exception occurredRoleFinder.findByUserGroupGroupRole(
long, long)
public List<Role> getUserGroupRoles(long userId, long groupId) throws SystemException
getUserGroupRoles
in interface RoleLocalService
userId
- the primary key of the usergroupId
- the primary key of the group
SystemException
- if a system exception occurredRoleFinder.findByUserGroupRole(
long, long)
public List<Role> getUserRelatedRoles(long userId, List<Group> groups) throws SystemException
getUserRelatedRoles
in interface RoleLocalService
userId
- the primary key of the usergroups
- the groups (optionally null
)
SystemException
- if a system exception occurredRoleFinder.findByU_G(
long, List)
public List<Role> getUserRelatedRoles(long userId, long groupId) throws SystemException
getUserRelatedRoles
in interface RoleLocalService
userId
- the primary key of the usergroupId
- the primary key of the group
SystemException
- if a system exception occurredRoleFinder.findByU_G(
long, long)
public List<Role> getUserRelatedRoles(long userId, long[] groupIds) throws SystemException
getUserRelatedRoles
in interface RoleLocalService
userId
- the primary key of the usergroupIds
- the primary keys of the groups
SystemException
- if a system exception occurredRoleFinder.findByU_G(
long, long[])
public boolean hasUserRole(long userId, long companyId, String name, boolean inherited) throws PortalException, SystemException
true
if the user is associated with the named
regular role.
hasUserRole
in interface RoleLocalService
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 role with the name could not be found in the
company or if a default user for the company could not be found
SystemException
- if a system exception occurredpublic 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.
hasUserRoles
in interface RoleLocalService
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 occurredpublic Role loadFetchRole(long companyId, String name) throws SystemException
loadFetchRole
in interface RoleLocalService
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 occurredpublic Role loadGetRole(long companyId, String name) throws PortalException, SystemException
loadGetRole
in interface RoleLocalService
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 occurredpublic 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.
search
in interface RoleLocalService
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
public 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.
search
in interface RoleLocalService
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
"permissionsResourceId" and "usersRoles" keys. For more
information, see RoleFinder
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
public 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.
search
in interface RoleLocalService
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
public 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.
search
in interface RoleLocalService
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
"permissionsResourceId" and "usersRoles" keys. For more
information, see RoleFinder
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
public int searchCount(long companyId, String keywords, Integer[] types) throws SystemException
searchCount
in interface RoleLocalService
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 occurredpublic int searchCount(long companyId, String keywords, Integer[] types, LinkedHashMap<String,Object> params) throws SystemException
searchCount
in interface RoleLocalService
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 occurredpublic int searchCount(long companyId, String name, String description, Integer[] types) throws SystemException
searchCount
in interface RoleLocalService
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 occurredpublic int searchCount(long companyId, String name, String description, Integer[] types, LinkedHashMap<String,Object> params) throws SystemException
searchCount
in interface RoleLocalService
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
"permissionsResourceId" and "usersRoles" keys. For more
information, see RoleFinder
SystemException
- if a system exception occurredpublic void unsetUserRoles(long userId, long[] roleIds) throws PortalException, SystemException
unsetUserRoles
in interface RoleLocalService
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 occurredpublic Role updateRole(long roleId, String name, Map<Locale,String> titleMap, Map<Locale,String> descriptionMap, String subtype) throws PortalException, SystemException
updateRole
in interface RoleLocalService
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
)
PortalException
- if a role with the primary could not be found or
if the role's name was invalid
SystemException
- if a system exception occurredpublic RoleLocalService getWrappedRoleLocalService()
getWrappedService()
public void setWrappedRoleLocalService(RoleLocalService roleLocalService)
setWrappedService(com.liferay.portal.service.RoleLocalService)
public RoleLocalService getWrappedService()
getWrappedService
in interface ServiceWrapper<RoleLocalService>
public void setWrappedService(RoleLocalService roleLocalService)
setWrappedService
in interface ServiceWrapper<RoleLocalService>
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |