|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sas.drugdev.remote.admin.GroupBean
public class GroupBean
Simple bean to represent a group. This can be constructed various ways. This class allows the user
to construct a Group
object without requiring a server call.
It is the only way to create a Group on the server. Construct a GroupBean, then pass it into
GroupService.create(GroupBean)
.
It is also the only means for performing write operations on the Group, such as updating membership
and the description. Construct a GroupBean object then call addUser(String)
,
removeUser(String)
or setDescription(String)
method. Then pass
that bean into GroupService.update(GroupBean)
to perform those operations
on the server side.
Constructor Summary | |
---|---|
GroupBean(RemoteGroup remoteGroup)
Construct the GroupBean with a RemoteGroup . |
|
GroupBean(java.lang.String name)
Contruct the GroupBean with a group name. |
Method Summary | |
---|---|
void |
addUser(java.lang.String userId)
Add the given user to this group. |
void |
addUsers(java.util.List userIds)
Add the given users to this group. |
java.lang.String |
getDescription()
Get the description of this group |
java.lang.String |
getName()
Get the name of this group |
java.util.List |
getUsers()
Get the userIds of the current users in this group. |
void |
removeUser(java.lang.String userId)
Remove the user with the specified userId from this group. |
void |
removeUsers(java.util.List userIds)
Remove the users with the specified userIds from this group. |
void |
setDescription(java.lang.String description)
Set the description of this group. |
void |
setUsers(java.util.List userIds)
Set the given userIds to be users in this group. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GroupBean(RemoteGroup remoteGroup) throws InvalidGroupBeanException
RemoteGroup
. This is useful for updating a group.
remoteGroup
-
InvalidGroupBeanException
- if the passed RemoteGroup is nullpublic GroupBean(java.lang.String name) throws InvalidGroupBeanException
name
- Name of the group.
InvalidGroupBeanException
- if the passed name is nullMethod Detail |
---|
public void addUser(java.lang.String userId) throws InvalidGroupBeanException
GroupService.update(GroupBean)
or GroupService.create(GroupBean)
. If the user is already a
member of this group, this call is a no-op.
userId
- userId of user to add to the group
InvalidGroupBeanException
- if the passed userID is nullpublic void addUsers(java.util.List userIds)
GroupService.update(GroupBean)
or GroupService.create(GroupBean)
. If the user is already a
member of this group, this call is a no-op.
userIds
- List of users to add to the grouppublic void removeUser(java.lang.String userId) throws InvalidGroupBeanException
GroupService.update(GroupBean)
. If the user isn't a member of this group,
this call is a no-op.
userId
- User to remove from the group
InvalidGroupBeanException
- if the passed userID is nullpublic void removeUsers(java.util.List userIds) throws InvalidGroupBeanException
GroupService.update(GroupBean)
. If the user isn't a member of this group,
this call is a no-op.
userIds
- userIds to remove from the group
InvalidGroupBeanException
- if the passed userIDs is nullpublic void setUsers(java.util.List userIds) throws InvalidGroupBeanException
GroupService.update(GroupBean)
or GroupService.update(GroupBean)
.
userIds
- userIds to be set on the group
InvalidGroupBeanException
- if the passed userIDs is nullpublic void setDescription(java.lang.String description) throws InvalidGroupBeanException
GroupService.update(GroupBean)
or GroupService.create(GroupBean)
.
description
-
InvalidGroupBeanException
- if the passed description is nullpublic java.util.List getUsers()
Group
getUsers
in interface Group
public java.lang.String getName()
Group
getName
in interface Group
public java.lang.String getDescription()
Group
getDescription
in interface Group
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |