Package io.manebot.user
Interface UserManager
-
public interface UserManager
-
-
Method Summary
Modifier and Type Method Description User
createUser(java.lang.String username, UserType type)
Creates a new user.UserGroup
createUserGroup(java.lang.String name)
Creates a new user group.void
deleteUserGroup(java.lang.String name)
Deletes a user group.java.util.Collection<UserBan>
getBans()
Gets a collection of all user bans.java.util.Collection<UserBan>
getCurrentBans()
Gets a collection of all current bans.UserAssociation
getUserAssociation(Platform platform, java.lang.String id)
Gets a user association.User
getUserByDisplayName(java.lang.String displayName)
Gets a user by their display name.User
getUserByName(java.lang.String username)
Gets a user by their username.UserGroup
getUserGroupByName(java.lang.String name)
Gets a user group by name.java.util.Collection<UserGroup>
getUserGroups()
Gets all user groups on the system.java.util.Collection<User>
getUsers()
Gets all users on the system.java.util.Collection<User>
getUsersByType(UserType type)
Gets all users defined as a specific type.
-
-
-
Method Detail
-
createUser
User createUser(java.lang.String username, UserType type)
Creates a new user.- Parameters:
username
- username of the new user.type
- user type to create- Returns:
- User instance representing the new user.
-
getUserByName
User getUserByName(java.lang.String username)
Gets a user by their username.- Parameters:
username
- username to look for- Returns:
- User instance if a user is found, null otherwise.
-
getUserByDisplayName
User getUserByDisplayName(java.lang.String displayName)
Gets a user by their display name.- Parameters:
displayName
- displayName to look for- Returns:
- User instance if a user is found, null otherwise.
-
getBans
java.util.Collection<UserBan> getBans()
Gets a collection of all user bans.- Returns:
- user ban collection.
-
getCurrentBans
java.util.Collection<UserBan> getCurrentBans()
Gets a collection of all current bans.- Returns:
- current bans.
-
getUsers
java.util.Collection<User> getUsers()
Gets all users on the system.- Returns:
- Collection representing all users on the system.
-
getUsersByType
java.util.Collection<User> getUsersByType(UserType type)
Gets all users defined as a specific type.- Parameters:
type
- user type to search for.- Returns:
- Collection representing all users of a specific type on the system.
-
getUserGroupByName
UserGroup getUserGroupByName(java.lang.String name)
Gets a user group by name.- Parameters:
name
- name to look for.- Returns:
- Group instance if a group is found, null otherwise.
-
getUserGroups
java.util.Collection<UserGroup> getUserGroups()
Gets all user groups on the system.- Returns:
- Collection representing all user groups on the system.
-
createUserGroup
UserGroup createUserGroup(java.lang.String name)
Creates a new user group.- Parameters:
name
- name to create the new group with.- Returns:
- UserGroup instance representing the new group.
-
deleteUserGroup
void deleteUserGroup(java.lang.String name)
Deletes a user group.- Parameters:
name
- name of the user group to delete.
-
getUserAssociation
UserAssociation getUserAssociation(Platform platform, java.lang.String id)
Gets a user association.- Parameters:
platform
- Platform holding the association.id
- Platform-specific ID for the association.- Returns:
- UserAssociation instance if one exists, null otherwise.
-
-