public class CommonJsonGroup extends CommonJsonObject implements Group
| Constructor and Description |
|---|
CommonJsonGroup(CommonJsonDb<?,?> db,
String id,
org.json.JSONObject groupData)
Deprecated.
Use the other form, which is more similar to the identity constructor
|
CommonJsonGroup(String id,
org.json.JSONObject groupData,
CommonJsonDb<?,?> db) |
| Modifier and Type | Method and Description |
|---|---|
void |
addUser(String userId) |
protected org.json.JSONObject |
getDataRecord() |
String |
getId()
Get an identifier for this group
|
Set<String> |
getMembers()
Get members of the group
|
String |
getName()
Get a readable name for this group
|
static org.json.JSONObject |
initializeGroup(String name) |
boolean |
isMember(String userId)
Is the given user a member of this group?
|
void |
reload()
reload this object from the server
|
void |
removeUser(String userId) |
protected void |
store() |
getAllUserData, getUserData, getValue, getValue, putUserData, removeUserData, removeValue, setValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAllUserData, getUserData, putUserData, removeUserData@Deprecated public CommonJsonGroup(CommonJsonDb<?,?> db, String id, org.json.JSONObject groupData)
db - an identity databaseid - the group's IDgroupData - additional group datapublic CommonJsonGroup(String id, org.json.JSONObject groupData, CommonJsonDb<?,?> db)
public static org.json.JSONObject initializeGroup(String name)
public String getId()
Grouppublic String getName()
Grouppublic boolean isMember(String userId) throws IamSvcException
GroupisMember in interface GroupuserId - a user IDIamSvcException - if there's a problem in the IAM servicepublic Set<String> getMembers() throws IamSvcException
GroupgetMembers in interface GroupIamSvcException - if there's a problem in the IAM servicepublic void addUser(String userId) throws IamSvcException
IamSvcExceptionpublic void removeUser(String userId) throws IamSvcException
IamSvcExceptionpublic void reload()
throws IamSvcException
UserDataHolderreload in interface UserDataHolderreload in class CommonJsonObjectIamSvcException - if there's a problem in the IAM serviceprotected org.json.JSONObject getDataRecord()
getDataRecord in class CommonJsonObjectprotected void store()
throws IamSvcException
store in class CommonJsonObjectIamSvcExceptionCopyright © 2022 continual.io. All rights reserved.