Interface Group
- All Superinterfaces:
Comparable<Principal>
,Principal
- All Known Subinterfaces:
ExternalGroup
A user group.
- Since:
- 2.3
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds the givenuser
to this group.void
Adds the givenusers
to this group.@Nullable String
getEmail()
Gets email address of the group.getName()
Get name of the grouplong
Provides the project ID this group is defined for.User[]
getUsers()
Get all users in this groupboolean
isAdmin()
Is this an admin group.boolean
Is this the everyone groupboolean
Indicates whether this is an external group.boolean
Verifies whether the given user to be a member of this group.boolean
removeUser
(User user) Remove user from groupvoid
removeUsers
(User[] users) Remove the givenusers
from this group.void
setAdmin
(boolean admin) Sets or clears the admin flag of this group.void
Sets the email address of the groupvoid
Sets 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 givenuser
to this group.- Parameters:
user
- user to add.- Returns:
true
if the user was added,false
if the user is already member if this group.- Throws:
IllegalArgumentException
- if the user has noaccess rights
to the project.- Since:
- 2.3
-
addUsers
Adds the givenusers
to this group.- Parameters:
users
- users to add.- Throws:
IllegalArgumentException
- if at least one user has noaccess rights
to 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 givenusers
from this group.- Parameters:
users
- to remove- Since:
- 4.0.25
-
isAdmin
boolean isAdmin()Is this an admin group.- Returns:
true
if 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
-