Interface Group
- All Superinterfaces:
Comparable<Principal>,Principal
- All Known Subinterfaces:
ExternalGroup
A user group.
- Since:
- 2.3
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds the givenuserto this group.voidAdds the givenusersto this group.@Nullable StringgetEmail()Gets email address of the group.getName()Get name of the grouplongProvides the project ID this group is defined for.User[]getUsers()Get all users in this groupbooleanisAdmin()Is this an admin group.booleanIs this the everyone groupbooleanIndicates whether this is an external group.booleanVerifies whether the given user to be a member of this group.booleanremoveUser(User user) Remove user from groupvoidremoveUsers(User[] users) Remove the givenusersfrom this group.voidsetAdmin(boolean admin) Sets or clears the admin flag of this group.voidSets the email address of the groupvoidSets group's name.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getName
String getName()Get name of the group -
setName
Sets group's name.- Parameters:
name- new name.- Throws:
IllegalArgumentException- if a group with this name already exists.- Since:
- 4.0.17
-
getUsers
User[] getUsers()Get all users in this group- Returns:
- the users
- Since:
- 2.3
-
addUser
Adds the givenuserto this group.- Parameters:
user- user to add.- Returns:
trueif the user was added,falseif the user is already member if this group.- Throws:
IllegalArgumentException- if the user has noaccess rightsto the project.- Since:
- 2.3
-
addUsers
Adds the givenusersto this group.- Parameters:
users- users to add.- Throws:
IllegalArgumentException- if at least one user has noaccess rightsto the project.- Since:
- 4.0.25
-
removeUser
Remove user from group- Parameters:
user- the user to remove- Returns:
- user removed
- Since:
- 2.3
-
removeUsers
Remove the givenusersfrom this group.- Parameters:
users- to remove- Since:
- 4.0.25
-
isAdmin
boolean isAdmin()Is this an admin group.- Returns:
trueif this is an administrator group.- Since:
- 2.3
-
setAdmin
void setAdmin(boolean admin) Sets or clears the admin flag of this group.- Parameters:
admin- admin flag.- Since:
- 4.0.43
-
isEveryone
boolean isEveryone()Is this the everyone group- Returns:
- the everyone value
- Since:
- 2.3
-
isExternal
boolean isExternal()Indicates whether this is an external group.- Returns:
true, if external.- Since:
- 4.0.17
-
isMember
Verifies whether the given user to be a member of this group.- Parameters:
user- A user.- Returns:
true, if the user is a member.- Since:
- 2.3.18
-
getProjectID
long getProjectID()Provides the project ID this group is defined for.- Returns:
- The project ID.
- Since:
- 4.0.17
-
getEmail
Gets email address of the group.- Returns:
- the eMail address
- Since:
- 4.2.428
-
setEmail
Sets the email address of the group- Parameters:
email- the new eMail address- Since:
- 4.2.428
-