de.espirit.firstspirit.access.project
Interface Group

All Superinterfaces:
Comparable<Principal>, Principal

public interface Group
extends Principal

A user group.

Since:
2.3

Field Summary
 
Fields inherited from interface de.espirit.firstspirit.access.Principal
GROUP, USER
 
Method Summary
 boolean addUser(User user)
          Adds the given user to this group.
 void addUsers(User[] users)
          Adds the given users to this group.
 String getEmail()
          Gets email address of the group.
 String getName()
          Get name of the group
 long getProjectID()
           
 User[] getUsers()
          Get all users in this group
 boolean isAdmin()
          Is this an admin group.
 boolean isEveryone()
          Is this the everyone group
 boolean isExternal()
           
 boolean isMember(User user)
           
 boolean removeUser(User user)
          Remove user from group
 void removeUsers(User[] users)
          Remove the given users from this group.
 void setAdmin(boolean admin)
          Sets or clears the admin flag of this group.
 void setEmail(String email)
          Sets the email address of the group
 void setName(String name)
          Sets group's name.
 
Methods inherited from interface de.espirit.firstspirit.access.Principal
getId, getID, getType
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getName

String getName()
Get name of the group

Specified by:
getName in interface Principal
Returns:
the name
Since:
2.3

setName

void setName(String name)
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

boolean addUser(User user)
                throws IllegalArgumentException
Adds the given user 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 no access rights to the project.
Since:
2.3

addUsers

void addUsers(User[] users)
              throws IllegalArgumentException
Adds the given users to this group.

Parameters:
users - users to add.
Throws:
IllegalArgumentException - if at least one user has no access rights to the project.
Since:
4.0.25

removeUser

boolean removeUser(User user)
Remove user from group

Parameters:
user - the user to remove
Returns:
user removed
Since:
2.3

removeUsers

void removeUsers(User[] users)
Remove the given users 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()
Since:
4.0.17

isMember

boolean isMember(User user)
Since:
2.3.18

getProjectID

long getProjectID()
Since:
4.0.17

getEmail

@Nullable
String getEmail()
Gets email address of the group.

Returns:
the eMail address
Since:
4.2.428

setEmail

void setEmail(@Nullable
              String email)
Sets the email address of the group

Parameters:
email - the new eMail address
Since:
4.2.428


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480