Class RoleManagement
- java.lang.Object
-
- eu.dnetlib.openaire.usermanagement.utils.RoleManagement
-
@Service public class RoleManagement extends Object
-
-
Field Summary
Fields Modifier and Type Field Description AuthorizationServiceauthorizationServiceHttpUtilshttpUtils
-
Constructor Summary
Constructors Constructor Description RoleManagement(HttpUtils httpUtils, AuthorizationService authorizationService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gson.JsonElementassignManagerRole(String type, String id, javax.servlet.http.HttpServletRequest request)com.google.gson.JsonElementassignMemberRole(String type, String id, javax.servlet.http.HttpServletRequest request)com.google.gson.JsonElementcreateCuratorRole(String type)com.google.gson.JsonElementcreateMemberRole(String type, String id)com.google.gson.JsonElementcreateRole(String name, String description)com.google.gson.JsonElementgetAllCurators(String type)com.google.gson.JsonElementgetAllManagers(String type, String id)com.google.gson.JsonElementgetAllMembers(String type, String id)intgetAllMembersCount(String type, String id)booleanisManager(String type, String id, String email)booleanisMember(String type, String id, String email)com.google.gson.JsonElementremoveManagerRole(String type, String id, String email)com.google.gson.JsonElementremoveManagerRole(String type, String id, javax.servlet.http.HttpServletRequest request)com.google.gson.JsonElementremoveMemberRole(String type, String id, String email)com.google.gson.JsonElementremoveMemberRole(String type, String id, javax.servlet.http.HttpServletRequest request)
-
-
-
Field Detail
-
httpUtils
public HttpUtils httpUtils
-
authorizationService
public AuthorizationService authorizationService
-
-
Constructor Detail
-
RoleManagement
@Autowired public RoleManagement(HttpUtils httpUtils, AuthorizationService authorizationService)
-
-
Method Detail
-
assignMemberRole
public com.google.gson.JsonElement assignMemberRole(String type, String id, javax.servlet.http.HttpServletRequest request) throws org.springframework.web.client.HttpClientErrorException
- Throws:
org.springframework.web.client.HttpClientErrorException
-
assignManagerRole
public com.google.gson.JsonElement assignManagerRole(String type, String id, javax.servlet.http.HttpServletRequest request) throws org.springframework.web.client.HttpClientErrorException
- Throws:
org.springframework.web.client.HttpClientErrorException
-
removeMemberRole
public com.google.gson.JsonElement removeMemberRole(String type, String id, javax.servlet.http.HttpServletRequest request) throws org.springframework.web.client.HttpClientErrorException
- Throws:
org.springframework.web.client.HttpClientErrorException
-
removeMemberRole
public com.google.gson.JsonElement removeMemberRole(String type, String id, String email) throws org.springframework.web.client.HttpClientErrorException
- Throws:
org.springframework.web.client.HttpClientErrorException
-
removeManagerRole
public com.google.gson.JsonElement removeManagerRole(String type, String id, javax.servlet.http.HttpServletRequest request) throws org.springframework.web.client.HttpClientErrorException
- Throws:
org.springframework.web.client.HttpClientErrorException
-
removeManagerRole
public com.google.gson.JsonElement removeManagerRole(String type, String id, String email) throws org.springframework.web.client.HttpClientErrorException
- Throws:
org.springframework.web.client.HttpClientErrorException
-
getAllMembers
public com.google.gson.JsonElement getAllMembers(String type, String id) throws org.springframework.web.client.HttpClientErrorException
- Throws:
org.springframework.web.client.HttpClientErrorException
-
getAllMembersCount
public int getAllMembersCount(String type, String id) throws org.springframework.web.client.HttpClientErrorException
- Throws:
org.springframework.web.client.HttpClientErrorException
-
getAllManagers
public com.google.gson.JsonElement getAllManagers(String type, String id) throws org.springframework.web.client.HttpClientErrorException
- Throws:
org.springframework.web.client.HttpClientErrorException
-
getAllCurators
public com.google.gson.JsonElement getAllCurators(String type) throws org.springframework.web.client.HttpClientErrorException
- Throws:
org.springframework.web.client.HttpClientErrorException
-
isMember
public boolean isMember(String type, String id, String email) throws org.springframework.web.client.HttpClientErrorException
- Throws:
org.springframework.web.client.HttpClientErrorException
-
isManager
public boolean isManager(String type, String id, String email) throws org.springframework.web.client.HttpClientErrorException
- Throws:
org.springframework.web.client.HttpClientErrorException
-
createCuratorRole
public com.google.gson.JsonElement createCuratorRole(String type)
-
-