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; /** * * * @author Massimiliano Assante, CNR-ISTI * */ 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 listUsers() throws UserManagementSystemException; /** * * @param groupId the LR groupId * @return * @throws UserManagementSystemException * @throws GroupRetrievalFault * @throws UserRetrievalFault */ List 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 listUsersByGroupName(String name) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault; List listPendingUsersByGroup(String groupId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault; String getMembershipRequestComment(String userId, String groupId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault; HashMap> listUsersAndRolesByGroup(String groupId) throws GroupRetrievalFault, UserManagementSystemException, UserRetrievalFault ; HashMap> listUsersAndGroupsByRole(String roleId) throws UserManagementSystemException, RoleRetrievalFault, UserRetrievalFault ; List listUsersByGroupAndRole(String groupId, String roleId) throws UserManagementSystemException, RoleRetrievalFault, GroupRetrievalFault, UserRetrievalFault; void assignUserToGroup(String groupId, String userId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault, UserManagementPortalException; void dismissUserFromGroup(String groupId, String userId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault; void requestMembership(String userId, String groupId, String comment) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault; List listUnregisteredUsersByGroup(String groupId) throws UserManagementSystemException, GroupRetrievalFault, UserRetrievalFault; Long getUserId(String screenName) throws UserManagementSystemException; List getMembershipRequests(String groupId) throws UserManagementSystemException,GroupRetrievalFault, UserRetrievalFault; HashMap getUserCustomAttributes(String userId) throws UserManagementSystemException, UserRetrievalFault; void setUserCustomAttributes(String userId, HashMap hMap) throws UserManagementSystemException, UserRetrievalFault, UserManagementPortalException; String getUserCustomAttributeByName(String userId, String attrName)throws UserManagementSystemException, UserRetrievalFault; void setUserCustomAttributeByName(String userId, String attrName, String attrValue) throws UserManagementSystemException, UserRetrievalFault, UserManagementPortalException; void denyMembershipRequest(String userId,String groupId)throws UserManagementSystemException, GroupRetrievalFault, UserManagementPortalException; }