2013-07-26 17:38:56 +02:00
|
|
|
package org.gcube.vomanagement.usermanagement;
|
|
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
|
|
|
|
import org.gcube.vomanagement.usermanagement.exception.RoleRetrievalFault;
|
|
|
|
import org.gcube.vomanagement.usermanagement.exception.UserManagementPortalException;
|
|
|
|
import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException;
|
|
|
|
import org.gcube.vomanagement.usermanagement.exception.UserRetrievalFault;
|
|
|
|
import org.gcube.vomanagement.usermanagement.model.GroupModel;
|
|
|
|
import org.gcube.vomanagement.usermanagement.model.RoleModel;
|
|
|
|
import org.gcube.vomanagement.usermanagement.model.UserModel;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
2016-02-05 17:34:44 +01:00
|
|
|
*
|
|
|
|
* @author Massimiliano Assante, CNR-ISTI
|
2013-07-26 17:38:56 +02:00
|
|
|
*
|
|
|
|
*/
|
2016-02-05 17:34:44 +01:00
|
|
|
public interface UserManager {
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param username the username of the user you want to get
|
|
|
|
* @return the instance of the user
|
|
|
|
* @throws UserManagementSystemException
|
|
|
|
* @throws UserRetrievalFault
|
|
|
|
*/
|
|
|
|
UserModel getUserByUsername(String username) throws UserManagementSystemException, UserRetrievalFault ;
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param username the email of the user you want to get
|
|
|
|
* @return the instance of the user
|
|
|
|
* @throws UserManagementSystemException
|
|
|
|
* @throws UserRetrievalFault
|
|
|
|
*/
|
|
|
|
UserModel getUserByEmail(String email) throws UserManagementSystemException, UserRetrievalFault;
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @return a list of all portal active users no matter if the belong or not to a VRE, if a user is deactived is not returned
|
|
|
|
* @throws UserManagementSystemException
|
|
|
|
*/
|
|
|
|
List<UserModel> listUsers() throws UserManagementSystemException;
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param groupId the LR groupId
|
|
|
|
* @return
|
|
|
|
* @throws UserManagementSystemException
|
|
|
|
* @throws GroupRetrievalFault
|
|
|
|
* @throws UserRetrievalFault
|
|
|
|
*/
|
|
|
|
List<UserModel> listUsersByGroup(long groupId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault;
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param the name of the VO or VRE (e.g. devVRE, or gcube etc.)
|
|
|
|
* @return
|
|
|
|
* @throws UserManagementSystemException
|
|
|
|
* @throws GroupRetrievalFault
|
|
|
|
* @throws UserRetrievalFault
|
|
|
|
*/
|
|
|
|
List<UserModel> listUsersByGroupName(String name) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
List<UserModel> listPendingUsersByGroup(String groupId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
String getMembershipRequestComment(String userId, String groupId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
HashMap<UserModel, List<RoleModel>> listUsersAndRolesByGroup(String groupId) throws GroupRetrievalFault, UserManagementSystemException, UserRetrievalFault ;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
HashMap<UserModel, List<GroupModel>> listUsersAndGroupsByRole(String roleId) throws UserManagementSystemException, RoleRetrievalFault, UserRetrievalFault ;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
List<UserModel> listUsersByGroupAndRole(String groupId, String roleId) throws UserManagementSystemException, RoleRetrievalFault, GroupRetrievalFault, UserRetrievalFault;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
void assignUserToGroup(String groupId, String userId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault, UserManagementPortalException;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
void dismissUserFromGroup(String groupId, String userId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
void requestMembership(String userId, String groupId, String comment) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
List<UserModel> listUnregisteredUsersByGroup(String groupId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
Long getUserId(String screenName) throws UserManagementSystemException;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
List<UserModel> getMembershipRequests(String groupId) throws UserManagementSystemException,GroupRetrievalFault, UserRetrievalFault;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
HashMap<String, String> getUserCustomAttributes(String userId) throws UserManagementSystemException, UserRetrievalFault;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
void setUserCustomAttributes(String userId, HashMap<String,String> hMap) throws UserManagementSystemException, UserRetrievalFault, UserManagementPortalException;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
String getUserCustomAttributeByName(String userId, String attrName)throws UserManagementSystemException, UserRetrievalFault;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
void setUserCustomAttributeByName(String userId, String attrName, String attrValue) throws UserManagementSystemException, UserRetrievalFault, UserManagementPortalException;
|
2013-07-26 17:38:56 +02:00
|
|
|
|
2016-02-05 17:34:44 +01:00
|
|
|
void denyMembershipRequest(String userId,String groupId)throws UserManagementSystemException, GroupRetrievalFault, UserManagementPortalException;
|
2013-07-26 17:38:56 +02:00
|
|
|
}
|