Package io.continual.iam.impl.common
Class CommonJsonObject
- java.lang.Object
-
- io.continual.iam.impl.common.CommonJsonObject
-
- All Implemented Interfaces:
UserDataHolder
- Direct Known Subclasses:
CommonJsonGroup,CommonJsonIdentity
public abstract class CommonJsonObject extends Object implements UserDataHolder
-
-
Constructor Summary
Constructors Constructor Description CommonJsonObject()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Map<String,String>getAllUserData()Get all of the user dataprotected abstract org.json.JSONObjectgetDataRecord()StringgetUserData(String key)Get a named data value.protected booleangetValue(String name, boolean defval)protected StringgetValue(String name, String defval)voidputUserData(String key, String val)Put a named data value.abstract voidreload()reload this object from the servervoidremoveUserData(String key)Remove a named data value.protected voidremoveValue(String name)protected voidsetValue(String name, String val)protected abstract voidstore()
-
-
-
Method Detail
-
reload
public abstract void reload() throws IamSvcExceptionDescription copied from interface:UserDataHolderreload this object from the server- Specified by:
reloadin interfaceUserDataHolder- Throws:
IamSvcException- if there's a problem in the IAM service
-
setValue
protected void setValue(String name, String val) throws IamSvcException
- Throws:
IamSvcException
-
getValue
protected boolean getValue(String name, boolean defval)
-
removeValue
protected void removeValue(String name) throws IamSvcException
- Throws:
IamSvcException
-
getUserData
public String getUserData(String key) throws IamSvcException
Description copied from interface:UserDataHolderGet a named data value.- Specified by:
getUserDatain interfaceUserDataHolder- Parameters:
key- a key for a user data entry- Returns:
- a value or null
- Throws:
IamSvcException- if there's a problem in the IAM service
-
putUserData
public void putUserData(String key, String val) throws IamSvcException
Description copied from interface:UserDataHolderPut a named data value.- Specified by:
putUserDatain interfaceUserDataHolder- Parameters:
key- a key for the user data entryval- a value to store- Throws:
IamSvcException- if there's a problem in the IAM service
-
removeUserData
public void removeUserData(String key) throws IamSvcException
Description copied from interface:UserDataHolderRemove a named data value.- Specified by:
removeUserDatain interfaceUserDataHolder- Parameters:
key- a key for a user data entry- Throws:
IamSvcException- if there's a problem in the IAM service
-
getAllUserData
public Map<String,String> getAllUserData() throws IamSvcException
Description copied from interface:UserDataHolderGet all of the user data- Specified by:
getAllUserDatain interfaceUserDataHolder- Returns:
- a map of user data
- Throws:
IamSvcException- if there's a problem in the IAM service
-
getDataRecord
protected abstract org.json.JSONObject getDataRecord()
-
store
protected abstract void store() throws IamSvcException- Throws:
IamSvcException
-
-