public class ContextAttributes extends Object
CommunicationFragment.contextAttributes.set("appLocation", "Basic Guidance");
CommunicationFragment.contextAttributes.set("fullName", "Macy Williams");
CommunicationFragment.contextAttributes.set("email", "macy.williams@example.com");
CommunicationFragment.contextAttributes.set("phone", "+16505550121");
CommunicationFragment.contextAttributes.set("location", "San Francisco CA, United States");
Constructor and Description |
---|
ContextAttributes() |
Modifier and Type | Method and Description |
---|---|
String |
get(String key)
Get context attribute value for the given key.
|
void |
remove(String key)
Remove a certain context attribute.
|
void |
set(String key,
String value)
Set context attribute.
|
void |
setObserver(ContextAttributeObserver observer)
Set notification observer.
|
public String get(String key)
key
- context attribute keypublic void set(String key, String value)
key
- context attribute keyvalue
- context attribute valuepublic void remove(String key)
key
- context attribute keypublic void setObserver(ContextAttributeObserver observer)
observer
- notification observer