|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.service.RoleServiceWrapper
@ProviderType public class RoleServiceWrapper
Provides a wrapper for RoleService.
RoleService| Constructor Summary | |
|---|---|
RoleServiceWrapper(RoleService roleService)
|
|
| Method Summary | |
|---|---|
Role |
addRole(String className,
long classPK,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type,
String subtype,
ServiceContext serviceContext)
Adds a role. |
Role |
addRole(String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type)
Deprecated. As of 6.2.0, replaced by addRole(String, long,
String, Map, Map, int, String, ServiceContext) |
void |
addUserRoles(long userId,
long[] roleIds)
Adds the roles to the user. |
void |
deleteRole(long roleId)
Deletes the role with the primary key and its associated permissions. |
Role |
fetchRole(long roleId)
|
List<Role> |
getGroupRoles(long groupId)
Returns all the roles associated with the group. |
String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier. |
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 type,
String subtype)
|
List<Role> |
getRoles(long companyId,
int[] types)
|
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> |
getUserRoles(long userId)
Returns all the roles associated with the user. |
RoleService |
getWrappedService()
|
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,
long companyId,
String[] names,
boolean inherited)
Returns true if the user has any one of the named regular
roles. |
List<Role> |
search(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator<Role> obc)
|
int |
searchCount(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params)
|
void |
setWrappedService(RoleService roleService)
|
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,
ServiceContext serviceContext)
Updates the role with the primary key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RoleServiceWrapper(RoleService roleService)
| Method Detail |
|---|
public Role addRole(String className,
long classPK,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type,
String subtype,
ServiceContext serviceContext)
throws PortalException
addRole in interface RoleServiceclassName - the name of the class for which the role is createdclassPK - 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 the expando bridge attributes for the
role.
PortalException
@Deprecated
public Role addRole(String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
int type)
throws PortalException
addRole(String, long,
String, Map, Map, int, String, ServiceContext)
addRole in interface RoleServicename - 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
public void addUserRoles(long userId,
long[] roleIds)
throws PortalException
addUserRoles in interface RoleServiceuserId - the primary key of the userroleIds - the primary keys of the roles
PortalException
public void deleteRole(long roleId)
throws PortalException
deleteRole in interface RoleServiceroleId - the primary key of the role
PortalException
public Role fetchRole(long roleId)
throws PortalException
fetchRole in interface RoleServicePortalException
public List<Role> getGroupRoles(long groupId)
throws PortalException
getGroupRoles in interface RoleServicegroupId - the primary key of the group
PortalExceptionpublic String getOSGiServiceIdentifier()
getOSGiServiceIdentifier in interface RoleService
public Role getRole(long companyId,
String name)
throws PortalException
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 RoleServicecompanyId - the primary key of the companyname - the role's name
PortalException
public Role getRole(long roleId)
throws PortalException
getRole in interface RoleServiceroleId - the primary key of the role
PortalException
public List<Role> getRoles(long companyId,
int[] types)
throws PortalException
getRoles in interface RoleServicePortalException
public List<Role> getRoles(int type,
String subtype)
throws PortalException
getRoles in interface RoleServicePortalException
public List<Role> getUserGroupGroupRoles(long userId,
long groupId)
throws PortalException
getUserGroupGroupRoles in interface RoleServiceuserId - the primary key of the usergroupId - the primary key of the group
PortalException
public List<Role> getUserGroupRoles(long userId,
long groupId)
throws PortalException
getUserGroupRoles in interface RoleServiceuserId - the primary key of the usergroupId - the primary key of the group
PortalException
public List<Role> getUserRelatedRoles(long userId,
List<Group> groups)
throws PortalException
getUserRelatedRoles in interface RoleServiceuserId - the primary key of the usergroups - the groups (optionally null)
PortalException
public List<Role> getUserRoles(long userId)
throws PortalException
getUserRoles in interface RoleServiceuserId - the primary key of the user
PortalException
public boolean hasUserRole(long userId,
long companyId,
String name,
boolean inherited)
throws PortalException
true if the user is associated with the named
regular role.
hasUserRole in interface RoleServiceuserId - 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
public boolean hasUserRoles(long userId,
long companyId,
String[] names,
boolean inherited)
throws PortalException
true if the user has any one of the named regular
roles.
hasUserRoles in interface RoleServiceuserId - 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
public List<Role> search(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator<Role> obc)
search in interface RoleService
public int searchCount(long companyId,
String keywords,
Integer[] types,
LinkedHashMap<String,Object> params)
searchCount in interface RoleService
public void unsetUserRoles(long userId,
long[] roleIds)
throws PortalException
unsetUserRoles in interface RoleServiceuserId - the primary key of the userroleIds - the primary keys of the roles
PortalException
public Role updateRole(long roleId,
String name,
Map<Locale,String> titleMap,
Map<Locale,String> descriptionMap,
String subtype,
ServiceContext serviceContext)
throws PortalException
updateRole in interface RoleServiceroleId - 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 the expando bridge attributes for the
role.
PortalExceptionpublic RoleService getWrappedService()
getWrappedService in interface ServiceWrapper<RoleService>public void setWrappedService(RoleService roleService)
setWrappedService in interface ServiceWrapper<RoleService>
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||